tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/netlink/probe/mrkwifi1010.go (about) 1 //go:build arduino_mkrwifi1010 2 3 package probe 4 5 import ( 6 "machine" 7 8 "tinygo.org/x/drivers/netdev" 9 "tinygo.org/x/drivers/netlink" 10 "tinygo.org/x/drivers/wifinina" 11 ) 12 13 func Probe() (netlink.Netlinker, netdev.Netdever) { 14 15 cfg := wifinina.Config{ 16 // Configure SPI for 8Mhz, Mode 0, MSB First 17 Spi: machine.NINA_SPI, 18 Freq: 8 * 1e6, 19 Sdo: machine.NINA_SDO, 20 Sdi: machine.NINA_SDI, 21 Sck: machine.NINA_SCK, 22 // Device pins 23 Cs: machine.NINA_CS, 24 Ack: machine.NINA_ACK, 25 Gpio0: machine.NINA_GPIO0, 26 Resetn: machine.NINA_RESETN, 27 // mMKR 1010 resets High 28 ResetIsHigh: true, 29 } 30 31 nina := wifinina.New(&cfg) 32 netdev.UseNetdev(nina) 33 34 return nina, nina 35 }