[MOD] Fixed swapped NSS/BUSY order (#716)
This commit is contained in:
parent
d5b1521c54
commit
0210e10a24
1 changed files with 3 additions and 3 deletions
|
@ -336,9 +336,6 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint
|
||||||
uint8_t debugBuff[RADIOLIB_STATIC_ARRAY_SIZE];
|
uint8_t debugBuff[RADIOLIB_STATIC_ARRAY_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// pull NSS low
|
|
||||||
this->digitalWrite(this->getCs(), LOW);
|
|
||||||
|
|
||||||
// ensure GPIO is low
|
// ensure GPIO is low
|
||||||
uint32_t start = this->millis();
|
uint32_t start = this->millis();
|
||||||
while(this->digitalRead(this->getGpio())) {
|
while(this->digitalRead(this->getGpio())) {
|
||||||
|
@ -349,6 +346,9 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pull NSS low
|
||||||
|
this->digitalWrite(this->getCs(), LOW);
|
||||||
|
|
||||||
// start transfer
|
// start transfer
|
||||||
this->SPIbeginTransaction();
|
this->SPIbeginTransaction();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue