Lines Matching refs:buzzer
100 static int start_buzzer(struct ipso_buzzer_data *buzzer) in start_buzzer() argument
103 struct lwm2m_obj_path path = LWM2M_OBJ(IPSO_OBJECT_BUZZER_ID, buzzer->obj_inst_id, in start_buzzer()
107 if (buzzer->active) { in start_buzzer()
112 temp = (uint32_t)(buzzer->min_off_time * MSEC_PER_SEC); in start_buzzer()
113 if (k_uptime_get() < buzzer->trigger_offset + temp) { in start_buzzer()
119 buzzer->trigger_offset = k_uptime_get(); in start_buzzer()
122 temp = (uint32_t)(buzzer->delay_duration * MSEC_PER_SEC); in start_buzzer()
123 k_work_reschedule(&buzzer->buzzer_work, K_MSEC(temp)); in start_buzzer()
128 static int stop_buzzer(struct ipso_buzzer_data *buzzer, bool cancel) in stop_buzzer() argument
130 struct lwm2m_obj_path path = LWM2M_OBJ(IPSO_OBJECT_BUZZER_ID, buzzer->obj_inst_id, in stop_buzzer()
134 if (!buzzer->active) { in stop_buzzer()
141 k_work_cancel_delayable(&buzzer->buzzer_work); in stop_buzzer()
171 struct ipso_buzzer_data *buzzer = CONTAINER_OF(dwork, in buzzer_work_cb() local
174 stop_buzzer(buzzer, false); in buzzer_work_cb()