Factored out status-checking from write() into a public method

This commit is contained in:
maniacbug
2011-07-06 19:51:30 -07:00
parent c62224ff86
commit fbae441249
2 changed files with 33 additions and 13 deletions

12
RF24.h
View File

@@ -444,6 +444,18 @@ public:
*/
boolean isAckPayloadAvailable(void);
/**
* Call this when you get an interrupt to find out why
*
* Tells you what caused the interrupt, and clears the state of
* interrupts.
*
* @param[out] tx_ok The send was successful (TX_DS)
* @param[out] tx_fail The send failed, too many retries (MAX_RT)
* @param[out] rx_ready There is a message waiting to be read (RX_DS)
*/
void whatHappened(bool& tx_ok,bool& tx_fail,bool& rx);
/**
* Enable or disable auto-acknowlede packets
*