Update references to LV_DISPLAY_WIDTH
This commit is contained in:
parent
6a451cacf7
commit
55c314b685
9 changed files with 24 additions and 25 deletions
|
@ -124,10 +124,10 @@ void sh1107_set_px_cb(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t b
|
|||
uint8_t bit_index = 0;
|
||||
|
||||
#if defined CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE
|
||||
byte_index = y + (( x>>3 ) * CONFIG_LV_DISPLAY_HEIGHT);
|
||||
byte_index = y + (( x>>3 ) * LV_VER_RES_MAX);
|
||||
bit_index = x & 0x7;
|
||||
#elif defined CONFIG_LV_DISPLAY_ORIENTATION_PORTRAIT
|
||||
byte_index = x + (( y>>3 ) * CONFIG_LV_DISPLAY_WIDTH);
|
||||
byte_index = x + (( y>>3 ) * LV_HOR_RES_MAX);
|
||||
bit_index = y & 0x7;
|
||||
#endif
|
||||
|
||||
|
@ -159,9 +159,9 @@ void sh1107_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo
|
|||
sh1107_send_cmd(0xB0 | i); // Set Page Start Address for Page Addressing Mode
|
||||
size = area->y2 - area->y1 + 1;
|
||||
#if defined CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE
|
||||
ptr = color_map + i * CONFIG_LV_DISPLAY_HEIGHT;
|
||||
ptr = color_map + i * LV_VER_RES_MAX;
|
||||
#else
|
||||
ptr = color_map + i * CONFIG_LV_DISPLAY_WIDTH;
|
||||
ptr = color_map + i * LV_HOR_RES_MAX;
|
||||
#endif
|
||||
if(i != row2){
|
||||
sh1107_send_data( (void *) ptr, size);
|
||||
|
@ -177,8 +177,8 @@ void sh1107_rounder(struct _disp_drv_t * disp_drv, lv_area_t *area)
|
|||
// workaround: always send complete size display buffer
|
||||
area->x1 = 0;
|
||||
area->y1 = 0;
|
||||
area->x2 = CONFIG_LV_DISPLAY_WIDTH-1;
|
||||
area->y2 = CONFIG_LV_DISPLAY_HEIGHT-1;
|
||||
area->x2 = LV_HOR_RES_MAX-1;
|
||||
area->y2 = LV_VER_RES_MAX-1;
|
||||
}
|
||||
|
||||
void sh1107_sleep_in()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue