1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

drivers/sx126x: add #ifndef for SX126X_PARAMS

To be able to use multiple sx126x connected to one mcu.
This commit is contained in:
Dirk 2024-12-12 13:08:04 +01:00 committed by GitHub
parent 51cd8b9e23
commit 9fb41d941e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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, \
@ -110,6 +111,7 @@ extern "C" {
.regulator = SX126X_PARAM_REGULATOR, \
SX126X_SET_RF_MODE \
SX126X_TX_PA_MODE}
#endif
/**@}*/