bsp/atsam: Allow to use a decoder for SPI CS.

The SPI controller supports a decoder connected to the chip select
lines. This patch allows to use this mode.
This commit is contained in:
Christian Mauderer
2018-02-02 07:06:16 +01:00
parent 03fecae9c4
commit 538a0a836a
3 changed files with 54 additions and 26 deletions

View File

@@ -21,12 +21,17 @@
extern "C" {
#endif /* __cplusplus */
typedef struct {
uint8_t spi_peripheral_id;
const Pin *pins;
Spi *spi_regs;
size_t pin_count;
bool chip_select_decode;
} atsam_spi_config;
int spi_bus_register_atsam(
const char *bus_path,
uint8_t spi_peripheral_id,
Spi *spi_regs,
const Pin *pins,
size_t pin_count
const atsam_spi_config *config
);
#ifdef __cplusplus