fix(i2s): rollback the breaking change of callback event data

`i2s_event_data_t::data` is deprecated due to the cumbersome usage of secondary pointer
Please use the newly added first-level pointer `i2s_event_data_t::dma_buf` instead
This commit is contained in:
laokaiyao
2024-03-28 15:03:58 +08:00
parent fc9484785b
commit 94ea9e398e
7 changed files with 39 additions and 14 deletions

View File

@@ -65,9 +65,9 @@ typedef struct {
* it should be the multiple of `3` when the data bit width is 24.
*/
union {
bool auto_clear; /*!< Alias of `auto_clear_after_cb` to be compatible with previous version */
bool auto_clear; /*!< Alias of `auto_clear_after_cb` */
bool auto_clear_after_cb; /*!< Set to auto clear DMA TX buffer after `on_sent` callback, I2S will always send zero automatically if no data to send.
* So that user can assign the data to the DMA buffers directly in the callback, and the data won't be cleared after quitted the callback.
* So that user can assign the data to the DMA buffers directly in the callback, and the data won't be cleared after quit the callback.
*/
};
bool auto_clear_before_cb; /*!< Set to auto clear DMA TX buffer before `on_sent` callback, I2S will always send zero automatically if no data to send