summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHao Zhang2019-09-20 09:57:38 -0500
committerHao Zhang2019-09-20 10:02:33 -0500
commitf2682be145ebbfeba111f59196435e2c4aacfb0d (patch)
tree831df71f0b0ae6e7a2e5e9d6b85ba5968665395d
parentb9173336e8356078fbf19177b51db6bfe9eaf6ff (diff)
downloadspi-lld-f2682be145ebbfeba111f59196435e2c4aacfb0d.tar.gz
spi-lld-f2682be145ebbfeba111f59196435e2c4aacfb0d.tar.xz
spi-lld-f2682be145ebbfeba111f59196435e2c4aacfb0d.zip
spi: PRSDK-6349: fix Misra-C issues
Signed-off-by: Hao Zhang <hzhang@ti.com>
-rw-r--r--src/v0/OSPI_v0.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/v0/OSPI_v0.c b/src/v0/OSPI_v0.c
index 4000c8e..54dd614 100644
--- a/src/v0/OSPI_v0.c
+++ b/src/v0/OSPI_v0.c
@@ -1395,6 +1395,7 @@ static bool OSPI_transfer_v0(SPI_Handle handle, SPI_Transaction *transaction)
1395 /* In indirect transfer mode, wait for the lock 1395 /* In indirect transfer mode, wait for the lock
1396 posted form the word completion interrupt */ 1396 posted form the word completion interrupt */
1397 (void)SPI_osalPendLock(object->transferComplete, SemaphoreP_WAIT_FOREVER); 1397 (void)SPI_osalPendLock(object->transferComplete, SemaphoreP_WAIT_FOREVER);
1398 ret = (bool)true;
1398 } 1399 }
1399#ifdef SPI_DMA_ENABLE 1400#ifdef SPI_DMA_ENABLE
1400 if ((object->ospiMode == (uint32_t)OSPI_OPER_MODE_DAC_XFER) && (hwAttrs->dmaEnable == (bool)true)) 1401 if ((object->ospiMode == (uint32_t)OSPI_OPER_MODE_DAC_XFER) && (hwAttrs->dmaEnable == (bool)true))
@@ -1402,15 +1403,14 @@ static bool OSPI_transfer_v0(SPI_Handle handle, SPI_Transaction *transaction)
1402 /* in direct transfer mode with DMA enabled, wait for the lock 1403 /* in direct transfer mode with DMA enabled, wait for the lock
1403 posted form the word completion interrupt */ 1404 posted form the word completion interrupt */
1404 (void)SPI_osalPendLock(object->transferComplete, SemaphoreP_WAIT_FOREVER); 1405 (void)SPI_osalPendLock(object->transferComplete, SemaphoreP_WAIT_FOREVER);
1406 ret = (bool)true;
1405 if((uint32_t)SPI_TRANSACTION_TYPE_WRITE == object->transactionType) 1407 if((uint32_t)SPI_TRANSACTION_TYPE_WRITE == object->transactionType)
1406 { 1408 {
1407 (void)OSPI_waitDeviceReady(handle, OSPI_DAC_WRITE_TIMEOUT); 1409 ret = OSPI_waitDeviceReady(handle, OSPI_DAC_WRITE_TIMEOUT);
1408 } 1410 }
1409 } 1411 }
1410#endif 1412#endif
1411
1412 /* transfer is completed and semaphore is posted. */ 1413 /* transfer is completed and semaphore is posted. */
1413 ret = (bool)true;
1414 } 1414 }
1415 else 1415 else
1416 { 1416 {