Home
last modified time | relevance | path

Searched refs:notify (Results 1 – 25 of 151) sorted by relevance

1234567

/Zephyr-latest/tests/lib/notify/src/
Dmain.c33 struct sys_notify notify = { in ZTEST() local
39 zassert_equal(sys_notify_validate(&notify), -EINVAL, in ZTEST()
50 struct sys_notify notify; in ZTEST() local
53 memset(&notify, 0xac, sizeof(notify)); in ZTEST()
54 rc = sys_notify_validate(&notify); in ZTEST()
58 sys_notify_init_spinwait(&notify); in ZTEST()
59 rc = sys_notify_validate(&notify); in ZTEST()
63 zassert_false(sys_notify_uses_callback(&notify), in ZTEST()
66 zassert_equal(notify.flags, SYS_NOTIFY_METHOD_SPINWAIT, in ZTEST()
69 set_extflags(&notify, xflags); in ZTEST()
[all …]
/Zephyr-latest/include/zephyr/sys/
Dnotify.h178 static inline uint32_t sys_notify_get_method(const struct sys_notify *notify) in sys_notify_get_method() argument
180 uint32_t method = notify->flags >> SYS_NOTIFY_METHOD_POS; in sys_notify_get_method()
204 int sys_notify_validate(struct sys_notify *notify);
222 sys_notify_generic_callback sys_notify_finalize(struct sys_notify *notify,
237 static inline int sys_notify_fetch_result(const struct sys_notify *notify, in sys_notify_fetch_result() argument
240 __ASSERT_NO_MSG(notify != NULL); in sys_notify_fetch_result()
244 if (sys_notify_get_method(notify) == SYS_NOTIFY_METHOD_COMPLETED) { in sys_notify_fetch_result()
246 *result = notify->result; in sys_notify_fetch_result()
264 static inline void sys_notify_init_spinwait(struct sys_notify *notify) in sys_notify_init_spinwait() argument
266 __ASSERT_NO_MSG(notify != NULL); in sys_notify_init_spinwait()
[all …]
/Zephyr-latest/lib/utils/
Dnotify.c11 int sys_notify_validate(struct sys_notify *notify) in sys_notify_validate() argument
15 if (notify == NULL) { in sys_notify_validate()
20 switch (sys_notify_get_method(notify)) { in sys_notify_validate()
24 if (notify->method.callback == NULL) { in sys_notify_validate()
30 if (notify->method.signal == NULL) { in sys_notify_validate()
42 notify->result = 0; in sys_notify_validate()
48 sys_notify_generic_callback sys_notify_finalize(struct sys_notify *notify, in sys_notify_finalize() argument
53 uint32_t method = sys_notify_get_method(notify); in sys_notify_finalize()
58 notify->result = res; in sys_notify_finalize()
63 rv = notify->method.callback; in sys_notify_finalize()
[all …]
/Zephyr-latest/soc/nordic/nrf53/
Dnrf53_cpunet_mgmt.c24 static void onoff_start(struct onoff_manager *mgr, onoff_notify_fn notify) in onoff_start() argument
28 notify(mgr, 0); in onoff_start()
31 static void onoff_stop(struct onoff_manager *mgr, onoff_notify_fn notify) in onoff_stop() argument
35 notify(mgr, 0); in onoff_stop()
57 sys_notify_init_spinwait(&cli.notify); in nrf53_cpunet_enable()
63 ret = sys_notify_fetch_result(&cli.notify, &ignored); in nrf53_cpunet_enable()
/Zephyr-latest/soc/nordic/nrf54h/gpd/
Dgpd.c31 onoff_notify_fn notify; member
38 static void start(struct onoff_manager *mgr, onoff_notify_fn notify);
39 static void stop(struct onoff_manager *mgr, onoff_notify_fn notify);
156 gpd_mgr->notify(&gpd_mgr->mgr, 0); in evt_handler()
160 gpd_mgr->notify(&gpd_mgr->mgr, -EIO); in evt_handler()
176 static void start(struct onoff_manager *mgr, onoff_notify_fn notify) in start() argument
180 gpd_mgr->notify = notify; in start()
183 notify(mgr, 0); in start()
190 notify(mgr, -EIO); in start()
195 static void stop(struct onoff_manager *mgr, onoff_notify_fn notify) in stop() argument
[all …]
/Zephyr-latest/subsys/bluetooth/audio/
Dvcp_vol_rend.c69 ATOMIC_DEFINE(notify, NOTIFY_NUM);
93 static const char *vol_rend_notify_str(enum vol_rend_notify notify) in vol_rend_notify_str() argument
95 switch (notify) { in vol_rend_notify_str()
105 static void notify_work_reschedule(struct bt_vcp_vol_rend *inst, enum vol_rend_notify notify, in notify_work_reschedule() argument
110 atomic_set_bit(inst->notify, notify); in notify_work_reschedule()
114 LOG_ERR("Failed to reschedule %s notification err %d", vol_rend_notify_str(notify), in notify_work_reschedule()
117 LOG_DBG("%s notification scheduled in %dms", vol_rend_notify_str(notify), in notify_work_reschedule()
122 static void notify(struct bt_vcp_vol_rend *inst, enum vol_rend_notify notify, in notify() argument
129 notify_work_reschedule(inst, notify, K_USEC(BT_AUDIO_NOTIFY_RETRY_DELAY_US)); in notify()
131 LOG_ERR("Notify %s err %d", vol_rend_notify_str(notify), err); in notify()
[all …]
Dvocs.c65 static const char *vocs_notify_str(enum bt_vocs_notify notify) in vocs_notify_str() argument
67 switch (notify) { in vocs_notify_str()
79 static void notify_work_reschedule(struct bt_vocs_server *inst, enum bt_vocs_notify notify, in notify_work_reschedule() argument
84 atomic_set_bit(inst->notify, notify); in notify_work_reschedule()
89 vocs_notify_str(notify), err); in notify_work_reschedule()
93 static void notify(struct bt_vocs_server *inst, enum bt_vocs_notify notify, in notify() argument
100 notify_work_reschedule(inst, notify, K_USEC(BT_AUDIO_NOTIFY_RETRY_DELAY_US)); in notify()
102 LOG_ERR("Notify %s err %d", vocs_notify_str(notify), err); in notify()
111 if (atomic_test_and_clear_bit(inst->notify, NOTIFY_STATE)) { in notify_work_handler()
112 notify(inst, NOTIFY_STATE, BT_UUID_VOCS_STATE, &inst->state, sizeof(inst->state)); in notify_work_handler()
[all …]
Daics.c179 static const char *aics_notify_str(enum bt_aics_notify notify) in aics_notify_str() argument
181 switch (notify) { in aics_notify_str()
193 static void notify_work_reschedule(struct bt_aics *inst, enum bt_aics_notify notify, in notify_work_reschedule() argument
198 atomic_set_bit(inst->srv.notify, notify); in notify_work_reschedule()
203 aics_notify_str(notify), err); in notify_work_reschedule()
207 static void notify(struct bt_aics *inst, enum bt_aics_notify notify, const struct bt_uuid *uuid, in notify() function
214 notify_work_reschedule(inst, notify, K_USEC(BT_AUDIO_NOTIFY_RETRY_DELAY_US)); in notify()
216 LOG_ERR("Notify %s err %d", aics_notify_str(notify), err); in notify()
225 if (atomic_test_and_clear_bit(inst->srv.notify, AICS_NOTIFY_STATE)) { in notify_work_handler()
226 notify(inst, AICS_NOTIFY_STATE, BT_UUID_AICS_STATE, &inst->srv.state, in notify_work_handler()
[all …]
Dmcs.c44 static void notify(const struct bt_uuid *uuid, const void *data, uint16_t len);
663 notify(BT_UUID_MCS_MEDIA_CONTROL_POINT, &cmd_ntf, sizeof(cmd_ntf)); in write_control_point()
679 notify(BT_UUID_MCS_MEDIA_CONTROL_POINT, &cmd_ntf, sizeof(cmd_ntf)); in write_control_point()
748 notify(BT_UUID_MCS_SEARCH_CONTROL_POINT, &result_code, sizeof(result_code)); in write_search_control_point()
973 static void notify(const struct bt_uuid *uuid, const void *data, uint16_t len) in notify() function
1061 notify(BT_UUID_MCS_TRACK_DURATION, &duration_le, sizeof(duration_le)); in notify_cb()
1069 notify(BT_UUID_MCS_TRACK_POSITION, &position_le, sizeof(position_le)); in notify_cb()
1076 notify(BT_UUID_MCS_PLAYBACK_SPEED, &speed, sizeof(speed)); in notify_cb()
1083 notify(BT_UUID_MCS_SEEKING_SPEED, &speed, sizeof(speed)); in notify_cb()
1094 notify(BT_UUID_MCS_CURRENT_TRACK_OBJ_ID, track_id_le, sizeof(track_id_le)); in notify_cb()
[all …]
/Zephyr-latest/drivers/clock_control/
Dclock_control_nrf2_common.c55 onoff_notify_fn notify) in onoff_start_option() argument
63 onoff->notify = notify; in onoff_start_option()
70 onoff_notify_fn notify) in onoff_stop_option() argument
81 notify(mgr, 0); in onoff_stop_option()
176 onoff_notify_fn notify = cfg->onoff[i].notify; in clock_config_update_end() local
178 if (notify) { in clock_config_update_end()
189 cfg->onoff[i].notify = NULL; in clock_config_update_end()
190 notify(&cfg->onoff[i].mgr, status); in clock_config_update_end()
229 sys_notify_init_callback(&req.cli.notify, sync_cb); in nrf_clock_control_request_sync()
Dclock_control_nrf2_hfxo.c22 onoff_notify_fn notify; member
69 if (dev_data->notify) { in hfxo_start_up_timer_handler()
70 dev_data->notify(&dev_data->mgr, 0); in hfxo_start_up_timer_handler()
108 static void onoff_start_hfxo(struct onoff_manager *mgr, onoff_notify_fn notify) in onoff_start_hfxo() argument
113 dev_data->notify = notify; in onoff_start_hfxo()
164 static void onoff_stop_hfxo(struct onoff_manager *mgr, onoff_notify_fn notify) in onoff_stop_hfxo() argument
170 notify(mgr, 0); in onoff_stop_hfxo()
Dclock_control_nrf.c428 onoff_notify_fn notify) in onoff_stop() argument
433 notify(mgr, res); in onoff_stop()
442 onoff_notify_fn notify = user_data; in onoff_started_callback() local
444 notify(mgr, 0); in onoff_started_callback()
448 onoff_notify_fn notify) in onoff_start() argument
453 onoff_started_callback, notify, CTX_ONOFF); in onoff_start()
455 notify(mgr, err); in onoff_start()
558 sys_notify_init_spinwait(&cli.notify); in z_nrf_clock_control_lf_on()
/Zephyr-latest/tests/drivers/clock_control/onoff/src/
Dtest_clock_control_onoff.c46 sys_notify_init_spinwait(&cli.notify); in ZTEST()
50 while (sys_notify_fetch_result(&cli.notify, &err) < 0) { in ZTEST()
70 sys_notify_init_spinwait(&cli.notify); in ZTEST()
105 sys_notify_init_callback(&cli.notify, request_cb); in ZTEST()
/Zephyr-latest/tests/lib/onoff/src/
Dmain.c93 int rc = sys_notify_fetch_result(&cp->notify, &result); in cli_result()
113 onoff_notify_fn notify; member
121 tsp->notify = NULL; in reset_transit_state()
126 onoff_notify_fn notify, in run_transit() argument
131 tsp->notify = notify; in run_transit()
135 notify(srv, tsp->retval); in run_transit()
139 static void notify(struct transit_state *tsp) in notify() function
141 TC_PRINT("%s settle %d %p\n", tsp->tag, tsp->retval, tsp->notify); in notify()
142 tsp->notify(tsp->srv, tsp->retval); in notify()
143 tsp->notify = NULL; in notify()
[all …]
/Zephyr-latest/tests/boards/nrf/mram_latency/src/
Dmain.c56 sys_notify_init_callback(&req1.cli.notify, basic_cb); in ZTEST()
62 sys_notify_init_callback(&req2.cli.notify, basic_cb); in ZTEST()
87 sys_notify_init_callback(&req1.cli.notify, basic_cb); in ZTEST()
108 sys_notify_init_callback(&req->cli.notify, basic_cb); in timeout()
161 sys_notify_fetch_result(&early_client.notify, &early_result); in setup()
181 sys_notify_init_spinwait(&early_client.notify); in early_mram_client()
/Zephyr-latest/soc/nordic/common/
Dmram_latency.c66 static void no_latency_start(struct onoff_manager *mgr, onoff_notify_fn notify) in no_latency_start() argument
68 onoff_notify = notify; in no_latency_start()
72 static void no_latency_stop(struct onoff_manager *mgr, onoff_notify_fn notify) in no_latency_stop() argument
119 sys_notify_init_callback(&req.cli.notify, sync_req_cb); in mram_no_latency_sync_request()
/Zephyr-latest/include/zephyr/drivers/rtc/
Dmaxim_ds3231.h248 struct sys_notify *notify,
505 struct sys_notify *notify);
569 struct sys_notify *notify);
/Zephyr-latest/drivers/usb/uvb/
Duvb.h124 void (*notify)(const void *const priv, member
252 .notify = host_notify, \
/Zephyr-latest/samples/boards/nordic/clock_control/src/
Dmain.c61 sys_notify_init_callback(&cli.notify, sample_notify_cb); in main()
82 ret = sys_notify_fetch_result(&cli.notify, &res); in main()
/Zephyr-latest/samples/drivers/counter/maxim_ds3231/src/
Dmain.c200 struct sys_notify notify; in set_aligned_clock() local
206 sys_notify_init_signal(&notify, &ss); in set_aligned_clock()
210 rc = maxim_ds3231_set(ds3231, &sp, &notify); in set_aligned_clock()
265 struct sys_notify notify; in main() local
272 sys_notify_init_signal(&notify, &ss); in main()
276 rc = maxim_ds3231_synchronize(ds3231, &notify); in main()
/Zephyr-latest/subsys/bluetooth/controller/ll_sw/nordic/lll/
Dlll_clock.c45 sys_notify_init_callback(&state.cli.notify, clock_ready); in blocking_on()
59 sys_notify_init_spinwait(&lf_cli.notify); in lll_clock_init()
/Zephyr-latest/include/zephyr/logging/
Dlog_backend.h74 void (*notify)(const struct log_backend *const backend, member
356 if (backend->api->notify) { in log_backend_notify()
357 backend->api->notify(backend, event, arg); in log_backend_notify()
/Zephyr-latest/tests/drivers/clock_control/nrf_clock_control/src/
Dmain.c165 sys_notify_init_spinwait(&cli.notify); in test_request_release_clock_spec()
169 ret = sys_notify_fetch_result(&cli.notify, &res); in test_request_release_clock_spec()
253 sys_notify_init_spinwait(&cli.notify); in ZTEST()
295 sys_notify_init_spinwait(&cli.notify); in ZTEST()
/Zephyr-latest/drivers/counter/
Dmaxim_ds3231.c112 struct sys_notify *notify; member
783 struct sys_notify *notify = NULL; in sync_finish() local
789 notify = data->sync.notify; in sync_finish()
796 LOG_DBG("sync complete, notify %d to %p or %p\n", rc, notify, signal); in sync_finish()
799 if (notify != NULL) { in sync_finish()
801 (maxim_ds3231_notify_callback)sys_notify_finalize(notify, rc); in sync_finish()
804 cb(dev, notify, rc); in sync_finish()
1000 struct sys_notify *notify) in maxim_ds3231_synchronize() argument
1006 if (notify == NULL) { in maxim_ds3231_synchronize()
1024 data->sync.notify = notify; in maxim_ds3231_synchronize()
[all …]
/Zephyr-latest/doc/connectivity/bluetooth/shell/host/
Dgatt.rst21 The server can now notify the client with the command :code:`gatt notify`.

1234567