cc3200: Fix bug in pybsleep remove.
This commit is contained in:
parent
475c60eefc
commit
598aad2140
@ -66,7 +66,7 @@ mp_obj_t mpcallback_new (mp_obj_t parent, mp_obj_t handler, const mp_cb_methods_
|
||||
self->methods = (mp_cb_methods_t *)methods;
|
||||
self->isenabled = enable;
|
||||
// remove it in case it was already registered
|
||||
mpcallback_remove(self->parent);
|
||||
mpcallback_remove(parent);
|
||||
mp_obj_list_append(&MP_STATE_PORT(mpcallback_obj_list), self);
|
||||
return self;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ void pybsleep_add (const mp_obj_t obj, WakeUpCB_t wakeup) {
|
||||
sleep_obj->obj = obj;
|
||||
sleep_obj->wakeup = wakeup;
|
||||
// remove it in case it was already registered
|
||||
pybsleep_remove (sleep_obj);
|
||||
pybsleep_remove (obj);
|
||||
mp_obj_list_append(&MP_STATE_PORT(pybsleep_obj_list), sleep_obj);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user