Added checks related to SPI circular mode.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11243 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2018-01-09 15:51:12 +00:00
parent 7e46dc94aa
commit 14b7470192
2 changed files with 5 additions and 0 deletions

View File

@ -324,6 +324,7 @@ void spiAbort(SPIDriver *spip) {
void spiIgnore(SPIDriver *spip, size_t n) {
osalDbgCheck((spip != NULL) && (n > 0U));
osalDbgCheck((spip->config->circular == false) || ((n & 1U) == 0U));
osalSysLock();
osalDbgAssert(spip->state == SPI_READY, "not ready");
@ -355,6 +356,7 @@ void spiExchange(SPIDriver *spip, size_t n,
osalDbgCheck((spip != NULL) && (n > 0U) &&
(rxbuf != NULL) && (txbuf != NULL));
osalDbgCheck((spip->config->circular == false) || ((n & 1U) == 0U));
osalSysLock();
osalDbgAssert(spip->state == SPI_READY, "not ready");
@ -382,6 +384,7 @@ void spiExchange(SPIDriver *spip, size_t n,
void spiSend(SPIDriver *spip, size_t n, const void *txbuf) {
osalDbgCheck((spip != NULL) && (n > 0U) && (txbuf != NULL));
osalDbgCheck((spip->config->circular == false) || ((n & 1U) == 0U));
osalSysLock();
osalDbgAssert(spip->state == SPI_READY, "not ready");
@ -409,6 +412,7 @@ void spiSend(SPIDriver *spip, size_t n, const void *txbuf) {
void spiReceive(SPIDriver *spip, size_t n, void *rxbuf) {
osalDbgCheck((spip != NULL) && (n > 0U) && (rxbuf != NULL));
osalDbgCheck((spip->config->circular == false) || ((n & 1U) == 0U));
osalSysLock();
osalDbgAssert(spip->state == SPI_READY, "not ready");

View File

@ -89,6 +89,7 @@
*****************************************************************************
*** Next ***
- NEW: Added circular continuous mode to the SPI driver.
- NEW: Added callbacks capability to the CAN driver.
- NEW: Added initial STM32H7xx support.
- NEW: Added GHS compiler support to the Power e200 port.