aboutsummaryrefslogtreecommitdiff
path: root/stmhal/boards/STM32F4DISC
diff options
context:
space:
mode:
authorDamien George2014-03-30 12:30:35 +0100
committerDamien George2014-03-30 12:30:35 +0100
commit09d207785c77c85c957471b064ceebe0d2ee0a23 (patch)
tree6c34e11ee61c820c807db06d3d3cd69611c13ddb /stmhal/boards/STM32F4DISC
parent24a140a444cfb2ebda7f0b6d0a88be9461a99d03 (diff)
stmhal: Unify naming of HW config; make SD detect configurable.
All board config macros now begin with MICROPY_HW_. Renamed PYBv10 to PYBV10, since macros should be all uppercase. Made SDCARD_DETECT configurable in mpconfigport.h, so that the SD detect pin can be easily configured.
Diffstat (limited to 'stmhal/boards/STM32F4DISC')
-rw-r--r--stmhal/boards/STM32F4DISC/mpconfigboard.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/stmhal/boards/STM32F4DISC/mpconfigboard.h b/stmhal/boards/STM32F4DISC/mpconfigboard.h
index 2a58b27bd..3bfdfbfb8 100644
--- a/stmhal/boards/STM32F4DISC/mpconfigboard.h
+++ b/stmhal/boards/STM32F4DISC/mpconfigboard.h
@@ -15,19 +15,16 @@
#define MICROPY_HW_ENABLE_DAC (0)
// USRSW is pulled low. Pressing the button makes the input go high.
-#define USRSW_PIN (pin_A0)
-#define USRSW_PULL (GPIO_NOPULL)
-#define USRSW_EXTI_MODE (GPIO_MODE_IT_RISING)
-#define USRSW_PRESSED (1)
-
-/* LED */
-#define PYB_LED1 (pin_D14) // red
-#define PYB_LED2 (pin_D12) // green
-#define PYB_LED3 (pin_D13) // orange
-#define PYB_LED4 (pin_D15) // blue
-
-#define PYB_OTYPE (GPIO_MODE_OUTPUT_PP)
-
-#define PYB_LED_ON(pin) (pin->gpio->BSRRL = pin->pin_mask)
-#define PYB_LED_OFF(pin) (pin->gpio->BSRRH = pin->pin_mask)
+#define MICROPY_HW_USRSW_PIN (pin_A0)
+#define MICROPY_HW_USRSW_PULL (GPIO_NOPULL)
+#define MICROPY_HW_USRSW_EXTI_MODE (GPIO_MODE_IT_RISING)
+#define MICROPY_HW_USRSW_PRESSED (1)
+// LEDs
+#define MICROPY_HW_LED1 (pin_D14) // red
+#define MICROPY_HW_LED2 (pin_D12) // green
+#define MICROPY_HW_LED3 (pin_D13) // orange
+#define MICROPY_HW_LED4 (pin_D15) // blue
+#define MICROPY_HW_LED_OTYPE (GPIO_MODE_OUTPUT_PP)
+#define MICROPY_HW_LED_ON(pin) (pin->gpio->BSRRL = pin->pin_mask)
+#define MICROPY_HW_LED_OFF(pin) (pin->gpio->BSRRH = pin->pin_mask)