Skip to content

Commit

Permalink
P8 pins
Browse files Browse the repository at this point in the history
  • Loading branch information
tt1pjm committed Sep 11, 2020
1 parent d904646 commit 621da48
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
8 changes: 6 additions & 2 deletions hw/bsp/nrf52/include/bsp/bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ extern uint8_t _ram_start;
#define RAM_SIZE 0x10000

/* LED pins */
#define LED_1 (17)
// #define LED_1 (17)
// P8
#define LED_1 (15)
#define LED_2 (18)
#define LED_BLINK_PIN (LED_1)

/* Buttons */
#define BUTTON_1 (14) /* Labelled SW1 on the board */
#define BUTTON_2 (13) /* Labelled SW2 on the board */
// #define BUTTON_2 (13) /* Labelled SW2 on the board */
// P8
#define BUTTON_2 (17) /* Labelled SW2 on the board */

#ifdef __cplusplus
}
Expand Down
4 changes: 3 additions & 1 deletion libs/pinetime_boot/src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#define DISPLAY_RST 26 // LCD_RESET (P0.26): Display reset
#define DISPLAY_HIGH 23 // LCD_BACKLIGHT_{LOW,MID,HIGH} (P0.14, 22, 23): Backlight (active low)
#define BATCH_SIZE 256 // Max number of SPI data bytes to be transmitted
#define PUSH_BUTTON_IN 13 // GPIO Pin P0.13: PUSH BUTTON_IN
// #define PUSH_BUTTON_IN 13 // GPIO Pin P0.13: PUSH BUTTON_IN
// P8 pin
#define PUSH_BUTTON_IN 17 // GPIO Pin P0.17: PUSH BUTTON_IN

// Screen Size
#define ROW_COUNT 240
Expand Down
7 changes: 5 additions & 2 deletions libs/pinetime_boot/src/pinetime_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
#include <bootutil/bootutil.h>
#include "pinetime_boot/pinetime_boot.h"

#define PUSH_BUTTON_IN 13 // GPIO Pin P0.13: PUSH BUTTON_IN
#define PUSH_BUTTON_OUT 15 // GPIO Pin P0.15/TRACEDATA2: PUSH BUTTON_OUT
// #define PUSH_BUTTON_IN 13 // GPIO Pin P0.13: PUSH BUTTON_IN
// #define PUSH_BUTTON_OUT 15 // GPIO Pin P0.15/TRACEDATA2: PUSH BUTTON_OUT
// P8 pins
#define PUSH_BUTTON_IN 17 // GPIO Pin P0.17: PUSH BUTTON_IN
#define PUSH_BUTTON_OUT -1 // GPIO Pin P0.-1/TRACEDATA2: PUSH BUTTON_OUT

/// Vector Table will be relocated here.
#define RELOCATED_VECTOR_TABLE 0x7F00
Expand Down
4 changes: 3 additions & 1 deletion rust/app/src/touch_sensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ use mynewt::{
};

/// Reset Pin for touch controller. Note: NFC antenna pins must be reassigned as GPIO pins for this to work.
const TOUCH_RESET_PIN: i32 = 10; // P0.10/NFC2: TP_RESET
// const TOUCH_RESET_PIN: i32 = 10; // P0.10/NFC2: TP_RESET
// P8 pin
const TOUCH_RESET_PIN: i32 = 13; // P0.13/NFC2: TP_RESET

/// Interrupt Pin for touch controller. We listen for the touch controller interrupt and trigger an event.
const TOUCH_INTERRUPT_PIN: i32 = 28; // P0.28/AIN4: TP_INT
Expand Down

0 comments on commit 621da48

Please sign in to comment.