diff --git a/configs/nucleo-144/src/stm32_spi.c b/configs/nucleo-144/src/stm32_spi.c index 61dab7a51e..5e24455c26 100644 --- a/configs/nucleo-144/src/stm32_spi.c +++ b/configs/nucleo-144/src/stm32_spi.c @@ -213,39 +213,39 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32F7_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(g_spigpio[devid], !selected); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(g_spigpio[devid], !selected); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(g_spigpio[devid], !selected); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -256,13 +256,13 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) # error "NUCLEO_SPI_BUS4_CSn Are not defined" # endif -void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(g_spigpio[devid], !selected); } -uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -273,13 +273,13 @@ uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) # error "NUCLEO_SPI_BUS4_CSn Are not defined" # endif -void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(g_spigpio[devid], !selected); } -uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -289,13 +289,13 @@ uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) # ifndef NUCLEO_SPI_BUS6_CS # error "NUCLEO_SPI_BUS4_CSn Are not defined" # endif -void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(g_spigpio[devid], !selected); } -uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -326,43 +326,44 @@ uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32F7_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI4 -int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI5 -int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI6 -int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { +:qa return -ENODEV; } #endif diff --git a/configs/nucleo-f303re/src/stm32_spi.c b/configs/nucleo-f303re/src/stm32_spi.c index 6251ede1da..1a7e748a17 100644 --- a/configs/nucleo-f303re/src/stm32_spi.c +++ b/configs/nucleo-f303re/src/stm32_spi.c @@ -103,7 +103,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -116,33 +116,33 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -172,7 +172,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_LCD_SSD1351 @@ -188,7 +188,7 @@ int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; @@ -196,7 +196,7 @@ int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; diff --git a/configs/nucleo-f4x1re/src/stm32_spi.c b/configs/nucleo-f4x1re/src/stm32_spi.c index 82026a0d26..bb56053168 100644 --- a/configs/nucleo-f4x1re/src/stm32_spi.c +++ b/configs/nucleo-f4x1re/src/stm32_spi.c @@ -141,7 +141,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -160,14 +160,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -179,19 +179,19 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele #endif } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -222,21 +222,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/configs/nucleo-l476rg/src/stm32_spi.c b/configs/nucleo-l476rg/src/stm32_spi.c index 71d65d8a10..dcdda1a700 100644 --- a/configs/nucleo-l476rg/src/stm32_spi.c +++ b/configs/nucleo-l476rg/src/stm32_spi.c @@ -141,7 +141,7 @@ void weak_function stm32l4_spiinitialize(void) ****************************************************************************/ #ifdef CONFIG_STM32L4_SPI1 -void stm32l4_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32l4_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -160,14 +160,14 @@ void stm32l4_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool se #endif } -uint8_t stm32l4_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32l4_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32L4_SPI2 -void stm32l4_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32l4_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -179,19 +179,19 @@ void stm32l4_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool se #endif } -uint8_t stm32l4_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32l4_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32L4_SPI3 -void stm32l4_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32l4_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32l4_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32l4_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -222,21 +222,21 @@ uint8_t stm32l4_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32L4_SPI1 -int stm32l4_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32l4_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32L4_SPI2 -int stm32l4_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32l4_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32L4_SPI3 -int stm32l4_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32l4_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/configs/stm3210e-eval/src/stm32_spi.c b/configs/stm3210e-eval/src/stm32_spi.c index 4df6531cef..92d9af18a9 100644 --- a/configs/stm3210e-eval/src/stm32_spi.c +++ b/configs/stm3210e-eval/src/stm32_spi.c @@ -106,7 +106,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -118,31 +118,31 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/configs/stm3220g-eval/src/stm32_spi.c b/configs/stm3220g-eval/src/stm32_spi.c index 9e171b9bfa..1e806fb2bc 100644 --- a/configs/stm3220g-eval/src/stm32_spi.c +++ b/configs/stm3220g-eval/src/stm32_spi.c @@ -96,36 +96,36 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/configs/stm3240g-eval/src/stm32_spi.c b/configs/stm3240g-eval/src/stm32_spi.c index 45b7f894e1..a429ad5322 100644 --- a/configs/stm3240g-eval/src/stm32_spi.c +++ b/configs/stm3240g-eval/src/stm32_spi.c @@ -96,36 +96,36 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return SPI_STATUS_PRESENT; } diff --git a/configs/stm32_tiny/src/stm32_spi.c b/configs/stm32_tiny/src/stm32_spi.c index ac4e3eb68e..71bb78744c 100644 --- a/configs/stm32_tiny/src/stm32_spi.c +++ b/configs/stm32_tiny/src/stm32_spi.c @@ -109,18 +109,18 @@ void stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { switch(devid) { @@ -138,7 +138,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele } } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; switch(devid) diff --git a/configs/stm32butterfly2/src/stm32_spi.c b/configs/stm32butterfly2/src/stm32_spi.c index fa2fd2e762..2fc3544869 100644 --- a/configs/stm32butterfly2/src/stm32_spi.c +++ b/configs/stm32butterfly2/src/stm32_spi.c @@ -73,7 +73,7 @@ void stm32_spidev_initialize(void) * Function asserts given devid based on select ****************************************************************************/ -void stm32_spi1select(struct spi_dev_s *dev, enum spi_dev_e devid, +void stm32_spi1select(struct spi_dev_s *dev, uint32_t devid, bool select) { spiinfo("INFO: Selecting spi dev: %d, state: %d\n", devid, select); @@ -91,7 +91,7 @@ void stm32_spi1select(struct spi_dev_s *dev, enum spi_dev_e devid, * Return status of devid ****************************************************************************/ -uint8_t stm32_spi1status(struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(struct spi_dev_s *dev, uint32_t devid) { spiinfo("INFO: Requesting info from spi dev: %d\n", devid); diff --git a/configs/stm32f103-minimum/src/stm32_spi.c b/configs/stm32f103-minimum/src/stm32_spi.c index 2d24b7aa3d..8a4169cc2c 100644 --- a/configs/stm32f103-minimum/src/stm32_spi.c +++ b/configs/stm32f103-minimum/src/stm32_spi.c @@ -117,7 +117,7 @@ void stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { #if defined(CONFIG_CL_MFRC522) @@ -149,7 +149,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; @@ -172,12 +172,12 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -209,7 +209,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_LCD_ST7567 diff --git a/configs/stm32f3discovery/src/stm32_spi.c b/configs/stm32f3discovery/src/stm32_spi.c index 712db25d2d..c9edb6052e 100644 --- a/configs/stm32f3discovery/src/stm32_spi.c +++ b/configs/stm32f3discovery/src/stm32_spi.c @@ -101,38 +101,38 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(GPIO_MEMS_CS, !selected); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -163,21 +163,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/configs/stm32f429i-disco/src/stm32_spi.c b/configs/stm32f429i-disco/src/stm32_spi.c index 69d2de2997..14b20b9b3a 100644 --- a/configs/stm32f429i-disco/src/stm32_spi.c +++ b/configs/stm32f429i-disco/src/stm32_spi.c @@ -115,43 +115,43 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI4 -void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { #if defined(CONFIG_MTD_SST25XX) if (devid == SPIDEV_FLASH) @@ -161,14 +161,14 @@ void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele #endif } -uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI5 -void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -185,7 +185,7 @@ void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele } } -uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -216,35 +216,35 @@ uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI4 -int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI5 -int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #if defined(CONFIG_STM32F429I_DISCO_ILI9341) if (devid == SPIDEV_DISPLAY) diff --git a/configs/stm32f4discovery/src/stm32_spi.c b/configs/stm32f4discovery/src/stm32_spi.c index c6d7506fc1..77b53a8ac4 100644 --- a/configs/stm32f4discovery/src/stm32_spi.c +++ b/configs/stm32f4discovery/src/stm32_spi.c @@ -116,7 +116,7 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -133,14 +133,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele } } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -158,19 +158,19 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele #endif } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -201,7 +201,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01) || \ defined(CONFIG_LCD_SSD1351) @@ -230,14 +230,14 @@ int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/configs/stm32f746-ws/src/stm32_spi.c b/configs/stm32f746-ws/src/stm32_spi.c index 517ea3761b..196b8c1e24 100644 --- a/configs/stm32f746-ws/src/stm32_spi.c +++ b/configs/stm32f746-ws/src/stm32_spi.c @@ -99,72 +99,72 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32F7_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI4 -void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI5 -void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI6 -void stm32_spi6select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi6select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -195,42 +195,42 @@ uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32F7_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI4 -int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI5 -int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI6 -int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi6cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/configs/stm32f746g-disco/src/stm32_spi.c b/configs/stm32f746g-disco/src/stm32_spi.c index c2bea9894d..1b8035af68 100644 --- a/configs/stm32f746g-disco/src/stm32_spi.c +++ b/configs/stm32f746g-disco/src/stm32_spi.c @@ -99,60 +99,60 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32F7_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI4 -void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32F7_SPI5 -void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -183,35 +183,35 @@ uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32F7_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI4 -int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32F7_SPI5 -int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } diff --git a/configs/stm32l476-mdk/src/stm32_spi.c b/configs/stm32l476-mdk/src/stm32_spi.c index 8b1cb7a8a6..ae13e9e59d 100644 --- a/configs/stm32l476-mdk/src/stm32_spi.c +++ b/configs/stm32l476-mdk/src/stm32_spi.c @@ -126,36 +126,36 @@ void weak_function stm32_spiinitialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -186,21 +186,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/configs/stm32l476vg-disco/src/stm32_spi.c b/configs/stm32l476vg-disco/src/stm32_spi.c index 3b8420c62a..cca4db6f82 100644 --- a/configs/stm32l476vg-disco/src/stm32_spi.c +++ b/configs/stm32l476vg-disco/src/stm32_spi.c @@ -143,7 +143,7 @@ void weak_function stm32_spiinitialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -162,14 +162,14 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele #endif } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); @@ -181,19 +181,19 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele #endif } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -224,21 +224,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/configs/stm32ldiscovery/src/stm32_spi.c b/configs/stm32ldiscovery/src/stm32_spi.c index d923a8b2c9..5b385f1b4d 100644 --- a/configs/stm32ldiscovery/src/stm32_spi.c +++ b/configs/stm32ldiscovery/src/stm32_spi.c @@ -102,38 +102,38 @@ void weak_function stm32_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_STM32_SPI1 -void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(GPIO_MEMS_CS, !selected); } -uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_STM32_SPI3 -void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } -uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } @@ -164,21 +164,21 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_STM32_SPI1 -int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI2 -int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; } #endif #ifdef CONFIG_STM32_SPI3 -int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return -ENODEV; }