File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ static bool inverted_reset = false;
61
61
#define SPIWIFI SPI
62
62
#endif
63
63
64
+ #ifndef NINA_GPIOIRQ
65
+ #define NINA_GPIOIRQ NINA_GPIO0
66
+ #endif
67
+
64
68
bool SpiDrv::initialized = false ;
65
69
66
70
__attribute__ ((weak)) void wifi_nina_feed_watchdog()
@@ -98,7 +102,6 @@ void SpiDrv::begin()
98
102
}
99
103
#endif
100
104
101
- SPIWIFI.begin ();
102
105
pinMode (SLAVESELECT, OUTPUT);
103
106
pinMode (SLAVEREADY, INPUT);
104
107
pinMode (SLAVERESET, OUTPUT);
@@ -112,7 +115,9 @@ void SpiDrv::begin()
112
115
delay (750 );
113
116
114
117
digitalWrite (NINA_GPIO0, LOW);
115
- pinMode (NINA_GPIO0, INPUT);
118
+ pinMode (NINA_GPIOIRQ, INPUT);
119
+
120
+ SPIWIFI.begin ();
116
121
117
122
#ifdef _DEBUG_
118
123
INIT_TRIGGER ()
@@ -594,7 +599,7 @@ void SpiDrv::sendCmd(uint8_t cmd, uint8_t numParam)
594
599
595
600
int SpiDrv::available ()
596
601
{
597
- return (digitalRead (NINA_GPIO0 ) != LOW);
602
+ return (digitalRead (NINA_GPIOIRQ ) != LOW);
598
603
}
599
604
600
605
SpiDrv spiDrv;
You can’t perform that action at this time.
0 commit comments