diff --git a/applications/gui/canvas.c b/applications/gui/canvas.c index 7076fdc6..6c68176a 100644 --- a/applications/gui/canvas.c +++ b/applications/gui/canvas.c @@ -2,6 +2,7 @@ #include "icon_i.h" #include +#include uint8_t u8g2_gpio_and_delay_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_ptr); uint8_t u8x8_hw_spi_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_ptr); @@ -9,6 +10,8 @@ uint8_t u8x8_hw_spi_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_ Canvas* canvas_init() { Canvas* canvas = furi_alloc(sizeof(Canvas)); + api_hal_power_insomnia_enter(); + u8g2_Setup_st7565_erc12864_alt_f( &canvas->fb, U8G2_R0, u8x8_hw_spi_stm32, u8g2_gpio_and_delay_stm32); @@ -19,6 +22,8 @@ Canvas* canvas_init() { u8g2_SetPowerSave(&canvas->fb, 0); u8g2_SendBuffer(&canvas->fb); + api_hal_power_insomnia_exit(); + return canvas; }