summaryrefslogtreecommitdiff
path: root/stmhal/hal/src
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-20 00:16:30 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-20 00:16:30 +0100
commitd689430e790bfbd40a4fc3139b118aee5576baf7 (patch)
treee25efdfc49cea0b743e457c2798b538e25ff0a4f /stmhal/hal/src
parentc7c4a8439735ff7617f78b5b6c0cdfb05ae88656 (diff)
stmhal: Add SPI class.
Also some updates to compile with latest changes to core py.
Diffstat (limited to 'stmhal/hal/src')
-rw-r--r--stmhal/hal/src/stm32f4xx_hal_spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stmhal/hal/src/stm32f4xx_hal_spi.c b/stmhal/hal/src/stm32f4xx_hal_spi.c
index 38ca95249..4bf70f5af 100644
--- a/stmhal/hal/src/stm32f4xx_hal_spi.c
+++ b/stmhal/hal/src/stm32f4xx_hal_spi.c
@@ -589,6 +589,7 @@ HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint1
/* Read CRC to Flush RXNE flag */
tmpreg = hspi->Instance->DR;
+ (void)tmpreg; // suppress compiler warning
}
if((hspi->Init.Mode == SPI_MODE_MASTER)&&((hspi->Init.Direction == SPI_DIRECTION_1LINE)||(hspi->Init.Direction == SPI_DIRECTION_2LINES_RXONLY)))
@@ -829,6 +830,7 @@ HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxD
}
/* Read CRC */
tmpreg = hspi->Instance->DR;
+ (void)tmpreg; // suppress compiler warning
}
/* Wait until Busy flag is reset before disabling SPI */
@@ -1630,6 +1632,7 @@ static void SPI_RxCloseIRQHandler(SPI_HandleTypeDef *hspi)
/* Read CRC to reset RXNE flag */
tmpreg = hspi->Instance->DR;
+ (void)tmpreg; // suppress compiler warning
/* Wait until RXNE flag is set to send data */
if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, SET, SPI_TIMEOUT_VALUE) != HAL_OK)
@@ -1823,6 +1826,7 @@ static void SPI_DMAReceiveCplt(DMA_HandleTypeDef *hdma)
/* Read CRC */
tmpreg = hspi->Instance->DR;
+ (void)tmpreg; // suppress compiler warning
/* Wait until RXNE flag is set to send data */
if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, SET, SPI_TIMEOUT_VALUE) != HAL_OK)
@@ -1877,6 +1881,7 @@ static void SPI_DMATransmitReceiveCplt(DMA_HandleTypeDef *hdma)
}
/* Read CRC */
tmpreg = hspi->Instance->DR;
+ (void)tmpreg; // suppress compiler warning
}
/* Wait until TXE flag is set to send data */