Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions gen/gen_mpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ def register_int_ptr_type(convertor, *types):
static const mp_lv_obj_type_t mp_lv_{base_obj}_type;
static const mp_lv_obj_type_t *mp_lv_obj_types[];

static inline const mp_obj_type_t *get_BaseObj_type()
static inline const mp_obj_type_t *get_BaseObj_type(void)
{{
return mp_lv_{base_obj}_type.mp_obj_type;
}}
Expand Down Expand Up @@ -1214,7 +1214,7 @@ def register_int_ptr_type(convertor, *types):
return mp_lv_obj->callbacks;
}

static inline const mp_obj_type_t *get_BaseObj_type();
static inline const mp_obj_type_t *get_BaseObj_type(void);

static void mp_lv_delete_cb(lv_event_t * e)
{
Expand All @@ -1235,10 +1235,10 @@ def register_int_ptr_type(convertor, *types):
{
// Find the object type
const mp_obj_type_t *mp_obj_type = get_BaseObj_type();
const lv_obj_class_t *lv_obj_class = lv_obj_get_class(lv_obj);
const lv_obj_class_t *lv_obj_cls = lv_obj_get_class(lv_obj);
const mp_lv_obj_type_t **iter = &mp_lv_obj_types[0];
for (; *iter; iter++) {
if ((*iter)->lv_obj_class == lv_obj_class) {
if ((*iter)->lv_obj_class == lv_obj_cls) {
mp_obj_type = (*iter)->mp_obj_type;
break;
}
Expand Down Expand Up @@ -1345,12 +1345,15 @@ def register_int_ptr_type(convertor, *types):
int mp_lv_roots_initialized = 0;
int lvgl_mod_initialized = 0;

/* Prototype definition to make -Werror=missing-prototype happy */
void mp_lv_log_cb(lv_log_level_t level, const char * buf);

void mp_lv_log_cb(lv_log_level_t level, const char * buf){

mp_printf(&mp_plat_print, buf);
}

void mp_lv_init_gc()
void mp_lv_init_gc(void)
{
if (!MP_STATE_VM(mp_lv_roots_initialized)) {
// mp_printf(&mp_plat_print, "[ INIT GC ]");
Expand All @@ -1359,7 +1362,7 @@ def register_int_ptr_type(convertor, *types):
}
}

void mp_lv_deinit_gc()
void mp_lv_deinit_gc(void)
{

// mp_printf(&mp_plat_print, "[ DEINIT GC ]");
Expand Down Expand Up @@ -2427,7 +2430,7 @@ def try_generate_struct(struct_name, struct):
* Struct {struct_name}
*/

static inline const mp_obj_type_t *get_mp_{sanitized_struct_name}_type();
static inline const mp_obj_type_t *get_mp_{sanitized_struct_name}_type(void);

static inline void* mp_write_ptr_{sanitized_struct_name}(mp_obj_t self_in)
{{
Expand Down Expand Up @@ -2495,7 +2498,7 @@ def try_generate_struct(struct_name, struct):
parent, &mp_lv_base_struct_type
);

static inline const mp_obj_type_t *get_mp_{sanitized_struct_name}_type()
static inline const mp_obj_type_t *get_mp_{sanitized_struct_name}_type(void)
{{
return &mp_{sanitized_struct_name}_type;
}}
Expand Down
4 changes: 2 additions & 2 deletions lv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@

/*Garbage Collector settings
*Used if LVGL is bound to higher level language and the memory is managed by that language*/
extern void mp_lv_init_gc();
extern void mp_lv_deinit_gc();
extern void mp_lv_init_gc(void);
extern void mp_lv_deinit_gc(void);
#define LV_GC_INIT() mp_lv_init_gc()
#define LV_GC_DEINIT() mp_lv_deinit_gc()

Expand Down
Loading