Skip to content

Commit 5171618

Browse files
bgoulddeadprogram
authored andcommitted
Added SPI1 connected to NINA-W102 chip on Arduino Nano 33 IOT
1 parent 4605cbb commit 5171618

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

src/machine/board_arduino_nano33.go

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ const (
4848
LED = D13
4949
)
5050

51-
// NINA-W102 Pins
52-
53-
const (
54-
NINA_MOSI Pin = PA12
55-
NINA_MISO Pin = PA13
56-
NINA_CS Pin = PA14
57-
NINA_SCK Pin = PA15
58-
NINA_GPIO0 Pin = PA27
59-
NINA_RESETN Pin = PA08
60-
NINA_ACK Pin = PA28
61-
)
62-
6351
// UART0 aka USBCDC pins
6452
const (
6553
USBCDC_DM_PIN Pin = PA24
@@ -131,6 +119,28 @@ var (
131119
}
132120
)
133121

122+
// NINA-W102 Pins
123+
const (
124+
NINA_MOSI Pin = PA12
125+
NINA_MISO Pin = PA13
126+
NINA_CS Pin = PA14
127+
NINA_SCK Pin = PA15
128+
NINA_GPIO0 Pin = PA27
129+
NINA_RESETN Pin = PA08
130+
NINA_ACK Pin = PA28
131+
NINA_TX Pin = PA22
132+
NINA_RX Pin = PA23
133+
)
134+
135+
// SPI1 is connected to the NINA-W102 chip on the Arduino Nano 33.
136+
var (
137+
SPI1 = SPI{
138+
Bus: sam.SERCOM2_SPI,
139+
SERCOM: 2,
140+
}
141+
NINA_SPI = SPI1
142+
)
143+
134144
// I2S pins
135145
const (
136146
I2S_SCK_PIN Pin = PA10

0 commit comments

Comments
 (0)