aboutsummaryrefslogtreecommitdiff
path: root/stmhal/boards/NETDUINO_PLUS_2
diff options
context:
space:
mode:
authorDamien George2015-12-12 15:02:02 +0000
committerDamien George2015-12-12 15:02:02 +0000
commitf7c4f9a64048bcbeaf36be8590b352bbef72aa08 (patch)
tree2694d59a1aba9b69f04cff32bc76a40243194751 /stmhal/boards/NETDUINO_PLUS_2
parent29e9db0c587145a8823227635734924896cdc4d1 (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/NETDUINO_PLUS_2')
-rw-r--r--stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h
index fba726596..a60986927 100644
--- a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h
+++ b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h
@@ -17,9 +17,6 @@
#define MICROPY_HW_ENABLE_TIMER (1)
#define MICROPY_HW_ENABLE_SERVO (1)
#define MICROPY_HW_ENABLE_DAC (0)
-#define MICROPY_HW_ENABLE_SPI1 (0)
-#define MICROPY_HW_ENABLE_SPI2 (1)
-#define MICROPY_HW_ENABLE_SPI3 (0)
#define MICROPY_HW_ENABLE_CAN (0)
// HSE is 25MHz
@@ -48,6 +45,12 @@
#define MICROPY_HW_I2C2_SCL (pin_B10)
#define MICROPY_HW_I2C2_SDA (pin_B11)
+// SPI busses
+#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)
+
// USRSW is pulled low. Pressing the button makes the input go high.
#define MICROPY_HW_USRSW_PIN (pin_B11)
#define MICROPY_HW_USRSW_PULL (GPIO_NOPULL)