ZJY 0.96": Updated display offset.

master
imi415 3 months ago
parent 5739cc831b
commit ebccc93243
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A

@ -4,6 +4,9 @@
#include "epd_private.h"
#define LCD_X_OFFSET 26
#define LCD_Y_OFFSET 1
static uint8_t lcd_zjy096s0800_init_seq[] = {
0x01, 0xF0, 0xC3, // Enable command part 1
0x01, 0xF0, 0x96, // Enable command part 2
@ -22,21 +25,21 @@ epd_ret_t lcd_zjy096s0800_window(lcd_zjy096s0800_t *lcd, epd_coord_t *coord) {
uint16_t x_offset, y_offset;
switch (lcd->config.direction) {
case LCD_ZJY096S0800_DIR_90:
x_offset = 0;
y_offset = 0;
x_offset = 0 + LCD_Y_OFFSET;
y_offset = 0 + LCD_X_OFFSET;
break;
case LCD_ZJY096S0800_DIR_180:
x_offset = 320;
y_offset = 480;
x_offset = 162 - LCD_X_OFFSET;
y_offset = 132 - LCD_Y_OFFSET;
break;
case LCD_ZJY096S0800_DIR_270:
x_offset = 480;
y_offset = 320;
x_offset = 132 - LCD_Y_OFFSET;
y_offset = 162 - LCD_X_OFFSET;
break;
case LCD_ZJY096S0800_DIR_0:
default:
x_offset = 0;
y_offset = 0;
x_offset = 0 + LCD_X_OFFSET;
y_offset = 0 + LCD_Y_OFFSET;
}
real_x_start = coord->x_start + x_offset;

Loading…
Cancel
Save