Browse Source
Merge pull request #173 from oltaco/promicro-rfswitch
FIX: Set RfSwitch pins properly.
pull/177/head
ripplebiz
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
0 deletions
-
variants/promicro/target.cpp
|
|
|
@ -26,6 +26,7 @@ bool radio_init() { |
|
|
|
|
|
|
|
SPI.setPins(P_LORA_MISO, P_LORA_SCLK, P_LORA_MOSI); |
|
|
|
SPI.begin(); |
|
|
|
radio.setRfSwitchPins(SX126X_RXEN, SX126X_TXEN); |
|
|
|
int status = radio.begin(LORA_FREQ, LORA_BW, LORA_SF, LORA_CR, RADIOLIB_SX126X_SYNC_WORD_PRIVATE, LORA_TX_POWER, 8, tcxo); |
|
|
|
if (status == RADIOLIB_ERR_SPI_CMD_FAILED || status == RADIOLIB_ERR_SPI_CMD_INVALID) { |
|
|
|
#define SX126X_DIO3_TCXO_VOLTAGE (0.0f); |
|
|
|
|