diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index e606180fa..416937af8 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -513,7 +513,6 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /* Save the last keys before anything else. * They need to be already saved if the the function returns for any reason*/ lv_indev_state_t last_state = i->proc.types.keypad.last_state; - uint32_t last_key = i->proc.types.keypad.last_key; i->proc.types.keypad.last_state = data->state; i->proc.types.keypad.last_key = data->key; diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index fbbaf33bd..8ef301738 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1970,15 +1970,25 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) #if LV_USE_USER_DATA_SINGLE /** - * Get a pointer to the object's user data + * Get the object's user data * @param obj pointer to an object - * @return pointer to the user data + * @return user data */ lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj) { return obj->user_data; } +/** + * Get a pointer to the object's user data + * @param obj pointer to an object + * @return pointer to the user data + */ +lv_obj_user_data_t *lv_obj_get_user_data_ptr(lv_obj_t * obj) +{ + return &obj->user_data; +} + /** * Set the object's user data. The data will be copied. * @param obj pointer to an object diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 6dd264db6..0e8485030 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -908,12 +908,19 @@ void * lv_obj_get_ext_attr(const lv_obj_t * obj); void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); #if LV_USE_USER_DATA_SINGLE +/** + * Get the object's user data + * @param obj pointer to an object + * @return user data + */ +lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj); + /** * Get a pointer to the object's user data * @param obj pointer to an object * @return pointer to the user data */ -lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj); +lv_obj_user_data_t *lv_obj_get_user_data_ptr(lv_obj_t * obj); /** * Set the object's user data. The data will be copied.