From 19d593770fe3faeab96477e77c1fa370fd9d095f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 13 Mar 2015 10:17:10 +0000 Subject: SPI code made more readable. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7767 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'os/hal/src') diff --git a/os/hal/src/spi.c b/os/hal/src/spi.c index 2bbdc0ea7..fe34c0609 100644 --- a/os/hal/src/spi.c +++ b/os/hal/src/spi.c @@ -285,7 +285,7 @@ void spiIgnore(SPIDriver *spip, size_t n) { osalDbgAssert(spip->state == SPI_READY, "not ready"); osalDbgAssert(spip->config->end_cb == NULL, "has callback"); spiStartIgnoreI(spip, n); - _spi_wait_s(spip); + (void) osalThreadSuspendS(&spip->thread); osalSysUnlock(); } @@ -317,7 +317,7 @@ void spiExchange(SPIDriver *spip, size_t n, osalDbgAssert(spip->state == SPI_READY, "not ready"); osalDbgAssert(spip->config->end_cb == NULL, "has callback"); spiStartExchangeI(spip, n, txbuf, rxbuf); - _spi_wait_s(spip); + (void) osalThreadSuspendS(&spip->thread); osalSysUnlock(); } @@ -345,7 +345,7 @@ void spiSend(SPIDriver *spip, size_t n, const void *txbuf) { osalDbgAssert(spip->state == SPI_READY, "not ready"); osalDbgAssert(spip->config->end_cb == NULL, "has callback"); spiStartSendI(spip, n, txbuf); - _spi_wait_s(spip); + (void) osalThreadSuspendS(&spip->thread); osalSysUnlock(); } @@ -373,7 +373,7 @@ void spiReceive(SPIDriver *spip, size_t n, void *rxbuf) { osalDbgAssert(spip->state == SPI_READY, "not ready"); osalDbgAssert(spip->config->end_cb == NULL, "has callback"); spiStartReceiveI(spip, n, rxbuf); - _spi_wait_s(spip); + (void) osalThreadSuspendS(&spip->thread); osalSysUnlock(); } #endif /* SPI_USE_WAIT == TRUE */ -- cgit v1.2.3