SPI: HAL: disable IP at the end of transmit

in case of 1LINE direction
pull/4975/head
Laurent MEUNIER 2017-07-20 16:05:15 +02:00
parent 6dfafc7293
commit 8c99bf3b62
1 changed files with 4 additions and 0 deletions

View File

@ -655,6 +655,10 @@ HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint
hspi->ErrorCode = HAL_SPI_ERROR_FLAG; hspi->ErrorCode = HAL_SPI_ERROR_FLAG;
} }
if (hspi->Init.Direction == SPI_DIRECTION_1LINE) {
__HAL_SPI_DISABLE(hspi);
}
/* Clear overrun flag in 2 Lines communication mode because received is not read */ /* Clear overrun flag in 2 Lines communication mode because received is not read */
if (hspi->Init.Direction == SPI_DIRECTION_2LINES) if (hspi->Init.Direction == SPI_DIRECTION_2LINES)
{ {