diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 9c1b30f32..1ae7d466c 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -139,6 +139,7 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) if(disp->refr_task == NULL) return NULL; disp->inv_p = 0; + disp->last_activity_time = 0; disp->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/ disp->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ diff --git a/src/lv_misc/lv_math.c b/src/lv_misc/lv_math.c index 77db624c4..520c0084a 100644 --- a/src/lv_misc/lv_math.c +++ b/src/lv_misc/lv_math.c @@ -94,9 +94,9 @@ int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3) return v1 + v2 + v3 + v4; } -#define BITSPERLONG 32 +#define BITSPERLONG 32UL -#define TOP2BITS(x) ((x & (3L << (BITSPERLONG-2))) >> (BITSPERLONG-2)) +#define TOP2BITS(x) ((x & (3UL << (BITSPERLONG-2))) >> (BITSPERLONG-2)) void lv_sqrt(uint32_t x, lv_sqrt_res_t * q) {