Skip to content
Snippets Groups Projects
Commit 38810261 authored by Grzegorz Gwóźdź's avatar Grzegorz Gwóźdź
Browse files

Add reference


Signed-off-by: default avatarGrzegorz Gwozdz <grzegorz.gwozdz@huawei.com>
parent ca029039
No related branches found
No related tags found
No related merge requests found
......@@ -50,11 +50,11 @@ void lock_stop_led_rotating_timer_handler(k_timer *timer_id)
LOG_DBG("Got to this timer_handler...\n");
LedRotatingDoorlock::timer_wrapper *wrapper =
CONTAINER_OF(timer_id, struct LedRotatingDoorlock::timer_wrapper, timer);
wrapper->lock->lock_rotating_stop();
wrapper->lock.lock_rotating_stop();
}
LedRotatingDoorlock::LedRotatingDoorlock() : wrapper(this)
LedRotatingDoorlock::LedRotatingDoorlock() : wrapper(*this)
{
led_init();
LOG_INF("Initialized\n");
......
......@@ -30,10 +30,10 @@ public:
private:
struct timer_wrapper
{
timer_wrapper(LedRotatingDoorlock * new_lock) :
timer_wrapper(LedRotatingDoorlock & new_lock) :
lock(new_lock) { };
LedRotatingDoorlock *lock;
LedRotatingDoorlock & lock;
k_timer timer;
} wrapper;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment