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:
parent
c6c31f0361
commit
3c0e405f32
@ -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,
|
||||
|
@ -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,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
/** @} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user