aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-01-10 13:36:09 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-01-10 13:36:09 +0000
commita8693baa481e1c4d91379af08bbc9f459b1b4d56 (patch)
tree190b755173b3e2159025260994a1d3208241ab4c /os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h
parent0da6de11ee208137162df9206b3b5731e2980d28 (diff)
downloadChibiOS-a8693baa481e1c4d91379af08bbc9f459b1b4d56.tar.gz
ChibiOS-a8693baa481e1c4d91379af08bbc9f459b1b4d56.tar.bz2
ChibiOS-a8693baa481e1c4d91379af08bbc9f459b1b4d56.zip
SPIv1 and SPIv2 circular mode added. Rework of RCC files and all dependencies inside STM32 drivers. Documentation fixes in some HAL modules.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11247 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h')
-rw-r--r--os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h b/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h
index c237bca4b..421484355 100644
--- a/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h
+++ b/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h
@@ -31,6 +31,11 @@
/* Driver constants. */
/*===========================================================================*/
+/**
+ * @brief Circular mode support flag.
+ */
+#define SPI_SUPPORTS_CIRCULAR TRUE
+
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
@@ -421,6 +426,12 @@ typedef void (*spicallback_t)(SPIDriver *spip);
* @brief Driver configuration structure.
*/
typedef struct {
+#if (SPI_SUPPORTS_CIRCULAR == TRUE) || defined(__DOXYGEN__)
+ /**
+ * @brief Enables the circular buffer mode.
+ */
+ bool circular;
+#endif
/**
* @brief Operation complete callback or @p NULL.
*/
@@ -559,6 +570,9 @@ extern "C" {
const void *txbuf, void *rxbuf);
void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf);
void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf);
+#if (SPI_SUPPORTS_CIRCULAR == TRUE) || defined(__DOXYGEN__)
+ void spi_lld_abort(SPIDriver *spip);
+#endif
uint16_t spi_lld_polled_exchange(SPIDriver *spip, uint16_t frame);
#ifdef __cplusplus
}