Lines Matching full:callback
16 * @brief Generic function to insert a callback to a callback list
19 * @param callback A pointer of the callback to insert to the list
24 struct smbus_callback *callback) in smbus_callback_set() argument
26 __ASSERT(callback, "No callback!"); in smbus_callback_set()
27 __ASSERT(callback->handler, "No callback handler!"); in smbus_callback_set()
30 sys_slist_find_and_remove(callbacks, &callback->node); in smbus_callback_set()
33 sys_slist_prepend(callbacks, &callback->node); in smbus_callback_set()
39 * @brief Generic function to remove a callback from a callback list
42 * @param callback A pointer of the callback to remove from the list
47 struct smbus_callback *callback) in smbus_callback_remove() argument
49 __ASSERT(callback, "No callback!"); in smbus_callback_remove()
50 __ASSERT(callback->handler, "No callback handler!"); in smbus_callback_remove()
53 !sys_slist_find_and_remove(callbacks, &callback->node)) { in smbus_callback_remove()
61 * @brief Generic function to go through and fire callback from a callback list
63 * @param list A pointer on the SMBus callback list
75 __ASSERT(cb->handler, "No callback handler!"); in smbus_fire_callbacks()
84 * @param callback A valid Application's callback structure pointer.
88 static inline void smbus_init_callback(struct smbus_callback *callback, in smbus_init_callback() argument
92 __ASSERT(callback, "Callback pointer should not be NULL"); in smbus_init_callback()
93 __ASSERT(handler, "Callback handler pointer should not be NULL"); in smbus_init_callback()
95 callback->handler = handler; in smbus_init_callback()
96 callback->addr = addr; in smbus_init_callback()