aboutsummaryrefslogtreecommitdiff
path: root/stmhal/boards/NETDUINO_PLUS_2
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/boards/NETDUINO_PLUS_2')
-rw-r--r--stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h38
-rw-r--r--stmhal/boards/NETDUINO_PLUS_2/pins.csv28
2 files changed, 66 insertions, 0 deletions
diff --git a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h
new file mode 100644
index 000000000..9bc5149ec
--- /dev/null
+++ b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h
@@ -0,0 +1,38 @@
+#define NETDUINO_PLUS_2
+
+#define MICROPY_HW_BOARD_NAME "NetduinoPlus2"
+
+#define MICROPY_HW_HAS_SWITCH (1)
+
+// On the netuino, the sdcard appears to be wired up as a 1-bit
+// SPI, so the driver needs to be converted to support that before
+// we can turn this on.
+#define MICROPY_HW_HAS_SDCARD (0)
+#define MICROPY_HW_HAS_MMA7660 (0)
+#define MICROPY_HW_HAS_LIS3DSH (0)
+#define MICROPY_HW_HAS_LCD (0)
+#define MICROPY_HW_HAS_WLAN (0)
+#define MICROPY_HW_ENABLE_RNG (1)
+#define MICROPY_HW_ENABLE_RTC (0)
+#define MICROPY_HW_ENABLE_TIMER (1)
+#define MICROPY_HW_ENABLE_SERVO (1)
+#define MICROPY_HW_ENABLE_AUDIO (0)
+
+// USRSW is pulled low. Pressing the button makes the input go high.
+#define USRSW_PIN (pin_B11)
+#define USRSW_PUPD (GPIO_PuPd_NOPULL)
+#define USRSW_EXTI_EDGE (EXTI_Trigger_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_OType_PP)
+
+#define PYB_LED_ON(pin) (pin->gpio->BSRRL = pin->pin_mask)
+#define PYB_LED_OFF(pin) (pin->gpio->BSRRH = pin->pin_mask)
+
+#define HSE_VALUE (25000000)
diff --git a/stmhal/boards/NETDUINO_PLUS_2/pins.csv b/stmhal/boards/NETDUINO_PLUS_2/pins.csv
new file mode 100644
index 000000000..f9b94a6c8
--- /dev/null
+++ b/stmhal/boards/NETDUINO_PLUS_2/pins.csv
@@ -0,0 +1,28 @@
+D0,PC7
+D1,PC6
+D2,PA3
+D3,PA2
+D4,PB12
+D5,PB8
+D6,PB9
+D7,PA1
+D8,PA0
+D9,PA6
+D10,PB10
+D11,PB15
+D12,PB14
+D13,PB13
+A0,PC0
+A1,PC1
+A2,PC2
+A3,PC3
+A4,PC4
+A5,PC5
+LED,PA10
+SW,PB11
+PWR_LED,PC13
+PWR_SD,PB1
+PWR_HDR,PB2
+PWR_ETH,PC15
+RST_ETH,PD2
+