Skip to content

Commit

Permalink
Add support for RAK3172 module by assuming its board description will…
Browse files Browse the repository at this point in the history
… have GENERIC_WLE5CCUX as a board. Fix stm32duino#7
  • Loading branch information
Miceuz committed Feb 13, 2023
1 parent d3aa385 commit 5b40838
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions src/BSP/radio_board_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@

// Is a TCXO present on the board?
#if !defined(LORAWAN_BOARD_HAS_TCXO)
#define LORAWAN_BOARD_HAS_TCXO 1U
#if defined(ARDUINO_NUCLEO_WL55JC1)
#define LORAWAN_BOARD_HAS_TCXO 1U

#elif defined(ARDUINO_GENERIC_WLE5CCUX)
#define LORAWAN_BOARD_HAS_TCXO 0U
#endif
#endif

// Is circuitry for DCDC (SMPS) mode present on the board?
Expand All @@ -72,12 +77,21 @@
#endif

#if !defined(LORAWAN_RFSWITCH_PINS)
#define LORAWAN_RFSWITCH_PINS PC3,PC4,PC5
#define LORAWAN_RFSWITCH_PIN_COUNT 3
#define LORAWAN_RFSWITCH_OFF_VALUES LOW,LOW,LOW
#define LORAWAN_RFSWITCH_RX_VALUES HIGH,HIGH,LOW
#define LORAWAN_RFSWITCH_RFO_LP_VALUES HIGH,HIGH,HIGH
#define LORAWAN_RFSWITCH_RFO_HP_VALUES HIGH,LOW,HIGH
#if defined(ARDUINO_NUCLEO_WL55JC1)
#define LORAWAN_RFSWITCH_PINS PC3, PC4, PC5
#define LORAWAN_RFSWITCH_PIN_COUNT 3
#define LORAWAN_RFSWITCH_OFF_VALUES LOW, LOW, LOW
#define LORAWAN_RFSWITCH_RX_VALUES HIGH, HIGH, LOW
#define LORAWAN_RFSWITCH_RFO_LP_VALUES HIGH, HIGH, HIGH
#define LORAWAN_RFSWITCH_RFO_HP_VALUES HIGH, LOW, HIGH
#elif defined(ARDUINO_GENERIC_WLE5CCUX)
#define LORAWAN_RFSWITCH_PINS PB8, PC13
#define LORAWAN_RFSWITCH_PIN_COUNT 2
#define LORAWAN_RFSWITCH_OFF_VALUES LOW, LOW
#define LORAWAN_RFSWITCH_RX_VALUES HIGH, LOW
#define LORAWAN_RFSWITCH_RFO_LP_VALUES LOW, HIGH
#define LORAWAN_RFSWITCH_RFO_HP_VALUES LOW, HIGH
#endif
#endif

/* Static variables --------------------------------------------------------*/
Expand Down

0 comments on commit 5b40838

Please sign in to comment.