Skip to content

Commit 092a00c

Browse files
authored
Merge branch 'master' into copilot/sub-pr-1065
2 parents cef5a79 + da03891 commit 092a00c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

RF24.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,41 @@ void RF24::errHandler()
13091309

13101310
/******************************************************************/
13111311

1312+
//Similar to the previous write, clears the interrupt flags
1313+
bool RF24::write(const void* buf, uint8_t len, const bool multicast)
1314+
{
1315+
1316+
//Start Writing
1317+
#if defined(FAILURE_HANDLING) || defined(RF24_LINUX)
1318+
bool doRecovery = true;
1319+
do {
1320+
#endif
1321+
startFastWrite(buf, len, multicast);
1322+
#if defined(FAILURE_HANDLING) || defined(RF24_LINUX)
1323+
} while (errHandler(&doRecovery) < 0);
1324+
#endif
1325+
1326+
#if defined(FAILURE_HANDLING)
1327+
flush_tx();
1328+
flush_rx();
1329+
if (!failureFlushed) {
1330+
failureFlushed = true;
1331+
failureRecoveryAttempts++;
1332+
}
1333+
else {
1334+
#endif
1335+
errNotify();
1336+
#if defined(FAILURE_HANDLING)
1337+
failureFlushed = false;
1338+
}
1339+
ce(LOW);
1340+
#endif
1341+
}
1342+
1343+
#endif
1344+
1345+
/******************************************************************/
1346+
13121347
//Similar to the previous write, clears the interrupt flags
13131348
bool RF24::write(const void* buf, uint8_t len, const bool multicast)
13141349
{

0 commit comments

Comments
 (0)