aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wirish/boards/maple/include/board/board.h10
-rw-r--r--wirish/boards/maple_RET6/include/board/board.h7
-rw-r--r--wirish/boards/maple_mini/include/board/board.h6
-rw-r--r--wirish/boards/maple_native/include/board/board.h11
-rw-r--r--wirish/boards/olimex_stm32_h103/include/board/board.h7
5 files changed, 41 insertions, 0 deletions
diff --git a/wirish/boards/maple/include/board/board.h b/wirish/boards/maple/include/board/board.h
index 72a4282..e675806 100644
--- a/wirish/boards/maple/include/board/board.h
+++ b/wirish/boards/maple/include/board/board.h
@@ -94,4 +94,14 @@
#define BOARD_USB_DISC_DEV GPIOC
#define BOARD_USB_DISC_BIT 12
+/* Pin aliases: these give the GPIO port/bit for each pin as an
+ * enum. These are optional, but recommended. They make it easier to
+ * write code using low-level GPIO functionality. */
+enum {
+ PA3, PA2, PA0, PA1, PB5, PB6, PA8, PA9, PA10, PB7, PA4, PA7, PA6, PA5, PB8,
+ PC0, PC1, PC2, PC3, PC4, PC5, PC13, PC14, PC15, PB9, PD2, PC10, PB0, PB1,
+ PB10, PB11, PB12, PB13, PB14, PB15, PC6, PC7, PC8, PC9, PA13, PA14, PA15,
+ PB3, PB4
+};
+
#endif
diff --git a/wirish/boards/maple_RET6/include/board/board.h b/wirish/boards/maple_RET6/include/board/board.h
index 05b9031..7c6851b 100644
--- a/wirish/boards/maple_RET6/include/board/board.h
+++ b/wirish/boards/maple_RET6/include/board/board.h
@@ -86,4 +86,11 @@
#define BOARD_USB_DISC_DEV GPIOC
#define BOARD_USB_DISC_BIT 12
+enum {
+ PA3, PA2, PA0, PA1, PB5, PB6, PA8, PA9, PA10, PB7, PA4, PA7, PA6, PA5, PB8,
+ PC0, PC1, PC2, PC3, PC4, PC5, PC13, PC14, PC15, PB9, PD2, PC10, PB0, PB1,
+ PB10, PB11, PB12, PB13, PB14, PB15, PC6, PC7, PC8, PC9, PA13, PA14, PA15,
+ PB3, PB4
+};
+
#endif
diff --git a/wirish/boards/maple_mini/include/board/board.h b/wirish/boards/maple_mini/include/board/board.h
index bfba46d..ac2e5e5 100644
--- a/wirish/boards/maple_mini/include/board/board.h
+++ b/wirish/boards/maple_mini/include/board/board.h
@@ -74,4 +74,10 @@
#define BOARD_USB_DISC_DEV GPIOB
#define BOARD_USB_DISC_BIT 9
+enum {
+ PB11, PB10, PB2, PB0, PA7, PA6, PA5, PA4, PA3, PA2, PA1, PA0, PC15, PC14,
+ PC13, PB7, PB6, PB5, PB4, PB3, PA15, PA14, PA13, PA12, PA11, PA10, PA9,
+ PA8, PB15, PB14, PB13, PB12, PB8, PB1
+};
+
#endif
diff --git a/wirish/boards/maple_native/include/board/board.h b/wirish/boards/maple_native/include/board/board.h
index f8ffd86..b63aace 100644
--- a/wirish/boards/maple_native/include/board/board.h
+++ b/wirish/boards/maple_native/include/board/board.h
@@ -81,4 +81,15 @@
#define BOARD_USB_DISC_DEV GPIOB
#define BOARD_USB_DISC_BIT 8
+enum {
+ PB10, PB11, PB12, PB13, PB14, PB15, PG15, PC0, PC1, PC2, PC3, PC4, PC5,
+ PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PA8, PA9, PA10,
+ PB9, PD2, PD3, PD6, PG11, PG12, PG13, PG14, PG8, PG7, PG6, PB5, PB6, PB7,
+ PF11, PF6, PF7, PF8, PF9, PF10, PB1, PB0, PA0, PA1, PA2, PA3, PA4, PA5,
+ PA6, PA7, PF0, PD11, PD14, PF1, PD12, PD15, PF2, PD13, PD0, PF3, PE3, PD1,
+ PF4, PE4, PE7, PF5, PE5, PE8, PF12, PE6, PE9, PF13, PE10, PF14, PG9, PE11,
+ PF15, PG10, PE12, PG0, PD5, PE13, PG1, PD4, PE14, PG2, PE1, PE15, PG3, PE0,
+ PD8, PG4, PD9, PG5, PD10, PA13, PA14, PA15, PB3, PB4
+};
+
#endif
diff --git a/wirish/boards/olimex_stm32_h103/include/board/board.h b/wirish/boards/olimex_stm32_h103/include/board/board.h
index b312e26..a9f0e7b 100644
--- a/wirish/boards/olimex_stm32_h103/include/board/board.h
+++ b/wirish/boards/olimex_stm32_h103/include/board/board.h
@@ -89,4 +89,11 @@
#define BOARD_USB_DISC_DEV GPIOC
#define BOARD_USB_DISC_BIT 11
+enum {
+ PA11, PA8, PA12, PA9, PA10, PC10, PC11, PC12, PD2, PB5, PB6, PA6, PB7, PB8,
+ PB9, PA5, PC0, PC1, PB0, PA7, PC13, PB1, PC2, PA0, PA2, PA1, PC3, PA3, PA4,
+ PC4, PC5, PB10, PB11, PB13, PB12, PB14, PB15, PC6, PC7, PC8, PC9, PA13,
+ PA14, PA15, PB3, PB4
+};
+
#endif