[SX127x] Added PHY startReceive (#700)
This commit is contained in:
parent
9dd401e4a1
commit
5d365d4da7
2 changed files with 21 additions and 0 deletions
|
@ -423,6 +423,12 @@ int16_t SX127x::startReceive(uint8_t len, uint8_t mode) {
|
||||||
return(setMode(mode));
|
return(setMode(mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int16_t SX127x::startReceive(uint32_t mode, uint16_t irqFlags, uint16_t irqMask, size_t len) {
|
||||||
|
(void)irqFlags;
|
||||||
|
(void)irqMask;
|
||||||
|
return(startReceive((uint8_t)len, (uint8_t)mode));
|
||||||
|
}
|
||||||
|
|
||||||
void SX127x::setDio0Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir) {
|
void SX127x::setDio0Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir) {
|
||||||
_mod->attachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getIrq()), func, dir);
|
_mod->attachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getIrq()), func, dir);
|
||||||
}
|
}
|
||||||
|
|
|
@ -831,6 +831,21 @@ class SX127x: public PhysicalLayer {
|
||||||
*/
|
*/
|
||||||
int16_t startReceive(uint8_t len = 0, uint8_t mode = RADIOLIB_SX127X_RXCONTINUOUS);
|
int16_t startReceive(uint8_t len = 0, uint8_t mode = RADIOLIB_SX127X_RXCONTINUOUS);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Interrupt-driven receive method, implemented for compatibility with PhysicalLayer.
|
||||||
|
|
||||||
|
\param mode Receive mode to be used.
|
||||||
|
|
||||||
|
\param irqFlags Ignored.
|
||||||
|
|
||||||
|
\param irqMask Ignored.
|
||||||
|
|
||||||
|
\param len Expected length of packet to be received. Required for LoRa spreading factor 6.
|
||||||
|
|
||||||
|
\returns \ref status_codes
|
||||||
|
*/
|
||||||
|
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. This method reads len characters.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue