mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
machine, targets: ninafw support for arduino-nano33 and nano-rp2040 boards
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -63,6 +63,9 @@ var UART1 = &sercomUSART3
|
||||
// UART2 on the Arduino Nano 33 connects to the normal TX/RX pins.
|
||||
var UART2 = &sercomUSART5
|
||||
|
||||
// UART_NINA on the Arduino Nano 33 connects to the NINA HCI.
|
||||
var UART_NINA = &sercomUSART2
|
||||
|
||||
// I2C pins
|
||||
const (
|
||||
SDA_PIN Pin = A4 // SDA: SERCOM4/PAD[1]
|
||||
@@ -99,8 +102,16 @@ const (
|
||||
NINA_GPIO0 Pin = PA27
|
||||
NINA_RESETN Pin = PA08
|
||||
NINA_ACK Pin = PA28
|
||||
NINA_TX Pin = PA22
|
||||
NINA_RX Pin = PA23
|
||||
NINA_TX Pin = PA12
|
||||
NINA_RX Pin = PA13
|
||||
NINA_RTS Pin = PA14
|
||||
NINA_CTS Pin = PA15
|
||||
)
|
||||
|
||||
// NINA-W102 settings
|
||||
const (
|
||||
NINA_BAUDRATE = 912600
|
||||
NINA_RESET_INVERTED = true
|
||||
)
|
||||
|
||||
// I2S pins
|
||||
|
||||
@@ -93,6 +93,12 @@ const (
|
||||
NINA_RTS Pin = GPIO11
|
||||
)
|
||||
|
||||
// NINA-W102 settings
|
||||
const (
|
||||
NINA_BAUDRATE = 115200
|
||||
NINA_RESET_INVERTED = true
|
||||
)
|
||||
|
||||
// Onboard crystal oscillator frequency, in MHz.
|
||||
const (
|
||||
xoscFreq = 12 // MHz
|
||||
@@ -131,6 +137,9 @@ var (
|
||||
Buffer: NewRingBuffer(),
|
||||
Bus: rp.UART1,
|
||||
}
|
||||
|
||||
// UART_NINA on the Arduino Nano RP2040 connects to the NINA HCI.
|
||||
UART_NINA = UART1
|
||||
)
|
||||
|
||||
var DefaultUART = UART0
|
||||
|
||||
Reference in New Issue
Block a user