diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-12-12 15:02:02 +0000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-12-12 15:02:02 +0000 |
| commit | f7c4f9a64048bcbeaf36be8590b352bbef72aa08 (patch) | |
| tree | 2694d59a1aba9b69f04cff32bc76a40243194751 /stmhal/boards/ESPRUINO_PICO | |
| parent | 29e9db0c587145a8823227635734924896cdc4d1 (diff) | |
stmhal: For SPI config, use HW_SPIx_SCK instead of HW_ENABLE_SPIx.
Previously, SPI was configured by a board defining MICROPY_HW_ENABLE_SPIx
to 0 or 1. Now, the board should define MICROPY_HW_SPIx_SCK, MISO, MOSI
and NSS. This makes it the same as how I2C is configured.
Diffstat (limited to 'stmhal/boards/ESPRUINO_PICO')
| -rw-r--r-- | stmhal/boards/ESPRUINO_PICO/mpconfigboard.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/stmhal/boards/ESPRUINO_PICO/mpconfigboard.h b/stmhal/boards/ESPRUINO_PICO/mpconfigboard.h index 221c0ab1f..e7a338d3e 100644 --- a/stmhal/boards/ESPRUINO_PICO/mpconfigboard.h +++ b/stmhal/boards/ESPRUINO_PICO/mpconfigboard.h @@ -12,9 +12,6 @@ #define MICROPY_HW_ENABLE_TIMER (1) #define MICROPY_HW_ENABLE_SERVO (1) #define MICROPY_HW_ENABLE_DAC (0) -#define MICROPY_HW_ENABLE_SPI1 (1) -#define MICROPY_HW_ENABLE_SPI2 (1) -#define MICROPY_HW_ENABLE_SPI3 (0) #define MICROPY_HW_ENABLE_CAN (0) // Pico has an 8 MHz HSE and the F401 does 84 MHz max @@ -44,6 +41,16 @@ #define MICROPY_HW_I2C3_SCL (pin_A8) #define MICROPY_HW_I2C3_SDA (pin_B4) +// SPI busses +#define MICROPY_HW_SPI1_NSS (pin_A4) +#define MICROPY_HW_SPI1_SCK (pin_A5) +#define MICROPY_HW_SPI1_MISO (pin_A6) +#define MICROPY_HW_SPI1_MOSI (pin_A7) +#define MICROPY_HW_SPI2_NSS (pin_B12) +#define MICROPY_HW_SPI2_SCK (pin_B13) +#define MICROPY_HW_SPI2_MISO (pin_B14) +#define MICROPY_HW_SPI2_MOSI (pin_B15) + // BTN1 has no pullup or pulldown; it is active high and broken out on a header #define MICROPY_HW_USRSW_PIN (pin_C13) #define MICROPY_HW_USRSW_PULL (GPIO_PULLDOWN) |
