From 621da481260ca020d38c38257106f26ab2da52b6 Mon Sep 17 00:00:00 2001 From: tt1pjm Date: Fri, 11 Sep 2020 10:32:34 +0200 Subject: [PATCH] P8 pins --- hw/bsp/nrf52/include/bsp/bsp.h | 8 ++++++-- libs/pinetime_boot/src/display.c | 4 +++- libs/pinetime_boot/src/pinetime_boot.c | 7 +++++-- rust/app/src/touch_sensor.rs | 4 +++- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/hw/bsp/nrf52/include/bsp/bsp.h b/hw/bsp/nrf52/include/bsp/bsp.h index 597e50f80..72b99368c 100644 --- a/hw/bsp/nrf52/include/bsp/bsp.h +++ b/hw/bsp/nrf52/include/bsp/bsp.h @@ -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 } diff --git a/libs/pinetime_boot/src/display.c b/libs/pinetime_boot/src/display.c index 3e3331e06..01de3e84e 100644 --- a/libs/pinetime_boot/src/display.c +++ b/libs/pinetime_boot/src/display.c @@ -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 diff --git a/libs/pinetime_boot/src/pinetime_boot.c b/libs/pinetime_boot/src/pinetime_boot.c index ec2f5a881..6606022f8 100644 --- a/libs/pinetime_boot/src/pinetime_boot.c +++ b/libs/pinetime_boot/src/pinetime_boot.c @@ -28,8 +28,11 @@ #include #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 diff --git a/rust/app/src/touch_sensor.rs b/rust/app/src/touch_sensor.rs index 32edcb0d8..e4c7096a2 100644 --- a/rust/app/src/touch_sensor.rs +++ b/rust/app/src/touch_sensor.rs @@ -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