From 1bb76c43d361a4d2059e6242abdfdee0fc124c80 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Fri, 28 Apr 2017 18:27:30 +0200 Subject: [PATCH] atmel boards --- configs/sam3u-ek/src/sam_spi.c | 4 +-- configs/sam4e-ek/src/sam_spi.c | 4 +-- configs/sam4l-xplained/src/sam_spi.c | 6 ++--- configs/sama5d3-xplained/src/sam_spi.c | 8 +++--- configs/sama5d3x-ek/src/sam_spi.c | 8 +++--- configs/sama5d4-ek/src/sam_spi.c | 8 +++--- configs/samd20-xplained/src/sam_spi.c | 36 +++++++++++++------------- configs/samd21-xplained/src/sam_spi.c | 36 +++++++++++++------------- configs/same70-xplained/src/sam_spi.c | 8 +++--- configs/saml21-xplained/src/sam_spi.c | 36 +++++++++++++------------- configs/samv71-xult/src/sam_spi.c | 8 +++--- 11 files changed, 81 insertions(+), 81 deletions(-) diff --git a/configs/sam3u-ek/src/sam_spi.c b/configs/sam3u-ek/src/sam_spi.c index 6921548360..af55cb2884 100644 --- a/configs/sam3u-ek/src/sam_spi.c +++ b/configs/sam3u-ek/src/sam_spi.c @@ -138,7 +138,7 @@ void weak_function sam_spidev_initialize(void) * ****************************************************************************/ -void sam_spi0select(enum spi_dev_e devid, bool selected) +void sam_spi0select(uint32_t devid, bool selected) { /* The touchscreen chip select is implemented as a GPIO OUTPUT that must * be controlled by this function. This is because the ADS7843E driver @@ -170,7 +170,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected) * ****************************************************************************/ -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/configs/sam4e-ek/src/sam_spi.c b/configs/sam4e-ek/src/sam_spi.c index a26a95c17d..90d0e345fc 100644 --- a/configs/sam4e-ek/src/sam_spi.c +++ b/configs/sam4e-ek/src/sam_spi.c @@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void) * ****************************************************************************/ -void sam_spi0select(enum spi_dev_e devid, bool selected) +void sam_spi0select(uint32_t devid, bool selected) { switch (devid) { @@ -185,7 +185,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected) * ****************************************************************************/ -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/configs/sam4l-xplained/src/sam_spi.c b/configs/sam4l-xplained/src/sam_spi.c index 47e7741e50..be44a7f403 100644 --- a/configs/sam4l-xplained/src/sam_spi.c +++ b/configs/sam4l-xplained/src/sam_spi.c @@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void) * ****************************************************************************/ -void sam_spi0select(enum spi_dev_e devid, bool selected) +void sam_spi0select(uint32_t devid, bool selected) { #ifdef CONFIG_SAM4L_XPLAINED_IOMODULE /* Select/de-select the SD card */ @@ -183,7 +183,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected) * ****************************************************************************/ -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; @@ -231,7 +231,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) ****************************************************************************/ #ifdef CONFIG_SPI_CMDDATA -int sam_spic0mddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spic0mddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_SAM4L_XPLAINED_OLED1MODULE if (devid == SPIDEV_DISPLAY) diff --git a/configs/sama5d3-xplained/src/sam_spi.c b/configs/sama5d3-xplained/src/sam_spi.c index 9c42a10d65..93e965ffd6 100644 --- a/configs/sama5d3-xplained/src/sam_spi.c +++ b/configs/sama5d3-xplained/src/sam_spi.c @@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_SAMA5_SPI0 -void sam_spi0select(enum spi_dev_e devid, bool selected) +void sam_spi0select(uint32_t devid, bool selected) { #ifdef CONFIG_MTD_AT25 /* The AT25 serial FLASH connects using NPCS0 */ @@ -154,7 +154,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected) #endif #ifdef CONFIG_SAMA5_SPI1 -void sam_spi1select(enum spi_dev_e devid, bool selected) +void sam_spi1select(uint32_t devid, bool selected) { } #endif @@ -174,14 +174,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected) ****************************************************************************/ #ifdef CONFIG_SAMA5_SPI0 -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_SAMA5_SPI0 -uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/configs/sama5d3x-ek/src/sam_spi.c b/configs/sama5d3x-ek/src/sam_spi.c index f2932e5fb8..f4b4c00928 100644 --- a/configs/sama5d3x-ek/src/sam_spi.c +++ b/configs/sama5d3x-ek/src/sam_spi.c @@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_SAMA5_SPI0 -void sam_spi0select(enum spi_dev_e devid, bool selected) +void sam_spi0select(uint32_t devid, bool selected) { #ifdef CONFIG_MTD_AT25 /* The AT25 serial FLASH connects using NPCS0 */ @@ -154,7 +154,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected) #endif #ifdef CONFIG_SAMA5_SPI1 -void sam_spi1select(enum spi_dev_e devid, bool selected) +void sam_spi1select(uint32_t devid, bool selected) { } #endif @@ -174,14 +174,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected) ****************************************************************************/ #ifdef CONFIG_SAMA5_SPI0 -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_SAMA5_SPI0 -uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/configs/sama5d4-ek/src/sam_spi.c b/configs/sama5d4-ek/src/sam_spi.c index 4b24a4b1ce..38cb1da36f 100644 --- a/configs/sama5d4-ek/src/sam_spi.c +++ b/configs/sama5d4-ek/src/sam_spi.c @@ -140,7 +140,7 @@ void weak_function sam_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_SAMA5_SPI0 -void sam_spi0select(enum spi_dev_e devid, bool selected) +void sam_spi0select(uint32_t devid, bool selected) { #ifdef CONFIG_MTD_AT25 /* The AT25 serial FLASH connects using NPCS0 */ @@ -154,7 +154,7 @@ void sam_spi0select(enum spi_dev_e devid, bool selected) #endif #ifdef CONFIG_SAMA5_SPI1 -void sam_spi1select(enum spi_dev_e devid, bool selected) +void sam_spi1select(uint32_t devid, bool selected) { } #endif @@ -174,14 +174,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected) ****************************************************************************/ #ifdef CONFIG_SAMA5_SPI0 -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_SAMA5_SPI0 -uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/configs/samd20-xplained/src/sam_spi.c b/configs/samd20-xplained/src/sam_spi.c index 3ec3469adb..61b254eec6 100644 --- a/configs/samd20-xplained/src/sam_spi.c +++ b/configs/samd20-xplained/src/sam_spi.c @@ -148,7 +148,7 @@ void weak_function sam_spidev_initialize(void) ****************************************************************************/ #ifdef SAMDL_HAVE_SPI0 -void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { #ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT1 @@ -176,7 +176,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif #ifdef SAMDL_HAVE_SPI1 -void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { #ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT2 @@ -204,28 +204,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif #ifdef SAMDL_HAVE_SPI2 -void sam_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI3 -void sam_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI4 -void sam_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI5 -void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } @@ -247,7 +247,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, ****************************************************************************/ #ifdef SAMDL_HAVE_SPI0 -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; @@ -270,7 +270,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef SAMDL_HAVE_SPI1 -uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; @@ -293,28 +293,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef SAMDL_HAVE_SPI2 -uint8_t sam_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI3 -uint8_t sam_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI4 -uint8_t sam_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI5 -uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; return ret; @@ -347,7 +347,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef SAMDL_HAVE_SPI0 -int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT1 if (devid == SPIDEV_DISPLAY) @@ -368,7 +368,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #endif #ifdef SAMDL_HAVE_SPI1 -int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT2 if (devid == SPIDEV_DISPLAY) @@ -389,28 +389,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #endif #ifdef SAMDL_HAVE_SPI2 -int sam_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI3 -int sam_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI4 -int sam_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI5 -int sam_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/configs/samd21-xplained/src/sam_spi.c b/configs/samd21-xplained/src/sam_spi.c index eaf17020ec..275b961362 100644 --- a/configs/samd21-xplained/src/sam_spi.c +++ b/configs/samd21-xplained/src/sam_spi.c @@ -148,7 +148,7 @@ void weak_function sam_spidev_initialize(void) ****************************************************************************/ #ifdef SAMDL_HAVE_SPI0 -void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { #ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT1 @@ -176,7 +176,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif #ifdef SAMDL_HAVE_SPI1 -void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { #ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT2 @@ -204,28 +204,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif #ifdef SAMDL_HAVE_SPI2 -void sam_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI3 -void sam_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI4 -void sam_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI5 -void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } @@ -247,7 +247,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, ****************************************************************************/ #ifdef SAMDL_HAVE_SPI0 -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; @@ -270,7 +270,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef SAMDL_HAVE_SPI1 -uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; @@ -293,28 +293,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef SAMDL_HAVE_SPI2 -uint8_t sam_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI3 -uint8_t sam_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI4 -uint8_t sam_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI5 -uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; return ret; @@ -347,7 +347,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef SAMDL_HAVE_SPI0 -int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_SAMD21_XPLAINED_OLED1MODULE_EXT1 if (devid == SPIDEV_DISPLAY) @@ -368,7 +368,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #endif #ifdef SAMDL_HAVE_SPI1 -int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_SAMD21_XPLAINED_OLED1MODULE_EXT2 if (devid == SPIDEV_DISPLAY) @@ -389,28 +389,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #endif #ifdef SAMDL_HAVE_SPI2 -int sam_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI3 -int sam_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI4 -int sam_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI5 -int sam_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/configs/same70-xplained/src/sam_spi.c b/configs/same70-xplained/src/sam_spi.c index c21979060b..e50136df93 100644 --- a/configs/same70-xplained/src/sam_spi.c +++ b/configs/same70-xplained/src/sam_spi.c @@ -141,13 +141,13 @@ void sam_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_SAMV7_SPI0_MASTER -void sam_spi0select(enum spi_dev_e devid, bool selected) +void sam_spi0select(uint32_t devid, bool selected) { } #endif #ifdef CONFIG_SAMV7_SPI1_MASTER -void sam_spi1select(enum spi_dev_e devid, bool selected) +void sam_spi1select(uint32_t devid, bool selected) { } #endif @@ -167,14 +167,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected) ****************************************************************************/ #ifdef CONFIG_SAMV7_SPI0_MASTER -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_SAMV7_SPI1_MASTER -uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } diff --git a/configs/saml21-xplained/src/sam_spi.c b/configs/saml21-xplained/src/sam_spi.c index ae1238eb2d..e4ecafd7ba 100644 --- a/configs/saml21-xplained/src/sam_spi.c +++ b/configs/saml21-xplained/src/sam_spi.c @@ -148,7 +148,7 @@ void weak_function sam_spidev_initialize(void) ****************************************************************************/ #ifdef SAMDL_HAVE_SPI0 -void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { #ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT1 @@ -176,7 +176,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif #ifdef SAMDL_HAVE_SPI1 -void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { #ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT2 @@ -204,28 +204,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, #endif #ifdef SAMDL_HAVE_SPI2 -void sam_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI3 -void sam_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI4 -void sam_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } #endif #ifdef SAMDL_HAVE_SPI5 -void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, +void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) { } @@ -247,7 +247,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, ****************************************************************************/ #ifdef SAMDL_HAVE_SPI0 -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; @@ -270,7 +270,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef SAMDL_HAVE_SPI1 -uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; @@ -293,28 +293,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef SAMDL_HAVE_SPI2 -uint8_t sam_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI3 -uint8_t sam_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI4 -uint8_t sam_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef SAMDL_HAVE_SPI5 -uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid) { uint8_t ret = 0; return ret; @@ -347,7 +347,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA #ifdef SAMDL_HAVE_SPI0 -int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_SAML21_XPLAINED_OLED1MODULE_EXT1 if (devid == SPIDEV_DISPLAY) @@ -368,7 +368,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #endif #ifdef SAMDL_HAVE_SPI1 -int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { #ifdef CONFIG_SAML21_XPLAINED_OLED1MODULE_EXT2 if (devid == SPIDEV_DISPLAY) @@ -389,28 +389,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #endif #ifdef SAMDL_HAVE_SPI2 -int sam_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI3 -int sam_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI4 -int sam_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } #endif #ifdef SAMDL_HAVE_SPI5 -int sam_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) { return OK; } diff --git a/configs/samv71-xult/src/sam_spi.c b/configs/samv71-xult/src/sam_spi.c index 58a4d30e24..eb39246e70 100644 --- a/configs/samv71-xult/src/sam_spi.c +++ b/configs/samv71-xult/src/sam_spi.c @@ -141,13 +141,13 @@ void sam_spidev_initialize(void) ****************************************************************************/ #ifdef CONFIG_SAMV7_SPI0_MASTER -void sam_spi0select(enum spi_dev_e devid, bool selected) +void sam_spi0select(uint32_t devid, bool selected) { } #endif #ifdef CONFIG_SAMV7_SPI1_MASTER -void sam_spi1select(enum spi_dev_e devid, bool selected) +void sam_spi1select(uint32_t devid, bool selected) { } #endif @@ -167,14 +167,14 @@ void sam_spi1select(enum spi_dev_e devid, bool selected) ****************************************************************************/ #ifdef CONFIG_SAMV7_SPI0_MASTER -uint8_t sam_spi0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; } #endif #ifdef CONFIG_SAMV7_SPI1_MASTER -uint8_t sam_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid) { return 0; }