diff options
| author | Damien George | 2014-03-30 12:30:35 +0100 |
|---|---|---|
| committer | Damien George | 2014-03-30 12:30:35 +0100 |
| commit | 09d207785c77c85c957471b064ceebe0d2ee0a23 (patch) | |
| tree | 6c34e11ee61c820c807db06d3d3cd69611c13ddb /stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h | |
| parent | 24a140a444cfb2ebda7f0b6d0a88be9461a99d03 (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/NETDUINO_PLUS_2/mpconfigboard.h')
| -rw-r--r-- | stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h index 948b88681..a01d37aea 100644 --- a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h +++ b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h @@ -19,19 +19,16 @@ #define MICROPY_HW_ENABLE_DAC (0) // USRSW is pulled low. Pressing the button makes the input go high. -#define USRSW_PIN (pin_B11) -#define USRSW_PULL (GPIO_NOPULL) -#define USRSW_EXTI_MODE (GPIO_MODE_IT_RISING) -#define USRSW_PRESSED (1) - -/* LED */ -#define PYB_LED1 (pin_A10) // Blue LED -#define PYB_LED2 (pin_C13) // White LED (aka Power) -#define PYB_LED3 (pin_A10) // Same as Led(1) -#define PYB_LED4 (pin_C13) // Same as Led(2) - -#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_B11) +#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_A10) // Blue LED +#define MICROPY_HW_LED2 (pin_C13) // White LED (aka Power) +#define MICROPY_HW_LED3 (pin_A10) // Same as Led(1) +#define MICROPY_HW_LED4 (pin_C13) // Same as Led(2) +#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) |
