mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-05-03 23:24:56 -04:00
Remove old debug code and add waitOnBusy timeout to SX1262
This commit is contained in:
parent
b96559d799
commit
a1793043b2
2 changed files with 5 additions and 7 deletions
|
@ -190,9 +190,13 @@ void sx126x::loraMode() {
|
|||
}
|
||||
|
||||
void sx126x::waitOnBusy() {
|
||||
unsigned long time = millis();
|
||||
if (_busy != -1) {
|
||||
while (digitalRead(_busy) == HIGH)
|
||||
{
|
||||
if (millis() >= (time + 100)) {
|
||||
break;
|
||||
}
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue