Skip to content

Commit

Permalink
Merge pull request #21077 from Dlrk/sx126x-add-ifndef
Browse files Browse the repository at this point in the history
drivers/sx126x: add #ifndef for SX126X_PARAMS
  • Loading branch information
benpicco authored Dec 12, 2024
2 parents 51cd8b9 + 9fb41d9 commit cbd18b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/sx126x/include/sx126x_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ extern "C" {
# define SX126X_TX_PA_MODE
#endif

#define SX126X_PARAMS { .spi = SX126X_PARAM_SPI, \
#ifndef SX126X_PARAMS
# define SX126X_PARAMS { .spi = SX126X_PARAM_SPI, \
.nss_pin = SX126X_PARAM_SPI_NSS, \
.reset_pin = SX126X_PARAM_RESET, \
.busy_pin = SX126X_PARAM_BUSY, \
Expand All @@ -110,6 +111,7 @@ extern "C" {
.regulator = SX126X_PARAM_REGULATOR, \
SX126X_SET_RF_MODE \
SX126X_TX_PA_MODE}
#endif

/**@}*/

Expand Down

0 comments on commit cbd18b3

Please sign in to comment.