[Si443x] Added direct reception support
This commit is contained in:
parent
48a80b22f5
commit
1fc787c062
2 changed files with 22 additions and 0 deletions
|
@ -571,6 +571,14 @@ int16_t Si443x::getChipVersion() {
|
||||||
return(_mod->SPIgetRegValue(SI443X_REG_DEVICE_VERSION));
|
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) {
|
int16_t Si443x::setFrequencyRaw(float newFreq) {
|
||||||
// set mode to standby
|
// set mode to standby
|
||||||
int16_t state = standby();
|
int16_t state = standby();
|
||||||
|
|
|
@ -799,6 +799,20 @@ class Si443x: public PhysicalLayer {
|
||||||
*/
|
*/
|
||||||
int16_t getChipVersion();
|
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)
|
#if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
|
||||||
protected:
|
protected:
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue