Commit 598aad21 authored by Daniel Campora's avatar Daniel Campora
Browse files

cc3200: Fix bug in pybsleep remove.

parent 475c60ee
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment