Skip to content

Commit 2ef97a9

Browse files
authored
Merge pull request #718 from Lukaswnd/master
Update deprecated function in gdma_lcd_parallel16.cpp and dma_parallel_io.cpp
2 parents 2f7f535 + 9f5e1ad commit 2ef97a9

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

src/platforms/esp32c6/dma_parallel_io.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,16 @@ bool Bus_Parallel16::init(void)
140140
.auto_update_desc = false};
141141
gdma_apply_strategy(dma_chan, &strategy_config);
142142

143-
gdma_transfer_ability_t ability = {
144-
.sram_trans_align = 32,
145-
.psram_trans_align = 64,
143+
gdma_transfer_config_t transfer_config = {
144+
#ifdef SPIRAM_DMA_BUFFER
145+
.max_data_burst_size = 64,
146+
.access_ext_mem = true
147+
#else
148+
.max_data_burst_size = 32,
149+
.access_ext_mem = false
150+
#endif
146151
};
147-
gdma_set_transfer_ability(dma_chan, &ability);
152+
gdma_config_transfer(dma_chan, &transfer_config);
148153

149154
// Enable DMA transfer callback
150155
static gdma_tx_event_callbacks_t tx_cbs = {

src/platforms/esp32s3/gdma_lcd_parallel16.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,16 @@
256256
};
257257
gdma_apply_strategy(dma_chan, &strategy_config);
258258

259-
gdma_transfer_ability_t ability = {
260-
.sram_trans_align = 32,
261-
.psram_trans_align = 64,
259+
gdma_transfer_config_t transfer_config = {
260+
#ifdef SPIRAM_DMA_BUFFER
261+
.max_data_burst_size = 64,
262+
.access_ext_mem = true
263+
#else
264+
.max_data_burst_size = 32,
265+
.access_ext_mem = false
266+
#endif
262267
};
263-
gdma_set_transfer_ability(dma_chan, &ability);
268+
gdma_config_transfer(dma_chan, &transfer_config);
264269

265270
// Enable DMA transfer callback
266271
static gdma_tx_event_callbacks_t tx_cbs = {

0 commit comments

Comments
 (0)