Prevent lua error when running paper.init() multiple times
This commit is contained in:
parent
d18e9c5234
commit
14727e0124
1 changed files with 3 additions and 0 deletions
|
|
@ -9,6 +9,9 @@ EpdiyHighlevelState hl;
|
|||
uint8_t* fb;
|
||||
|
||||
static int init (lua_State *L) {
|
||||
// prevent repeated initialization
|
||||
if (fb != NULL) return 0;
|
||||
|
||||
epd_init(&epd_board_lilygo_t5_47, &ED047TC1, EPD_LUT_64K);
|
||||
// epd_set_vcom(1560);
|
||||
hl = epd_hl_init(WAVEFORM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue