File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ bool Bus_Parallel16::init(void)
140140 .auto_update_desc = false };
141141 gdma_apply_strategy (dma_chan, &strategy_config);
142142
143+ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
143144 gdma_transfer_config_t transfer_config = {
144145#ifdef SPIRAM_DMA_BUFFER
145146 .max_data_burst_size = 64 ,
@@ -150,6 +151,13 @@ bool Bus_Parallel16::init(void)
150151#endif
151152 };
152153 gdma_config_transfer (dma_chan, &transfer_config);
154+ #else
155+ gdma_transfer_ability_t ability = {
156+ .sram_trans_align = 32 ,
157+ .psram_trans_align = 64 ,
158+ };
159+ gdma_set_transfer_ability (dma_chan, &ability);
160+ #endif
153161
154162 // Enable DMA transfer callback
155163 static gdma_tx_event_callbacks_t tx_cbs = {
Original file line number Diff line number Diff line change 256256 };
257257 gdma_apply_strategy (dma_chan, &strategy_config);
258258
259+ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
259260 gdma_transfer_config_t transfer_config = {
260261#ifdef SPIRAM_DMA_BUFFER
261262 .max_data_burst_size = 64 ,
265266 .access_ext_mem = false
266267#endif
267268 };
268- gdma_config_transfer (dma_chan, &transfer_config);
269+ gdma_config_transfer (dma_chan, &transfer_config);
270+ #else
271+ gdma_transfer_ability_t ability = {
272+ .sram_trans_align = 32 ,
273+ .psram_trans_align = 64 ,
274+ };
275+ gdma_set_transfer_ability (dma_chan, &ability);
276+ #endif
269277
270278 // Enable DMA transfer callback
271279 static gdma_tx_event_callbacks_t tx_cbs = {
You can’t perform that action at this time.
0 commit comments