1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

boards/cc2538: replace GPIO_UNDEF with SPI_CS_UNDEF

This commit is contained in:
Alexandre Abadie 2022-01-04 13:00:58 +01:00
parent c6c31f0361
commit 3c0e405f32
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
3 changed files with 18 additions and 3 deletions

View File

@ -39,7 +39,7 @@ static const spi_conf_t spi_config[] = {
.mosi_pin = GPIO_PIN(PORT_B, 1),
.miso_pin = GPIO_PIN(PORT_B, 3),
.sck_pin = GPIO_PIN(PORT_B, 2),
.cs_pin = GPIO_UNDEF
.cs_pin = SPI_CS_UNDEF,
},
{
.num = 1,

View File

@ -65,7 +65,7 @@ static const spi_conf_t spi_config[] = {
.mosi_pin = GPIO_PIN(2, 7),
.miso_pin = GPIO_PIN(0, 4),
.sck_pin = GPIO_PIN(1 ,5),
.cs_pin = GPIO_UNDEF
.cs_pin = SPI_CS_UNDEF,
}
};

View File

@ -220,6 +220,21 @@ typedef enum {
#define UART_TXBUF_SIZE (64)
#endif
/**
* @brief Define value for unused CS line
*/
#define SPI_CS_UNDEF (GPIO_UNDEF)
#ifndef DOXYGEN
/**
* @brief Overwrite the default spi_cs_t type definition
* @{
*/
#define HAVE_SPI_CS_T
typedef uint32_t spi_cs_t;
/** @} */
#endif
/**
* @name Override SPI mode settings
* @{
@ -282,7 +297,7 @@ typedef struct {
gpio_t mosi_pin; /**< pin used for MOSI */
gpio_t miso_pin; /**< pin used for MISO */
gpio_t sck_pin; /**< pin used for SCK */
gpio_t cs_pin; /**< pin used for CS */
spi_cs_t cs_pin; /**< pin used for CS */
} spi_conf_t;
/** @} */