-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8d92c3
commit cee3dca
Showing
3 changed files
with
95 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,16 @@ | |
return true; | ||
} | ||
|
||
// LCD end of transaction interrupt | ||
static void IRAM_ATTR lcd_isr(void* arg) { | ||
|
||
LCD_CAM.lc_dma_int_clr.lcd_trans_done_int_clr = 1; | ||
|
||
previousBufferFree = true; | ||
|
||
} | ||
|
||
|
||
lcd_cam_dev_t* getDev() | ||
{ | ||
return &LCD_CAM; | ||
|
@@ -259,11 +269,21 @@ | |
gdma_set_transfer_ability(dma_chan, &ability); | ||
|
||
// Enable DMA transfer callback | ||
/* | ||
static gdma_tx_event_callbacks_t tx_cbs = { | ||
// .on_trans_eof is literally the only gdma tx event type available | ||
.on_trans_eof = gdma_on_trans_eof_callback | ||
}; | ||
gdma_register_tx_event_callbacks(dma_chan, &tx_cbs, NULL); | ||
*/ | ||
|
||
// | ||
// Enable Transaction Done interrupt | ||
LCD_CAM.lc_dma_int_ena.lcd_trans_done_int_ena = 1; | ||
|
||
// Allocate a level 1 intterupt: lowest priority, as ISR isn't urgent and may take a long time to complete | ||
esp_intr_alloc(ETS_LCD_CAM_INTR_SOURCE, (int)(ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_LEVEL1), lcd_isr, NULL, NULL); | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
Lukaswnd
Contributor
|
||
|
||
|
||
// This uses a busy loop to wait for each DMA transfer to complete... | ||
|
Why? some panels are able to achive the 20mhz, why not set the default low, so most people won't complain and still enable higher frequencies?