From 71e411d8609b940ebd42b6aeaaad7d1ce106a424 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Tue, 31 Aug 2021 20:28:36 -0400 Subject: handle watch variant with red/blue LED --- watch-library/hw/atmel_start_pins.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'watch-library/hw/atmel_start_pins.h') diff --git a/watch-library/hw/atmel_start_pins.h b/watch-library/hw/atmel_start_pins.h index 14df95e1..4920e67e 100644 --- a/watch-library/hw/atmel_start_pins.h +++ b/watch-library/hw/atmel_start_pins.h @@ -39,8 +39,14 @@ #define SEG19 GPIO(GPIO_PORTA, 17) #define SEG20 GPIO(GPIO_PORTA, 18) #define SEG21 GPIO(GPIO_PORTA, 19) -#define RED GPIO(GPIO_PORTA, 20) -#define GREEN GPIO(GPIO_PORTA, 21) +#ifdef WATCH_SWAP_LED_PINS + #define RED GPIO(GPIO_PORTA, 21) + #define GREEN GPIO(GPIO_PORTA, 20) +#else + #define RED GPIO(GPIO_PORTA, 20) + #define GREEN GPIO(GPIO_PORTA, 21) +#endif +#define BTN_ALARM GPIO(GPIO_PORTA, 2) #define BTN_LIGHT GPIO(GPIO_PORTA, 22) #define BTN_MODE GPIO(GPIO_PORTA, 23) #define BUZZER GPIO(GPIO_PORTA, 27) @@ -51,7 +57,6 @@ #define A4 GPIO(GPIO_PORTB, 0) #define D0 GPIO(GPIO_PORTB, 3) #define D1 GPIO(GPIO_PORTB, 0) -#define BTN_ALARM GPIO(GPIO_PORTA, 2) #define COM0 GPIO(GPIO_PORTB, 6) #define COM1 GPIO(GPIO_PORTB, 7) #define COM2 GPIO(GPIO_PORTB, 8) -- cgit v1.2.3