aboutsummaryrefslogtreecommitdiff
path: root/board/board-maple-mini.h
diff options
context:
space:
mode:
Diffstat (limited to 'board/board-maple-mini.h')
-rw-r--r--board/board-maple-mini.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/board/board-maple-mini.h b/board/board-maple-mini.h
index 92557e2..5e17118 100644
--- a/board/board-maple-mini.h
+++ b/board/board-maple-mini.h
@@ -4,8 +4,24 @@
#define STM32_PLLMUL_VALUE 9
#define STM32_HSECLK 8000000
-#define GPIO_USB_CLEAR_TO_ENABLE 9
+#define GPIO_LED_BASE GPIOB_BASE
#define GPIO_LED_SET_TO_EMIT 1
+#define GPIO_USB_BASE GPIOB_BASE
+#define GPIO_USB_CLEAR_TO_ENABLE 9
+#define GPIO_OTHER_BASE GPIOA_BASE
+
+/*
+ * Port A setup.
+ * PA0 - input with pull-up. AN0
+ * PA1 - input with pull-up. AN1
+ * PA11 - Push Pull output 10MHz 0 default (until USB enabled) (USBDM)
+ * PA12 - Push Pull output 10MHz 0 default (until USB enabled) (USBDP)
+ * ------------------------ Default
+ * PAx - input with pull-up
+ */
+#define VAL_GPIO_OTHER_ODR 0xFFFFE7FF
+#define VAL_GPIO_OTHER_CRL 0x88888888 /* PA7...PA0 */
+#define VAL_GPIO_OTHER_CRH 0x88811888 /* PA15...PA8 */
/*
* Port B setup.
@@ -14,12 +30,9 @@
* ------------------------ Default
* PBx - input with pull-up
*/
-#define VAL_GPIO_ODR 0xFFFFFFFF
-#define VAL_GPIO_CRL 0x88888838 /* PB7...PB0 */
-#define VAL_GPIO_CRH 0x88888838 /* PB15...PB8 */
-
-#define GPIO_USB_BASE GPIOB_BASE
-#define GPIO_LED_BASE GPIOB_BASE
+#define VAL_GPIO_LED_ODR 0xFFFFFFFF
+#define VAL_GPIO_LED_CRL 0x88888838 /* PB7...PB0 */
+#define VAL_GPIO_LED_CRH 0x88888838 /* PB15...PB8 */
#define RCC_ENR_IOP_EN (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN)
#define RCC_RSTR_IOP_RST (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPBRST)