Created a non-blocking write and an example for how to use it.
This commit is contained in:
18
RF24.h
18
RF24.h
@@ -252,9 +252,6 @@ public:
|
||||
* getPayloadSize(). However, you can write less, and the remainder
|
||||
* will just be filled with zeroes.
|
||||
*
|
||||
* @todo Write a non-blocking write to support users who want to
|
||||
* check on progress separately or use an interrupt.
|
||||
*
|
||||
* @param buf Pointer to the data to be sent
|
||||
* @param len Number of bytes to be sent
|
||||
* @return True if the payload was delivered successfully false if not
|
||||
@@ -403,6 +400,21 @@ public:
|
||||
*/
|
||||
boolean available(uint8_t* pipe_num);
|
||||
|
||||
/**
|
||||
* Non-blocking write to the open writing pipe
|
||||
*
|
||||
* Just like write(), but it returns immediately. To find out what happened
|
||||
* to the send, catch the IRQ and then call whatHappened().
|
||||
*
|
||||
* @see write()
|
||||
* @see whatHappened()
|
||||
*
|
||||
* @param buf Pointer to the data to be sent
|
||||
* @param len Number of bytes to be sent
|
||||
* @return True if the payload was delivered successfully false if not
|
||||
*/
|
||||
void startWrite( const void* buf, uint8_t len );
|
||||
|
||||
/**
|
||||
* Enable custom payloads on the acknowledge packets
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user