mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/sx127x: fix driver inconsistencies with semtech original driver
This commit is contained in:
parent
5fb8db4cfd
commit
e378802e33
@ -597,6 +597,7 @@ extern "C" {
|
||||
#define SX127X_RF_OPMODE_TRANSMITTER (0x03)
|
||||
#define SX127X_RF_OPMODE_SYNTHESIZER_RX (0x04)
|
||||
#define SX127X_RF_OPMODE_RECEIVER (0x05)
|
||||
#define SX127X_RF_OPMODE_RECEIVER_SINGLE (0x06)
|
||||
|
||||
/* RegBitRate (bits/sec) */
|
||||
#define SX127X_RF_BITRATEMSB_1200_BPS (0x68)
|
||||
|
@ -229,6 +229,12 @@ void sx127x_set_rx(sx127x_t *dev)
|
||||
break;
|
||||
case SX127X_MODEM_LORA:
|
||||
{
|
||||
sx127x_reg_write(dev, SX127X_REG_LR_INVERTIQ,
|
||||
((sx127x_reg_read(dev, SX127X_REG_LR_INVERTIQ) &
|
||||
SX127X_RF_LORA_INVERTIQ_TX_MASK &
|
||||
SX127X_RF_LORA_INVERTIQ_RX_MASK) |
|
||||
SX127X_RF_LORA_INVERTIQ_RX_ON |
|
||||
SX127X_RF_LORA_INVERTIQ_TX_OFF));
|
||||
sx127x_reg_write(dev, SX127X_REG_LR_INVERTIQ2,
|
||||
((dev->settings.lora.flags & SX127X_IQ_INVERTED_FLAG) ? SX127X_RF_LORA_INVERTIQ2_ON : SX127X_RF_LORA_INVERTIQ2_OFF));
|
||||
|
||||
@ -415,6 +421,9 @@ void sx127x_set_op_mode(const sx127x_t *dev, uint8_t op_mode)
|
||||
case SX127X_RF_OPMODE_STANDBY:
|
||||
DEBUG("[DEBUG] Set op mode: STANDBY\n");
|
||||
break;
|
||||
case SX127X_RF_OPMODE_RECEIVER_SINGLE:
|
||||
DEBUG("[DEBUG] Set op mode: RECEIVER SINGLE\n");
|
||||
break;
|
||||
case SX127X_RF_OPMODE_RECEIVER:
|
||||
DEBUG("[DEBUG] Set op mode: RECEIVER\n");
|
||||
break;
|
||||
@ -422,7 +431,7 @@ void sx127x_set_op_mode(const sx127x_t *dev, uint8_t op_mode)
|
||||
DEBUG("[DEBUG] Set op mode: TRANSMITTER\n");
|
||||
break;
|
||||
default:
|
||||
DEBUG("[DEBUG] Set op mode: UNKNOWN\n");
|
||||
DEBUG("[DEBUG] Set op mode: UNKNOWN (%d)\n", op_mode);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user