ST7789: Display offsets are now runtime configurable

We don't change previous functionality by adding a helper function that sets the user offsets when initializing the display
This commit is contained in:
C47D 2022-01-06 00:05:03 -06:00 committed by Carlos Diaz
parent 31399e012a
commit 9ee177b684
2 changed files with 78 additions and 31 deletions

View file

@ -115,6 +115,26 @@ void st7789_init(lv_disp_drv_t *drv);
*/
void st7789_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map);
/**
* Set display buffer offset at x axis
*/
void st7789_set_x_offset(const uint16_t offset);
/**
* Set display buffer offset at y axis
*/
void st7789_set_y_offset(const uint16_t offset);
/**
* Get display buffer offset at x axis
*/
uint16_t st7789_x_offset(void);
/**
* Get display buffer offset at y axis
*/
uint16_t st7789_y_offset(void);
/**
* Display updated callback
*