1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/sx127x: use new driver params scheme

This commit is contained in:
Alexandre Abadie 2018-02-28 17:37:56 +01:00
parent 291922be34
commit 7cb9be9c8c

View File

@ -60,13 +60,15 @@ extern "C" {
#define SX127X_PARAM_DIO3 GPIO_PIN(1, 4) /* D5 */
#endif
#define SX127X_PARAMS_DEFAULT { .spi = SX127X_PARAM_SPI, \
#ifndef SX127X_PARAMS
#define SX127X_PARAMS { .spi = SX127X_PARAM_SPI, \
.nss_pin = SX127X_PARAM_SPI_NSS, \
.reset_pin = SX127X_PARAM_RESET, \
.dio0_pin = SX127X_PARAM_DIO0, \
.dio1_pin = SX127X_PARAM_DIO1, \
.dio2_pin = SX127X_PARAM_DIO2, \
.dio3_pin = SX127X_PARAM_DIO3 }
#endif
/**@}*/
/**
@ -74,11 +76,7 @@ extern "C" {
*/
static const sx127x_params_t sx127x_params[] =
{
#ifdef SX127X_PARAMS_BOARD
SX127X_PARAMS_BOARD,
#else
SX127X_PARAMS_DEFAULT,
#endif
SX127X_PARAMS
};
#ifdef __cplusplus