SPI driver preparations.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14206 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
f89be6c961
commit
8b3cf2087d
|
@ -0,0 +1,2 @@
|
|||
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/RP/LLD/SPIv1/hal_spi_lld.c
|
||||
PLATFORMINC += $(CHIBIOS)/os/hal/ports/RP/LLD/SPIv1
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @name STM32 configuration options
|
||||
* @name RP configuration options
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue