From 435a1379d3de7dbbf61d2b1f986a4d835bd435b5 Mon Sep 17 00:00:00 2001 From: imi415 Date: Fri, 15 Jan 2021 22:25:42 +0800 Subject: [PATCH] Fix #2, modify array length. --- depg0213_epd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depg0213_epd.c b/depg0213_epd.c index 62a2e42..f4047d5 100644 --- a/depg0213_epd.c +++ b/depg0213_epd.c @@ -81,7 +81,7 @@ depg0213_ret_t _depg0213_load_lut(depg0213_epd_t *epd) { DEPG0213_ERROR_CHECK(epd->cb.write_cmd_cb(epd->user_data, &lut_command, 0x01)); DEPG0213_ERROR_CHECK(epd->cb.write_data_cb(epd->user_data, DEPG0213_LUT_FULL_SELECTION, 70)); #else - uint8_t lut_command[2] = { 0x18, 0x80, 0x22, 0xB1, 0x20 }; + uint8_t lut_command[5] = { 0x18, 0x80, 0x22, 0xB1, 0x20 }; DEPG0213_ERROR_CHECK(epd->cb.write_cmd_cb(epd->user_data, lut_command, 0x02)); DEPG0213_ERROR_CHECK(epd->cb.write_cmd_cb(epd->user_data, &lut_command[2], 0x02)); DEPG0213_ERROR_CHECK(epd->cb.write_cmd_cb(epd->user_data, &lut_command[4], 0x01));