stmhal: pyb: Use gc() function as defined by standard module "gc".

TODO: Get rid of this compatibility define and rely on standard module.
This commit is contained in:
Paul Sokolovsky 2014-05-06 02:27:29 +03:00
parent f9e54e0ea5
commit 33b3a6905d
3 changed files with 2 additions and 9 deletions

View File

@ -72,10 +72,3 @@ void gc_collect(void) {
printf(" 1=" UINT_FMT " 2=" UINT_FMT " m=" UINT_FMT "\n", info.num_1block, info.num_2block, info.max_block);
}
}
static mp_obj_t pyb_gc(void) {
gc_collect();
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_0(pyb_gc_obj, pyb_gc);

View File

@ -40,4 +40,4 @@ extern uint32_t _ram_end;
void gc_collect(void);
MP_DECLARE_CONST_FUN_OBJ(pyb_gc_obj);
MP_DECLARE_CONST_FUN_OBJ(gc_collect_obj);

View File

@ -305,7 +305,7 @@ STATIC const mp_map_elem_t pyb_module_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_info), (mp_obj_t)&pyb_info_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_unique_id), (mp_obj_t)&pyb_unique_id_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_freq), (mp_obj_t)&pyb_freq_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_gc), (mp_obj_t)&pyb_gc_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_gc), (mp_obj_t)&gc_collect_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_repl_info), (mp_obj_t)&pyb_set_repl_info_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_wfi), (mp_obj_t)&pyb_wfi_obj },