[SX128x] Added IQ inversion (#724)
This commit is contained in:
parent
9dde85598b
commit
9d3a2bb72f
2 changed files with 22 additions and 0 deletions
|
@ -1283,6 +1283,19 @@ uint8_t SX128x::randomByte() {
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int16_t SX128x::invertIQ(bool invertIQ) {
|
||||||
|
if(getPacketType() != RADIOLIB_SX128X_PACKET_TYPE_LORA) {
|
||||||
|
return(RADIOLIB_ERR_WRONG_MODEM);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t invert = RADIOLIB_SX128X_LORA_IQ_STANDARD;
|
||||||
|
if(invertIQ) {
|
||||||
|
invert = RADIOLIB_SX128X_LORA_IQ_INVERTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(setPacketParamsLoRa(_preambleLengthLoRa, _headerType, _payloadLen, _crcLoRa, invert));
|
||||||
|
}
|
||||||
|
|
||||||
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
|
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
|
||||||
void SX128x::setDirectAction(void (*func)(void)) {
|
void SX128x::setDirectAction(void (*func)(void)) {
|
||||||
// SX128x is unable to perform direct mode reception
|
// SX128x is unable to perform direct mode reception
|
||||||
|
|
|
@ -829,6 +829,15 @@ class SX128x: public PhysicalLayer {
|
||||||
*/
|
*/
|
||||||
uint8_t randomByte();
|
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)
|
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
|
||||||
/*!
|
/*!
|
||||||
\brief Dummy method, to ensure PhysicalLayer compatibility.
|
\brief Dummy method, to ensure PhysicalLayer compatibility.
|
||||||
|
|
Loading…
Add table
Reference in a new issue