diff options
| author | Damien George | 2014-04-20 19:06:15 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-20 19:06:15 +0100 |
| commit | ff91156d3495c3583dd4ced85ceea6243a1377a2 (patch) | |
| tree | 0267a87911faa1b0d618e845ac0419f673874185 /stmhal/boards | |
| parent | 2b925d76962cb325cf5cc49a1becff3cd707b4aa (diff) | |
stmhal: Improved configurability for I2C and SPI busses.
The HAL handles for the I2C/SPI objects are rather large, so we don't
want to unnecessarily include them.
Diffstat (limited to 'stmhal/boards')
| -rw-r--r-- | stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h | 5 | ||||
| -rw-r--r-- | stmhal/boards/PYBV10/mpconfigboard.h | 3 | ||||
| -rw-r--r-- | stmhal/boards/PYBV3/mpconfigboard.h | 3 | ||||
| -rw-r--r-- | stmhal/boards/PYBV4/mpconfigboard.h | 5 | ||||
| -rw-r--r-- | stmhal/boards/STM32F4DISC/mpconfigboard.h | 3 |
5 files changed, 16 insertions, 3 deletions
diff --git a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h index a626f4534..b70b56d9c 100644 --- a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h +++ b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h @@ -17,8 +17,9 @@ #define MICROPY_HW_ENABLE_TIMER (1) #define MICROPY_HW_ENABLE_SERVO (1) #define MICROPY_HW_ENABLE_DAC (0) -#define MICROPU_HW_ENABLE_I2C1 (0) -#define MICROPU_HW_ENABLE_SPI1 (0) +#define MICROPY_HW_ENABLE_I2C1 (0) +#define MICROPY_HW_ENABLE_SPI1 (0) +#define MICROPY_HW_ENABLE_SPI3 (0) // USRSW is pulled low. Pressing the button makes the input go high. #define MICROPY_HW_USRSW_PIN (pin_B11) diff --git a/stmhal/boards/PYBV10/mpconfigboard.h b/stmhal/boards/PYBV10/mpconfigboard.h index 9386c04a2..00c6a1acf 100644 --- a/stmhal/boards/PYBV10/mpconfigboard.h +++ b/stmhal/boards/PYBV10/mpconfigboard.h @@ -13,6 +13,9 @@ #define MICROPY_HW_ENABLE_TIMER (1) #define MICROPY_HW_ENABLE_SERVO (1) #define MICROPY_HW_ENABLE_DAC (1) +#define MICROPY_HW_ENABLE_I2C1 (1) +#define MICROPY_HW_ENABLE_SPI1 (1) +#define MICROPY_HW_ENABLE_SPI3 (0) // USRSW has no pullup or pulldown, and pressing the switch makes the input go low #define MICROPY_HW_USRSW_PIN (pin_B3) diff --git a/stmhal/boards/PYBV3/mpconfigboard.h b/stmhal/boards/PYBV3/mpconfigboard.h index f47a01bc4..02ad78a64 100644 --- a/stmhal/boards/PYBV3/mpconfigboard.h +++ b/stmhal/boards/PYBV3/mpconfigboard.h @@ -13,6 +13,9 @@ #define MICROPY_HW_ENABLE_TIMER (1) #define MICROPY_HW_ENABLE_SERVO (1) #define MICROPY_HW_ENABLE_DAC (0) +#define MICROPY_HW_ENABLE_I2C1 (1) +#define MICROPY_HW_ENABLE_SPI1 (1) +#define MICROPY_HW_ENABLE_SPI3 (0) // USRSW has no pullup or pulldown, and pressing the switch makes the input go low #define MICROPY_HW_USRSW_PIN (pin_A13) diff --git a/stmhal/boards/PYBV4/mpconfigboard.h b/stmhal/boards/PYBV4/mpconfigboard.h index 1846491c3..550f1633f 100644 --- a/stmhal/boards/PYBV4/mpconfigboard.h +++ b/stmhal/boards/PYBV4/mpconfigboard.h @@ -13,6 +13,9 @@ #define MICROPY_HW_ENABLE_TIMER (1) #define MICROPY_HW_ENABLE_SERVO (1) #define MICROPY_HW_ENABLE_DAC (1) +#define MICROPY_HW_ENABLE_I2C1 (1) +#define MICROPY_HW_ENABLE_SPI1 (1) +#define MICROPY_HW_ENABLE_SPI3 (0) // USRSW has no pullup or pulldown, and pressing the switch makes the input go low #define MICROPY_HW_USRSW_PIN (pin_B3) @@ -20,7 +23,7 @@ #define MICROPY_HW_USRSW_EXTI_MODE (GPIO_MODE_IT_FALLING) #define MICROPY_HW_USRSW_PRESSED (0) -// LEDs +// The pyboard has 4 LEDs #define MICROPY_HW_LED1 (pin_A13) // red #define MICROPY_HW_LED2 (pin_A14) // green #define MICROPY_HW_LED3 (pin_A15) // yellow diff --git a/stmhal/boards/STM32F4DISC/mpconfigboard.h b/stmhal/boards/STM32F4DISC/mpconfigboard.h index 3bfdfbfb8..c83bb162b 100644 --- a/stmhal/boards/STM32F4DISC/mpconfigboard.h +++ b/stmhal/boards/STM32F4DISC/mpconfigboard.h @@ -13,6 +13,9 @@ #define MICROPY_HW_ENABLE_TIMER (1) #define MICROPY_HW_ENABLE_SERVO (0) #define MICROPY_HW_ENABLE_DAC (0) +#define MICROPY_HW_ENABLE_I2C1 (1) +#define MICROPY_HW_ENABLE_SPI1 (1) +#define MICROPY_HW_ENABLE_SPI3 (0) // USRSW is pulled low. Pressing the button makes the input go high. #define MICROPY_HW_USRSW_PIN (pin_A0) |
