From d1e3691c3228cf56f495710fb22dd7894b938e5f Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 15 Jul 2023 19:40:07 +0200 Subject: [PATCH] Added notes about getPacketLength (#214) --- src/modules/CC1101/CC1101.h | 3 ++- src/modules/RF69/RF69.h | 3 ++- src/modules/SX126x/SX126x.h | 3 ++- src/modules/SX127x/SX127x.h | 3 ++- src/modules/SX128x/SX128x.h | 3 ++- src/modules/Si443x/Si443x.h | 3 ++- src/modules/nRF24/nRF24.h | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/modules/CC1101/CC1101.h b/src/modules/CC1101/CC1101.h index 4ca73c60..129aebd0 100644 --- a/src/modules/CC1101/CC1101.h +++ b/src/modules/CC1101/CC1101.h @@ -714,7 +714,8 @@ class CC1101: public PhysicalLayer { int16_t startReceive(uint32_t timeout, uint16_t irqFlags, uint16_t irqMask, size_t len); /*! - \brief Reads data received after calling startReceive method. + \brief Reads data received after calling startReceive method. When the packet length is not known in advance, + getPacketLength method must be called BEFORE calling readData! \param data Pointer to array to save the received binary data. \param len Number of bytes that will be read. When set to 0, the packet length will be retreived automatically. When more bytes than received are requested, only the number of bytes requested will be returned. diff --git a/src/modules/RF69/RF69.h b/src/modules/RF69/RF69.h index 5facc348..82426cad 100644 --- a/src/modules/RF69/RF69.h +++ b/src/modules/RF69/RF69.h @@ -712,7 +712,8 @@ class RF69: public PhysicalLayer { int16_t startReceive(uint32_t timeout, uint16_t irqFlags, uint16_t irqMask, size_t len); /*! - \brief Reads data received after calling startReceive method. + \brief Reads data received after calling startReceive method. When the packet length is not known in advance, + getPacketLength method must be called BEFORE calling readData! \param data Pointer to array to save the received binary data. \param len Number of bytes that will be read. When set to 0, the packet length will be retrieved automatically. When more bytes than received are requested, only the number of bytes requested will be returned. diff --git a/src/modules/SX126x/SX126x.h b/src/modules/SX126x/SX126x.h index 398a29e4..015215d1 100644 --- a/src/modules/SX126x/SX126x.h +++ b/src/modules/SX126x/SX126x.h @@ -671,7 +671,8 @@ class SX126x: public PhysicalLayer { uint16_t getIrqStatus(); /*! - \brief Reads data received after calling startReceive method. + \brief Reads data received after calling startReceive method. When the packet length is not known in advance, + getPacketLength method must be called BEFORE calling readData! \param data Pointer to array to save the received binary data. \param len Number of bytes that will be read. When set to 0, the packet length will be retrieved automatically. When more bytes than received are requested, only the number of bytes requested will be returned. diff --git a/src/modules/SX127x/SX127x.h b/src/modules/SX127x/SX127x.h index 7730b147..e52df4e2 100644 --- a/src/modules/SX127x/SX127x.h +++ b/src/modules/SX127x/SX127x.h @@ -820,7 +820,8 @@ class SX127x: public PhysicalLayer { int16_t startReceive(uint32_t mode, uint16_t irqFlags, uint16_t irqMask, size_t len); /*! - \brief Reads data that was received after calling startReceive method. This method reads len characters. + \brief Reads data that was received after calling startReceive method. When the packet length is not known in advance, + getPacketLength method must be called BEFORE calling readData! \param data Pointer to array to save the received binary data. \param len Number of bytes that will be read. When set to 0, the packet length will be retrieved automatically. When more bytes than received are requested, only the number of bytes requested will be returned. diff --git a/src/modules/SX128x/SX128x.h b/src/modules/SX128x/SX128x.h index cb22ac2f..1aa69115 100644 --- a/src/modules/SX128x/SX128x.h +++ b/src/modules/SX128x/SX128x.h @@ -562,7 +562,8 @@ class SX128x: public PhysicalLayer { uint16_t getIrqStatus(); /*! - \brief Reads data received after calling startReceive method. + \brief Reads data received after calling startReceive method. When the packet length is not known in advance, + getPacketLength method must be called BEFORE calling readData! \param data Pointer to array to save the received binary data. \param len Number of bytes that will be read. When set to 0, the packet length will be retrieved automatically. When more bytes than received are requested, only the number of bytes requested will be returned. diff --git a/src/modules/Si443x/Si443x.h b/src/modules/Si443x/Si443x.h index b4c3f7dc..463b6851 100644 --- a/src/modules/Si443x/Si443x.h +++ b/src/modules/Si443x/Si443x.h @@ -710,7 +710,8 @@ class Si443x: public PhysicalLayer { int16_t startReceive(uint32_t timeout, uint16_t irqFlags, uint16_t irqMask, size_t len); /*! - \brief Reads data that was received after calling startReceive method. This method reads len characters. + \brief Reads data that was received after calling startReceive method. When the packet length is not known in advance, + getPacketLength method must be called BEFORE calling readData! \param data Pointer to array to save the received binary data. \param len Number of bytes that will be read. When set to 0, the packet length will be retrieved automatically. When more bytes than received are requested, only the number of bytes requested will be returned. diff --git a/src/modules/nRF24/nRF24.h b/src/modules/nRF24/nRF24.h index 22a161ef..5a59877f 100644 --- a/src/modules/nRF24/nRF24.h +++ b/src/modules/nRF24/nRF24.h @@ -332,7 +332,8 @@ class nRF24: public PhysicalLayer { int16_t startReceive(uint32_t timeout, uint16_t irqFlags, uint16_t irqMask, size_t len); /*! - \brief Reads data received after calling startReceive method. + \brief Reads data received after calling startReceive method. When the packet length is not known in advance, + getPacketLength method must be called BEFORE calling readData! \param data Pointer to array to save the received binary data. \param len Number of bytes that will be received. Must be known in advance for binary transmissions. \returns \ref status_codes