9090#define TICKER_PRIORITY_CRITICAL -128
9191
9292typedef uint8_t (* ticker_caller_id_get_cb_t )(uint8_t user_id );
93- typedef void (* ticker_sched_cb_t )(uint8_t caller_id , uint8_t callee_id , uint8_t chain ,
94- void * instance );
93+ typedef void (* ticker_sched_cb_t )(uint8_t caller_id , uint8_t callee_id ,
94+ uint8_t chain , void * instance );
9595typedef void (* ticker_trigger_set_cb_t )(uint32_t value );
9696
9797/** \brief Timer timeout function type.
9898 */
99- typedef void (* ticker_timeout_func ) (uint32_t ticks_at_expire , uint32_t remainder ,
100- uint16_t lazy , uint8_t force , void * context );
99+ typedef void (* ticker_timeout_func ) (uint32_t ticks_at_expire ,
100+ uint32_t remainder , uint16_t lazy ,
101+ uint8_t force , void * context );
101102
102103/** \brief Timer operation complete function type.
103104 */
@@ -106,21 +107,8 @@ typedef void (*ticker_op_func) (uint32_t status, void *op_context);
106107/** \brief Timer operation match callback function type.
107108 */
108109typedef bool (* ticker_op_match_func ) (uint8_t ticker_id , uint32_t ticks_slot ,
109- uint32_t ticks_to_expire , void * op_context );
110-
111- #if defined(CONFIG_BT_TICKER_EXT )
112- struct ticker_ext {
113- uint32_t ticks_slot_window ;/* Window in which the slot
114- * reservation may be re-scheduled
115- * to avoid collision
116- */
117- int32_t ticks_drift ; /* Applied drift since last expiry */
118- uint8_t reschedule_state ; /* State of re-scheduling of the
119- * node. See defines
120- * TICKER_RESCHEDULE_STATE_XXX
121- */
122- };
123- #endif /* CONFIG_BT_TICKER_EXT */
110+ uint32_t ticks_to_expire ,
111+ void * op_context );
124112
125113/** \brief Timer module initialization.
126114 *
@@ -134,31 +122,34 @@ struct ticker_ext {
134122 * \param[in] user_op
135123 */
136124uint32_t ticker_init (uint8_t instance_index , uint8_t count_node , void * node ,
137- uint8_t count_user , void * user , uint8_t count_op , void * user_op ,
138- ticker_caller_id_get_cb_t caller_id_get_cb ,
139- ticker_sched_cb_t sched_cb ,
140- ticker_trigger_set_cb_t trigger_set_cb );
125+ uint8_t count_user , void * user , uint8_t count_op ,
126+ void * user_op , ticker_caller_id_get_cb_t caller_id_get_cb ,
127+ ticker_sched_cb_t sched_cb ,
128+ ticker_trigger_set_cb_t trigger_set_cb );
141129bool ticker_is_initialized (uint8_t instance_index );
142130void ticker_trigger (uint8_t instance_index );
143131void ticker_worker (void * param );
144132void ticker_job (void * param );
145- uint32_t ticker_start (uint8_t instance_index , uint8_t user_id , uint8_t ticker_id ,
146- uint32_t ticks_anchor , uint32_t ticks_first , uint32_t ticks_periodic ,
147- uint32_t remainder_periodic , uint16_t lazy , uint32_t ticks_slot ,
148- ticker_timeout_func fp_timeout_func , void * context ,
149- ticker_op_func fp_op_func , void * op_context );
150- uint32_t ticker_update (uint8_t instance_index , uint8_t user_id , uint8_t ticker_id ,
151- uint32_t ticks_drift_plus , uint32_t ticks_drift_minus ,
152- uint32_t ticks_slot_plus , uint32_t ticks_slot_minus , uint16_t lazy ,
153- uint8_t force , ticker_op_func fp_op_func , void * op_context );
133+ uint32_t ticker_start (uint8_t instance_index , uint8_t user_id ,
134+ uint8_t ticker_id , uint32_t ticks_anchor ,
135+ uint32_t ticks_first , uint32_t ticks_periodic ,
136+ uint32_t remainder_periodic , uint16_t lazy ,
137+ uint32_t ticks_slot , ticker_timeout_func fp_timeout_func ,
138+ void * context , ticker_op_func fp_op_func ,
139+ void * op_context );
140+ uint32_t ticker_update (uint8_t instance_index , uint8_t user_id ,
141+ uint8_t ticker_id , uint32_t ticks_drift_plus ,
142+ uint32_t ticks_drift_minus , uint32_t ticks_slot_plus ,
143+ uint32_t ticks_slot_minus , uint16_t lazy , uint8_t force ,
144+ ticker_op_func fp_op_func , void * op_context );
154145uint32_t ticker_yield_abs (uint8_t instance_index , uint8_t user_id ,
155146 uint8_t ticker_id , uint32_t ticks_at_yield ,
156147 ticker_op_func fp_op_func , void * op_context );
157148uint32_t ticker_stop (uint8_t instance_index , uint8_t user_id , uint8_t ticker_id ,
158- ticker_op_func fp_op_func , void * op_context );
159- uint32_t ticker_stop_abs (uint8_t instance_index , uint8_t user_id , uint8_t ticker_id ,
160- uint32_t ticks_at_stop , ticker_op_func fp_op_func ,
161- void * op_context );
149+ ticker_op_func fp_op_func , void * op_context );
150+ uint32_t ticker_stop_abs (uint8_t instance_index , uint8_t user_id ,
151+ uint8_t ticker_id , uint32_t ticks_at_stop ,
152+ ticker_op_func fp_op_func , void * op_context );
162153uint32_t ticker_next_slot_get (uint8_t instance_index , uint8_t user_id ,
163154 uint8_t * ticker_id , uint32_t * ticks_current ,
164155 uint32_t * ticks_to_expire ,
@@ -170,23 +161,37 @@ uint32_t ticker_next_slot_get_ext(uint8_t instance_index, uint8_t user_id,
170161 void * match_op_context ,
171162 ticker_op_func fp_op_func , void * op_context );
172163uint32_t ticker_job_idle_get (uint8_t instance_index , uint8_t user_id ,
173- ticker_op_func fp_op_func , void * op_context );
164+ ticker_op_func fp_op_func , void * op_context );
174165void ticker_job_sched (uint8_t instance_index , uint8_t user_id );
175166uint32_t ticker_ticks_now_get (void );
176167uint32_t ticker_ticks_diff_get (uint32_t ticks_now , uint32_t ticks_old );
168+
177169#if !defined(CONFIG_BT_TICKER_LOW_LAT ) && \
178170 !defined(CONFIG_BT_TICKER_SLOT_AGNOSTIC )
179- uint32_t ticker_priority_set (uint8_t instance_index , uint8_t user_id , uint8_t ticker_id ,
180- int8_t priority , ticker_op_func fp_op_func ,
181- void * op_context );
171+ uint32_t ticker_priority_set (uint8_t instance_index , uint8_t user_id ,
172+ uint8_t ticker_id , int8_t priority ,
173+ ticker_op_func fp_op_func , void * op_context );
182174#if defined(CONFIG_BT_TICKER_EXT )
183- uint32_t ticker_start_ext (uint8_t instance_index , uint8_t user_id , uint8_t ticker_id ,
184- uint32_t ticks_anchor , uint32_t ticks_first ,
185- uint32_t ticks_periodic , uint32_t remainder_periodic ,
186- uint16_t lazy , uint32_t ticks_slot ,
187- ticker_timeout_func fp_timeout_func , void * context ,
188- ticker_op_func fp_op_func , void * op_context ,
189- struct ticker_ext * ext_data );
175+ struct ticker_ext {
176+ uint32_t ticks_slot_window ;/* Window in which the slot
177+ * reservation may be re-scheduled
178+ * to avoid collision
179+ */
180+ int32_t ticks_drift ; /* Applied drift since last expiry */
181+ uint8_t reschedule_state ; /* State of re-scheduling of the
182+ * node. See defines
183+ * TICKER_RESCHEDULE_STATE_XXX
184+ */
185+ };
186+
187+ uint32_t ticker_start_ext (uint8_t instance_index , uint8_t user_id ,
188+ uint8_t ticker_id , uint32_t ticks_anchor ,
189+ uint32_t ticks_first , uint32_t ticks_periodic ,
190+ uint32_t remainder_periodic , uint16_t lazy ,
191+ uint32_t ticks_slot ,
192+ ticker_timeout_func fp_timeout_func , void * context ,
193+ ticker_op_func fp_op_func , void * op_context ,
194+ struct ticker_ext * ext_data );
190195uint32_t ticker_update_ext (uint8_t instance_index , uint8_t user_id ,
191196 uint8_t ticker_id , uint32_t ticks_drift_plus ,
192197 uint32_t ticks_drift_minus ,
0 commit comments