diff --git a/os/hal/ports/RP/LLD/SPIv1/driver.mk b/os/hal/ports/RP/LLD/SPIv1/driver.mk new file mode 100644 index 000000000..5546d3d97 --- /dev/null +++ b/os/hal/ports/RP/LLD/SPIv1/driver.mk @@ -0,0 +1,2 @@ +PLATFORMSRC += $(CHIBIOS)/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.c +PLATFORMINC += $(CHIBIOS)/os/hal/ports/RP/LLD/SPIv1 diff --git a/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.c b/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.c index 534066da5..48feaa498 100644 --- a/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.c +++ b/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.c @@ -15,8 +15,8 @@ */ /** - * @file hal_spi_lld.c - * @brief RP2040 SPI subsystem low level driver source. + * @file SPIv1/hal_spi_lld.c + * @brief RP SPI subsystem low level driver source. * * @addtogroup SPI * @{ @@ -37,7 +37,7 @@ /** * @brief SPI1 driver identifier. */ -#if (PLATFORM_SPI_USE_SPI1 == TRUE) || defined(__DOXYGEN__) +#if (RP_SPI_USE_SPI1 == TRUE) || defined(__DOXYGEN__) SPIDriver SPID1; #endif @@ -64,7 +64,7 @@ SPIDriver SPID1; */ void spi_lld_init(void) { -#if PLATFORM_SPI_USE_SPI1 == TRUE +#if RP_SPI_USE_SPI1 == TRUE /* Driver initialization.*/ spiObjectInit(&SPID1); #endif @@ -81,7 +81,7 @@ void spi_lld_start(SPIDriver *spip) { if (spip->state == SPI_STOP) { /* Enables the peripheral.*/ -#if PLATFORM_SPI_USE_SPI1 == TRUE +#if RP_SPI_USE_SPI1 == TRUE if (&SPID1 == spip) { } @@ -102,7 +102,7 @@ void spi_lld_stop(SPIDriver *spip) { if (spip->state == SPI_READY) { /* Disables the peripheral.*/ -#if PLATFORM_SPI_USE_SPI1 == TRUE +#if RP_SPI_USE_SPI1 == TRUE if (&SPID1 == spip) { } diff --git a/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.h b/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.h index bddd7649e..7b938bbee 100644 --- a/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.h +++ b/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.h @@ -15,8 +15,8 @@ */ /** - * @file hal_spi_lld.h - * @brief RP2040 SPI subsystem low level driver header. + * @file SPIv1/hal_spi_lld.h + * @brief RP SPI subsystem low level driver header. * * @addtogroup SPI * @{ @@ -34,14 +34,14 @@ /** * @brief Circular mode support flag. */ -#define SPI_SUPPORTS_CIRCULAR TRUE +#define SPI_SUPPORTS_CIRCULAR FALSE /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ /** - * @name PLATFORM configuration options + * @name RP configuration options * @{ */ /** @@ -49,8 +49,8 @@ * @details If set to @p TRUE the support for SPI1 is included. * @note The default is @p FALSE. */ -#if !defined(PLATFORM_SPI_USE_SPI1) || defined(__DOXYGEN__) -#define PLATFORM_SPI_USE_SPI1 FALSE +#if !defined(RP_SPI_USE_SPI1) || defined(__DOXYGEN__) +#define RP_SPI_USE_SPI1 FALSE #endif /** @} */ @@ -84,7 +84,7 @@ /* External declarations. */ /*===========================================================================*/ -#if (PLATFORM_SPI_USE_SPI1 == TRUE) && !defined(__DOXYGEN__) +#if (RP_SPI_USE_SPI1 == TRUE) && !defined(__DOXYGEN__) extern SPIDriver SPID1; #endif diff --git a/os/hal/ports/RP/LLD/UARTv1/hal_sio_lld.h b/os/hal/ports/RP/LLD/UARTv1/hal_sio_lld.h index 8c5eba743..b2384c384 100644 --- a/os/hal/ports/RP/LLD/UARTv1/hal_sio_lld.h +++ b/os/hal/ports/RP/LLD/UARTv1/hal_sio_lld.h @@ -36,7 +36,7 @@ /*===========================================================================*/ /** - * @name STM32 configuration options + * @name RP configuration options * @{ */ /** diff --git a/os/hal/ports/RP/RP2040/platform.mk b/os/hal/ports/RP/RP2040/platform.mk index b48082417..37c45ee45 100644 --- a/os/hal/ports/RP/RP2040/platform.mk +++ b/os/hal/ports/RP/RP2040/platform.mk @@ -27,6 +27,7 @@ endif # Drivers compatible with the platform. include $(CHIBIOS)/os/hal/ports/RP/LLD/DMAv1/driver.mk include $(CHIBIOS)/os/hal/ports/RP/LLD/GPIOv1/driver.mk +include $(CHIBIOS)/os/hal/ports/RP/LLD/SPIv1/driver.mk include $(CHIBIOS)/os/hal/ports/RP/LLD/TIMERv1/driver.mk include $(CHIBIOS)/os/hal/ports/RP/LLD/UARTv1/driver.mk include $(CHIBIOS)/os/hal/ports/RP/LLD/RTCv1/driver.mk