mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
Update some comments.
This commit is contained in:
@@ -2543,15 +2543,12 @@ static void up_dma_rxcallback(DMA_HANDLE handle, uint8_t status, void *arg)
|
|||||||
|
|
||||||
if (priv->rxenable && up_dma_rxavailable(&priv->dev))
|
if (priv->rxenable && up_dma_rxavailable(&priv->dev))
|
||||||
{
|
{
|
||||||
/* Invalidate the DMA buffer.
|
/* Invalidate the entire DMA buffer. It would be tempting to
|
||||||
*
|
* invalidate only half of the DMA buffer, since the DMA completion
|
||||||
* REVISIT: We could improve this logic slightly by checking the DMA
|
* event means that only half of the DMA buffer has been filled.
|
||||||
* status. If this is the completion of half of the DMA, then we
|
* However, we need to account for the behavior of up_dma_rxavailable()
|
||||||
* would only have invalidate the 1st half of the DMA buffer.
|
* which may encroach into the next half of the DMA buffer while DMA
|
||||||
* Otherwise, we would only have to invalidate the second half of the
|
* is still in progress in that half.
|
||||||
* DMA buffer. This would require that the Rx DMA buffers have a size
|
|
||||||
* that is a multiple of twice the cache line size and would also have
|
|
||||||
* implications to stm32_serial_dma_poll()
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
arch_invalidate_dcache((uintptr_t)priv->rxfifo,
|
arch_invalidate_dcache((uintptr_t)priv->rxfifo,
|
||||||
|
|||||||
Reference in New Issue
Block a user