From cf39d8b2c883bd9d91980f667fbd4316125fb256 Mon Sep 17 00:00:00 2001 From: deadprogram Date: Mon, 15 Jan 2024 20:56:50 +0100 Subject: targets: add ninafw pins and settings to Adafruit PyBadge board with AirLift Featherwing Signed-off-by: deadprogram --- src/machine/board_pybadge.go | 30 ++++++++++++++++++++++++++++++ targets/pybadge.json | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) 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", -- cgit v1.2.3