[SX126x] Added IQ inversion
This commit is contained in:
parent
13248b6eab
commit
9dde85598b
2 changed files with 22 additions and 0 deletions
|
@ -1419,6 +1419,19 @@ uint8_t SX126x::randomByte() {
|
|||
return(randByte);
|
||||
}
|
||||
|
||||
int16_t SX126x::invertIQ(bool invertIQ) {
|
||||
if(getPacketType() != RADIOLIB_SX126X_PACKET_TYPE_LORA) {
|
||||
return(RADIOLIB_ERR_WRONG_MODEM);
|
||||
}
|
||||
|
||||
uint8_t invert = RADIOLIB_SX126X_LORA_IQ_STANDARD;
|
||||
if(invertIQ) {
|
||||
invert = RADIOLIB_SX126X_LORA_IQ_INVERTED;
|
||||
}
|
||||
|
||||
return(setPacketParams(_preambleLength, _crcType, _implicitLen, _headerType, invert));
|
||||
}
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
|
||||
void SX126x::setDirectAction(void (*func)(void)) {
|
||||
setDio1Action(func);
|
||||
|
|
|
@ -1059,6 +1059,15 @@ class SX126x: public PhysicalLayer {
|
|||
*/
|
||||
uint8_t randomByte();
|
||||
|
||||
/*!
|
||||
\brief Enable/disable inversion of the I and Q signals
|
||||
|
||||
\param invertIQ QI inversion enabled (true) or disabled (false);
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t invertIQ(bool invertIQ);
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
|
||||
/*!
|
||||
\brief Set interrupt service routine function to call when data bit is receveid in direct mode.
|
||||
|
|
Loading…
Add table
Reference in a new issue