summaryrefslogtreecommitdiffstats
path: root/watch-library/hw
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-08-31 20:28:36 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-08-31 20:29:13 -0400
commit71e411d8609b940ebd42b6aeaaad7d1ce106a424 (patch)
treead91bc908a67e3f34d9ad3c257c26c1ca715895a /watch-library/hw
parenta232999e9384e2e895a74fee46d0344cf5d26b7a (diff)
downloadSensor-Watch-71e411d8609b940ebd42b6aeaaad7d1ce106a424.tar.gz
Sensor-Watch-71e411d8609b940ebd42b6aeaaad7d1ce106a424.tar.bz2
Sensor-Watch-71e411d8609b940ebd42b6aeaaad7d1ce106a424.zip
handle watch variant with red/blue LED
Diffstat (limited to 'watch-library/hw')
-rw-r--r--watch-library/hw/atmel_start_pins.h11
1 files changed, 8 insertions, 3 deletions
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)