aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordeadprogram <[email protected]>2024-01-15 20:56:50 +0100
committerBCG <[email protected]>2024-01-15 19:34:05 -0500
commitcf39d8b2c883bd9d91980f667fbd4316125fb256 (patch)
tree4d8058ee48632cd0f0fa5bd52ff127be45c4ed09
parentd92a31b440b894382bafd8a66334072bf3081b44 (diff)
downloadtinygo-cf39d8b2c883bd9d91980f667fbd4316125fb256.tar.gz
tinygo-cf39d8b2c883bd9d91980f667fbd4316125fb256.zip
targets: add ninafw pins and settings to Adafruit PyBadge board with AirLift Featherwing
Signed-off-by: deadprogram <[email protected]>
-rw-r--r--src/machine/board_pybadge.go30
-rw-r--r--targets/pybadge.json2
2 files changed, 31 insertions, 1 deletions
diff --git a/src/machine/board_pybadge.go b/src/machine/board_pybadge.go
index fa8be2a75..30d44d164 100644
--- a/src/machine/board_pybadge.go
+++ b/src/machine/board_pybadge.go
@@ -130,3 +130,33 @@ var (
usb_VID uint16 = 0x239A
usb_PID uint16 = 0x8033
)
+
+// NINA-W102 settings when using AirLift WiFi FeatherWing
+const (
+ NINA_BAUDRATE = 115200
+ NINA_RESET_INVERTED = true
+ NINA_SOFT_FLOWCONTROL = true
+)
+
+const (
+ NINA_CS = D13
+ NINA_ACK = D11
+ NINA_GPIO0 = D10
+ NINA_RESETN = D12
+
+ // pins used for the ESP32 connection do not allow hardware
+ // flow control, which is required. have to emulate with software.
+ NINA_TX = UART_TX_PIN
+ NINA_RX = UART_RX_PIN
+ NINA_CTS = NINA_ACK
+ NINA_RTS = NINA_GPIO0
+
+ NINA_SDO = SPI0_SDO_PIN
+ NINA_SDI = SPI0_SDI_PIN
+ NINA_SCK = SPI0_SCK_PIN
+)
+
+var (
+ NINA_SPI = SPI0
+ UART_NINA = UART1
+)
diff --git a/targets/pybadge.json b/targets/pybadge.json
index 232a1bab2..b41f87ada 100644
--- a/targets/pybadge.json
+++ b/targets/pybadge.json
@@ -1,6 +1,6 @@
{
"inherits": ["atsamd51j19a"],
- "build-tags": ["pybadge"],
+ "build-tags": ["pybadge", "ninafw"],
"serial": "usb",
"flash-1200-bps-reset": "true",
"flash-method": "msd",