[stm32][drv_spi] 优化spi单工发送, 不对接收buffer操作

否则可能影响上层应用的接收/发送buffer

attach: afcc400
This commit is contained in:
Man, Jianting (Meco) 2023-05-31 21:54:45 -04:00 committed by GitHub
parent 62afa5a9dc
commit 1638241297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -367,7 +367,6 @@ static rt_ssize_t spixfer(struct rt_spi_device *device, struct rt_spi_message *m
else if ((spi_drv->spi_dma_flag & SPI_USING_TX_DMA_FLAG))
{
/* same as Tx ONLY. It will not receive SPI data any more. */
rt_memset((uint8_t *)recv_buf, 0xff, send_length);
state = HAL_SPI_Transmit_DMA(spi_handle, (uint8_t *)send_buf, send_length);
}
else if ((spi_drv->spi_dma_flag & SPI_USING_RX_DMA_FLAG))