File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ //go:build ninafw
2+
3+ package bluetooth
4+
5+ import (
6+ "machine"
7+ )
8+
9+ func init () {
10+ NINA_SCK = machine .NINA_SCK
11+ NINA_SDO = machine .NINA_SDO
12+ NINA_SDI = machine .NINA_SDI
13+ NINA_CS = machine .NINA_CS
14+ NINA_ACK = machine .NINA_ACK
15+ NINA_GPIO0 = machine .NINA_GPIO0
16+ NINA_RESETN = machine .NINA_RESETN
17+ NINA_BAUDRATE = machine .NINA_BAUDRATE
18+ NINA_RESET_INVERTED = machine .NINA_RESET_INVERTED
19+ NINA_SOFT_FLOWCONTROL = machine .NINA_SOFT_FLOWCONTROL
20+ }
Original file line number Diff line number Diff line change @@ -11,6 +11,28 @@ import (
1111
1212const maxConnections = 1
1313
14+ var (
15+ // NINA-W102 Pins
16+ NINA_SCK machine.Pin
17+ NINA_SDO machine.Pin
18+ NINA_SDI machine.Pin
19+
20+ NINA_CS machine.Pin
21+ NINA_ACK machine.Pin
22+ NINA_GPIO0 machine.Pin
23+ NINA_RESETN machine.Pin
24+
25+ NINA_TX machine.Pin
26+ NINA_RX machine.Pin
27+ NINA_CTS machine.Pin
28+ NINA_RTS machine.Pin
29+
30+ // NINA-W102 settings
31+ NINA_BAUDRATE = 115200
32+ NINA_RESET_INVERTED = true
33+ NINA_SOFT_FLOWCONTROL = false
34+ )
35+
1436// Adapter represents the UART connection to the NINA fw.
1537type Adapter struct {
1638 hci * hci
You can’t perform that action at this time.
0 commit comments