summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-06-25 12:02:33 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-06-25 12:02:33 +0200
commitf0ad73ff8fe391d2aac4bc437128618647d46b4f (patch)
treed122ee6e6b82f8c196ee64c85d1f68ebad6444fd /include
parent6bdbdaddc6d7629f51d5c12d7f3480afdf2234f5 (diff)
Nrf24: dynamic payload size and dynamic acks
Diffstat (limited to 'include')
-rw-r--r--include/driver/nrf24l01.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/include/driver/nrf24l01.h b/include/driver/nrf24l01.h
index 44f8205..82297bd 100644
--- a/include/driver/nrf24l01.h
+++ b/include/driver/nrf24l01.h
@@ -265,6 +265,30 @@ public:
* are enabled. See the datasheet for details.
*/
void toggleFeatures(void);
+
+ /**
+ * Enable dynamically-sized payloads
+ *
+ * This way you don't always have to send large packets just to send them
+ * once in a while. This enables dynamic payloads on ALL pipes.
+ *
+ */
+ void enableDynamicPayloads(void);
+
+ /**
+ * Enable dynamic ACKs (single write multicast or unicast) for chosen messages
+ *
+ * @note To enable full multicast or per-pipe multicast, use setAutoAck()
+ *
+ * @warning This MUST be called prior to attempting single write NOACK calls
+ * @code
+ * radio.enableDynamicAck();
+ * radio.write(&data,32,1); // Sends a payload with no acknowledgement requested
+ * radio.write(&data,32,0); // Sends a payload using auto-retry/autoACK
+ * @endcode
+ */
+ void enableDynamicAck();
+
/**
* Be sure to call openWritingPipe() first to set the destination
* of where to write to.
@@ -288,7 +312,7 @@ public:
* @endcode
* @return True if the payload was delivered successfully false if not
*/
- uint8_t write(const void *buf, uint8_t len, bool blocking);
+ uint8_t write(const void *buf, uint8_t len, bool await_ack, bool blocking);
/**
* Start listening on the pipes opened for reading.