cortexelf-v1: Add buttons
[fw/altos] / src / cortexelf-v1 / ao_pins.h
index 91555cd4b67906542e46fb98bc332df178b901a0..d39f402234d915c0434a414c1279fd2e071bdfb4 100644 (file)
@@ -38,7 +38,7 @@
 
 /* Run APB1 at HCLK/1 */
 #define AO_APB1_PRESCALER      1
-#define AO_RCC_CFGR_PPRE1_DIV  STM_RCC_CFGR_PPRE2_DIV_1
+#define AO_RCC_CFGR_PPRE1_DIV  STM_RCC_CFGR_PPRE1_DIV_1
 
 /* Run APB2 at HCLK/1 */
 #define AO_APB2_PRESCALER      1
 #define AO_PS2_DATA_BIT                8
 
 #define HAS_SERIAL_1           1
-#define USE_SERIAL_1_STDIN     0
+#define USE_SERIAL_1_STDIN     1
 #define SERIAL_1_PB6_PB7       1
 #define SERIAL_1_PA9_PA10      0
 
 #define HAS_SERIAL_2           1
-#define USE_SERIAL_2_STDIN     0
+#define USE_SERIAL_2_STDIN     1
 #define SERIAL_2_PA2_PA3       0
 #define SERIAL_2_PD5_PD6       1
 
 #define AO_SDCARD_SPI_MISO_PIN 3
 #define AO_SDCARD_SPI_MOSI_PIN 4
 
+/* Buttons */
+
+#define AO_EVENT       1
+
+#define AO_BUTTON_COUNT                4
+#define AO_BUTTON_MODE         AO_EXTI_MODE_PULL_DOWN
+
+/* INPUT */
+#define AO_BUTTON_0_PORT       (&stm_gpioc)
+#define AO_BUTTON_0            8
+
+/* MP */
+#define AO_BUTTON_1_PORT       (&stm_gpioc)
+#define AO_BUTTON_1            9
+
+/* RUN */
+#define AO_BUTTON_2_PORT       (&stm_gpioc)
+#define AO_BUTTON_2            10
+
+/* LOAD */
+#define AO_BUTTON_3_PORT       (&stm_gpioc)
+#define AO_BUTTON_3            11
+
+
 #endif /* _AO_PINS_H_ */