Should I set HAL_DMA_STATE_READY in circular mode?
Hi,
I'm implementing a circular buffer for UART transmit via DMA on an STM32L4 device.
I've got a callback that updates the read pointer and calls another HAL_UART_Transmit_DMA if it's still not equal to the write pointer.
This callback is called by:
HAL_DMA_IRQHandler (stm32l4xx_hal_dma.c)
hdma->XferCpltCallback
which currently points to UART_DMATransmitCplt from stm32l4xx_hal_uart.c.
which calls HAL_UART_TxCpltCallback
which contains my callback
When I look at the function HAL_DMA_IRQHandler, it conditionally sets hdma->State = HAL_DMA_STATE_READY; only when NOT in circular mode. BUT I've initialized DMA in circular mode.
Does this mean that it's expected of me to set hdma->State = HAL_DMA_STATE_READY; after my callback found no more data in the circular buffer and I'm not calling another transmit?
I want to use this state to decide whether I have to manually start a new transmission after adding data to the circular buffer.
