Skip to content

Commit

Permalink
mimxrt/boards/MIMXRT1170_EVK: Bring in display_support from sdk examp…
Browse files Browse the repository at this point in the history
…les.

Signed-off-by: Andrew Leech <[email protected]>
  • Loading branch information
pi-anl committed Oct 22, 2024
1 parent dfe8d7b commit 4092307
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
13 changes: 5 additions & 8 deletions ports/mimxrt/boards/MIMXRT1170_EVK/lvgl_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,9 @@ void lv_port_disp_init(void) {
// static lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
// lv_disp_drv_init(&disp_drv); /*Basic initialization*/

lv_display_t * disp = lv_display_create(DEMO_BUFFER_WIDTH, DEMO_BUFFER_HEIGHT);
lv_display_t * disp = lv_display_create(LCD_WIDTH, LCD_HEIGHT);
lv_display_set_flush_cb(disp, (void *)DEMO_FlushDisplay);
lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LV_DISPLAY_RENDER_MODE_PARTIAL);
// lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LV_DISPLAY_RENDER_MODE_DIRECT);


lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LCD_RENDER_MODE);

/*Set up the functions to access to your display*/

Expand Down Expand Up @@ -335,11 +332,11 @@ static void DEMO_WaitBufferSwitchOff(void) {
}


#if 0
#if 1

lv_display_flush_cb_t DEMO_FlushDisplay(lv_display_t * disp_drv, const lv_area_t * area, uint8_t * color_p) {
void DEMO_FlushDisplay(lv_display_t * disp_drv, const lv_area_t * area, uint8_t * color_p) {
// static void DEMO_FlushDisplay(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p) {
D2_On();
// D2_On();

if (!lv_disp_flush_is_last(disp_drv)) {
lv_disp_flush_ready(disp_drv);
Expand Down
9 changes: 6 additions & 3 deletions ports/mimxrt/boards/MIMXRT1170_EVK/lvgl_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
* Definitions
******************************************************************************/

#define DEMO_USE_ROTATE 1
#define DEMO_USE_ROTATE 0

#define LCD_WIDTH DEMO_BUFFER_WIDTH
#define LCD_HEIGHT DEMO_BUFFER_HEIGHT
#define LCD_WIDTH DEMO_PANEL_WIDTH
#define LCD_HEIGHT DEMO_PANEL_HEIGHT
#define LCD_FB_BYTE_PER_PIXEL DEMO_BUFFER_BYTE_PER_PIXEL

// #define LCD_RENDER_MODE LV_DISPLAY_RENDER_MODE_PARTIAL
#define LCD_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT

#define LV_PORT_DISP_INIT lv_port_disp_init
#define LV_PORT_INDEV_INIT lv_port_indev_init
// #define LV_PORT_INDEV_DEINIT lv_port_disp_deinit
Expand Down

0 comments on commit 4092307

Please sign in to comment.