cc3200: Fix bug in pybsleep remove.

This commit is contained in:
Daniel Campora 2015-09-03 10:14:24 +02:00
parent 475c60eefc
commit 598aad2140
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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);
}