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

Merge pull request #8701 from aabadie/pr/drivers/params/cc2420

drivers/cc2420: apply unified driver params scheme
This commit is contained in:
Alexandre Abadie 2018-03-21 07:27:50 +01:00 committed by GitHub
commit 0f07bccfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,15 +57,17 @@ extern "C" {
#define CC2420_PARAM_RESET (GPIO_PIN(0, 3))
#endif
#define CC2420_PARAMS_DEFAULT {.spi = CC2420_PARAM_SPI, \
.spi_clk = CC2420_PARAM_SPI_CLK, \
.pin_cs = CC2420_PARAM_CS, \
.pin_fifo = CC2420_PARAM_FIFO, \
.pin_fifop = CC2420_PARAM_FIFOP, \
.pin_cca = CC2420_PARAM_CCA, \
.pin_sfd = CC2420_PARAM_SFD, \
.pin_vrefen = CC2420_PARAM_VREFEN, \
.pin_reset = CC2420_PARAM_RESET}
#ifndef CC2420_PARAMS
#define CC2420_PARAMS { .spi = CC2420_PARAM_SPI, \
.spi_clk = CC2420_PARAM_SPI_CLK, \
.pin_cs = CC2420_PARAM_CS, \
.pin_fifo = CC2420_PARAM_FIFO, \
.pin_fifop = CC2420_PARAM_FIFOP, \
.pin_cca = CC2420_PARAM_CCA, \
.pin_sfd = CC2420_PARAM_SFD, \
.pin_vrefen = CC2420_PARAM_VREFEN, \
.pin_reset = CC2420_PARAM_RESET }
#endif
/**@}*/
/**
@ -73,11 +75,7 @@ extern "C" {
*/
static const cc2420_params_t cc2420_params[] =
{
#ifdef CC2420_PARAMS_BOARD
CC2420_PARAMS_BOARD,
#else
CC2420_PARAMS_DEFAULT,
#endif
CC2420_PARAMS
};
#ifdef __cplusplus