Skip to content

Commit

Permalink
Merge pull request #8692 from aabadie/pr/drivers/params/soft_spi
Browse files Browse the repository at this point in the history
drivers/soft_spi: use new driver params scheme
  • Loading branch information
miri64 committed Mar 7, 2018
2 parents 0da273d + 452920f commit dc989cb
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions drivers/soft_spi/include/soft_spi_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,17 @@ extern "C" {
#define SOFT_SPI_PARAM_CLK (GPIO_PIN(0, 1))
#endif

#define SOFT_SPI_PARAMS_DEFAULT {\
.miso_pin = SOFT_SPI_PARAM_MISO,\
.mosi_pin = SOFT_SPI_PARAM_MOSI,\
.clk_pin = SOFT_SPI_PARAM_CLK,\
}
#ifndef SOFT_SPI_PARAMS
#define SOFT_SPI_PARAMS { .miso_pin = SOFT_SPI_PARAM_MISO, \
.mosi_pin = SOFT_SPI_PARAM_MOSI, \
.clk_pin = SOFT_SPI_PARAM_CLK }
#endif

/**
* @brief Sotware SPI port descriptor array
*/
static soft_spi_conf_t soft_spi_config[] = {
#ifdef SOFT_SPI_PARAMS_CUSTOM
SOFT_SPI_PARAMS_CUSTOM,
#else
SOFT_SPI_PARAMS_DEFAULT,
#endif
SOFT_SPI_PARAMS,
};

#ifdef __cplusplus
Expand Down

0 comments on commit dc989cb

Please sign in to comment.