Check EPD sleep inside direction function.

This commit is contained in:
imi415 2021-01-12 23:28:52 +08:00
parent ee058f9d78
commit 59c7cbd276
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
1 changed files with 4 additions and 0 deletions

View File

@ -177,6 +177,10 @@ depg0213_ret_t depg0213_epd_deepsleep(depg0213_epd_t *epd) {
depg0213_ret_t depg0213_epd_direction(depg0213_epd_t *epd, depg0213_direction_t direction) {
if(epd->deep_sleep) {
DEPG0213_ERROR_CHECK(depg0213_epd_init(epd));
}
// Default mode: VERTICAL, X: 0x0C->0x00, Y: 0xD3->0x00, AM-|Y-|X-
uint8_t cmd_ram_x_address[] = { 0x44, 0x0C, 0x00 }; // CMD, START, END
uint8_t cmd_ram_y_address[] = { 0x45, 0xD3, 0x00, 0x00, 0x00 }; // CMD, START_L, START_H, END_L, END_H