[RF69] Added missing calls to yield
This commit is contained in:
parent
7fec5e629b
commit
901783cf39
1 changed files with 4 additions and 0 deletions
|
@ -117,6 +117,8 @@ int16_t RF69::transmit(uint8_t* data, size_t len, uint8_t addr) {
|
||||||
// wait for transmission end or timeout
|
// wait for transmission end or timeout
|
||||||
uint32_t start = micros();
|
uint32_t start = micros();
|
||||||
while(!digitalRead(_mod->getIrq())) {
|
while(!digitalRead(_mod->getIrq())) {
|
||||||
|
yield();
|
||||||
|
|
||||||
if(micros() - start > timeout) {
|
if(micros() - start > timeout) {
|
||||||
standby();
|
standby();
|
||||||
clearIRQFlags();
|
clearIRQFlags();
|
||||||
|
@ -144,6 +146,8 @@ int16_t RF69::receive(uint8_t* data, size_t len) {
|
||||||
// wait for packet reception or timeout
|
// wait for packet reception or timeout
|
||||||
uint32_t start = micros();
|
uint32_t start = micros();
|
||||||
while(!digitalRead(_mod->getIrq())) {
|
while(!digitalRead(_mod->getIrq())) {
|
||||||
|
yield();
|
||||||
|
|
||||||
if(micros() - start > timeout) {
|
if(micros() - start > timeout) {
|
||||||
standby();
|
standby();
|
||||||
clearIRQFlags();
|
clearIRQFlags();
|
||||||
|
|
Loading…
Add table
Reference in a new issue