[Si443x] Added direct reception support

This commit is contained in:
jgromes 2021-06-14 21:15:27 +02:00
parent 48a80b22f5
commit 1fc787c062
2 changed files with 22 additions and 0 deletions

View file

@ -571,6 +571,14 @@ int16_t Si443x::getChipVersion() {
return(_mod->SPIgetRegValue(SI443X_REG_DEVICE_VERSION));
}
void Si443x::setDirectAction(void (*func)(void)) {
setIrqAction(func);
}
void Si443x::readBit(RADIOLIB_PIN_TYPE pin) {
updateDirectBuffer((uint8_t)digitalRead(pin));
}
int16_t Si443x::setFrequencyRaw(float newFreq) {
// set mode to standby
int16_t state = standby();

View file

@ -799,6 +799,20 @@ class Si443x: public PhysicalLayer {
*/
int16_t getChipVersion();
/*!
\brief Set interrupt service routine function to call when data bit is receveid in direct mode.
\param func Pointer to interrupt service routine.
*/
void setDirectAction(void (*func)(void));
/*!
\brief Function to read and process data bit in direct reception mode.
\param pin Pin on which to read.
*/
void readBit(RADIOLIB_PIN_TYPE pin);
#if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
protected:
#endif