Skip to content
Snippets Groups Projects
Unverified Commit 0f07bccf authored by Alexandre Abadie's avatar Alexandre Abadie Committed by GitHub
Browse files

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

drivers/cc2420: apply unified driver params scheme
parents b6a43342 eb81eae0
No related branches found
No related tags found
No related merge requests found
...@@ -57,15 +57,17 @@ extern "C" { ...@@ -57,15 +57,17 @@ extern "C" {
#define CC2420_PARAM_RESET (GPIO_PIN(0, 3)) #define CC2420_PARAM_RESET (GPIO_PIN(0, 3))
#endif #endif
#define CC2420_PARAMS_DEFAULT {.spi = CC2420_PARAM_SPI, \ #ifndef CC2420_PARAMS
.spi_clk = CC2420_PARAM_SPI_CLK, \ #define CC2420_PARAMS { .spi = CC2420_PARAM_SPI, \
.pin_cs = CC2420_PARAM_CS, \ .spi_clk = CC2420_PARAM_SPI_CLK, \
.pin_fifo = CC2420_PARAM_FIFO, \ .pin_cs = CC2420_PARAM_CS, \
.pin_fifop = CC2420_PARAM_FIFOP, \ .pin_fifo = CC2420_PARAM_FIFO, \
.pin_cca = CC2420_PARAM_CCA, \ .pin_fifop = CC2420_PARAM_FIFOP, \
.pin_sfd = CC2420_PARAM_SFD, \ .pin_cca = CC2420_PARAM_CCA, \
.pin_vrefen = CC2420_PARAM_VREFEN, \ .pin_sfd = CC2420_PARAM_SFD, \
.pin_reset = CC2420_PARAM_RESET} .pin_vrefen = CC2420_PARAM_VREFEN, \
.pin_reset = CC2420_PARAM_RESET }
#endif
/**@}*/ /**@}*/
/** /**
...@@ -73,11 +75,7 @@ extern "C" { ...@@ -73,11 +75,7 @@ extern "C" {
*/ */
static const cc2420_params_t cc2420_params[] = static const cc2420_params_t cc2420_params[] =
{ {
#ifdef CC2420_PARAMS_BOARD CC2420_PARAMS
CC2420_PARAMS_BOARD,
#else
CC2420_PARAMS_DEFAULT,
#endif
}; };
#ifdef __cplusplus #ifdef __cplusplus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment