@@ -364,6 +364,7 @@ static uint8_t ticker_by_slot_get(struct ticker_node *node, uint8_t ticker_id_he
364
364
}
365
365
#endif /* CONFIG_BT_TICKER_LOW_LAT */
366
366
367
+ #if defined(CONFIG_BT_TICKER_NEXT_SLOT_GET )
367
368
/**
368
369
* @brief Get next ticker with slot ticks or match
369
370
*
@@ -480,6 +481,7 @@ static void ticker_by_next_slot_get(struct ticker_instance *instance,
480
481
* ticker_id_head = _ticker_id_head ;
481
482
* ticks_to_expire = _ticks_to_expire ;
482
483
}
484
+ #endif /* CONFIG_BT_TICKER_NEXT_SLOT_GET */
483
485
484
486
#if !defined(CONFIG_BT_TICKER_LOW_LAT )
485
487
/**
@@ -1378,7 +1380,8 @@ static inline void ticker_job_node_manage(struct ticker_instance *instance,
1378
1380
uint8_t * insert_head )
1379
1381
{
1380
1382
/* Handle update of ticker by re-inserting it back. */
1381
- if (user_op -> op == TICKER_USER_OP_TYPE_UPDATE ) {
1383
+ if (IS_ENABLED (CONFIG_BT_TICKER_UPDATE ) &&
1384
+ (user_op -> op == TICKER_USER_OP_TYPE_UPDATE )) {
1382
1385
/* Remove ticker node from list */
1383
1386
ticker -> ticks_to_expire = ticker_dequeue (instance , user_op -> id );
1384
1387
@@ -2294,9 +2297,22 @@ static inline void ticker_job_list_insert(struct ticker_instance *instance,
2294
2297
}
2295
2298
}
2296
2299
}
2300
+
2301
+ #if !defined(CONFIG_BT_TICKER_JOB_IDLE_GET ) && \
2302
+ !defined(CONFIG_BT_TICKER_NEXT_SLOT_GET ) && \
2303
+ !defined(CONFIG_BT_TICKER_PRIORITY_SET )
2304
+ user -> first = user_ops_first ;
2305
+ #endif /* !CONFIG_BT_TICKER_JOB_IDLE_GET &&
2306
+ * !CONFIG_BT_TICKER_NEXT_SLOT_GET &&
2307
+ * !CONFIG_BT_TICKER_PRIORITY_SET
2308
+ */
2309
+
2297
2310
}
2298
2311
}
2299
2312
2313
+ #if defined(CONFIG_BT_TICKER_JOB_IDLE_GET ) || \
2314
+ defined(CONFIG_BT_TICKER_NEXT_SLOT_GET ) || \
2315
+ defined(CONFIG_BT_TICKER_PRIORITY_SET )
2300
2316
/**
2301
2317
* @brief Perform inquiry for specific user operation
2302
2318
*
@@ -2312,6 +2328,7 @@ static inline void ticker_job_op_inquire(struct ticker_instance *instance,
2312
2328
2313
2329
fp_op_func = NULL ;
2314
2330
switch (uop -> op ) {
2331
+ #if defined(CONFIG_BT_TICKER_NEXT_SLOT_GET )
2315
2332
case TICKER_USER_OP_TYPE_SLOT_GET :
2316
2333
ticker_by_next_slot_get (instance ,
2317
2334
uop -> params .slot_get .ticker_id ,
@@ -2334,11 +2351,17 @@ static inline void ticker_job_op_inquire(struct ticker_instance *instance,
2334
2351
NULL );
2335
2352
#endif /* !CONFIG_BT_TICKER_LAZY_GET */
2336
2353
__fallthrough ;
2354
+ #endif /* CONFIG_BT_TICKER_NEXT_SLOT_GET */
2337
2355
2356
+ #if defined(CONFIG_BT_TICKER_JOB_IDLE_GET ) || \
2357
+ defined(CONFIG_BT_TICKER_NEXT_SLOT_GET )
2338
2358
case TICKER_USER_OP_TYPE_IDLE_GET :
2339
2359
uop -> status = TICKER_STATUS_SUCCESS ;
2340
2360
fp_op_func = uop -> fp_op_func ;
2341
2361
break ;
2362
+ #endif /* CONFIG_BT_TICKER_JOB_IDLE_GET ||
2363
+ * CONFIG_BT_TICKER_NEXT_SLOT_GET
2364
+ */
2342
2365
2343
2366
#if !defined(CONFIG_BT_TICKER_LOW_LAT ) && \
2344
2367
!defined(CONFIG_BT_TICKER_SLOT_AGNOSTIC ) && \
@@ -2411,6 +2434,10 @@ static inline void ticker_job_list_inquire(struct ticker_instance *instance)
2411
2434
}
2412
2435
}
2413
2436
}
2437
+ #endif /* CONFIG_BT_TICKER_JOB_IDLE_GET ||
2438
+ * CONFIG_BT_TICKER_NEXT_SLOT_GET ||
2439
+ * CONFIG_BT_TICKER_PRIORITY_SET
2440
+ */
2414
2441
2415
2442
/**
2416
2443
* @brief Update counter compare value (trigger)
@@ -2599,11 +2626,18 @@ void ticker_job(void *param)
2599
2626
flag_compare_update = 1U ;
2600
2627
}
2601
2628
2629
+ #if defined(CONFIG_BT_TICKER_JOB_IDLE_GET ) || \
2630
+ defined(CONFIG_BT_TICKER_NEXT_SLOT_GET ) || \
2631
+ defined(CONFIG_BT_TICKER_PRIORITY_SET )
2602
2632
/* Process any list inquiries */
2603
2633
if (!pending ) {
2604
2634
/* Handle inquiries */
2605
2635
ticker_job_list_inquire (instance );
2606
2636
}
2637
+ #endif /* CONFIG_BT_TICKER_JOB_IDLE_GET ||
2638
+ * CONFIG_BT_TICKER_NEXT_SLOT_GET ||
2639
+ * CONFIG_BT_TICKER_PRIORITY_SET
2640
+ */
2607
2641
2608
2642
/* update compare if head changed */
2609
2643
if (flag_compare_update ) {
@@ -2851,6 +2885,7 @@ uint32_t ticker_start(uint8_t instance_index, uint8_t user_id, uint8_t ticker_id
2851
2885
return user_op -> status ;
2852
2886
}
2853
2887
2888
+ #if defined(CONFIG_BT_TICKER_UPDATE )
2854
2889
/**
2855
2890
* @brief Update a ticker node
2856
2891
*
@@ -2947,6 +2982,7 @@ uint32_t ticker_update_ext(uint8_t instance_index, uint8_t user_id,
2947
2982
2948
2983
return user_op -> status ;
2949
2984
}
2985
+ #endif /* CONFIG_BT_TICKER_UPDATE */
2950
2986
2951
2987
/**
2952
2988
* @brief Yield a ticker node with supplied absolute ticks reference
@@ -3110,6 +3146,7 @@ uint32_t ticker_stop_abs(uint8_t instance_index, uint8_t user_id,
3110
3146
return user_op -> status ;
3111
3147
}
3112
3148
3149
+ #if defined(CONFIG_BT_TICKER_NEXT_SLOT_GET )
3113
3150
/**
3114
3151
* @brief Get next ticker node slot
3115
3152
*
@@ -3202,7 +3239,9 @@ uint32_t ticker_next_slot_get_ext(uint8_t instance_index, uint8_t user_id,
3202
3239
3203
3240
return user_op -> status ;
3204
3241
}
3242
+ #endif /* CONFIG_BT_TICKER_NEXT_SLOT_GET */
3205
3243
3244
+ #if defined(CONFIG_BT_TICKER_JOB_IDLE_GET )
3206
3245
/**
3207
3246
* @brief Get a callback at the end of ticker job execution
3208
3247
*
@@ -3254,6 +3293,7 @@ uint32_t ticker_job_idle_get(uint8_t instance_index, uint8_t user_id,
3254
3293
3255
3294
return user_op -> status ;
3256
3295
}
3296
+ #endif /* CONFIG_BT_TICKER_JOB_IDLE_GET */
3257
3297
3258
3298
#if !defined(CONFIG_BT_TICKER_LOW_LAT ) && \
3259
3299
!defined(CONFIG_BT_TICKER_SLOT_AGNOSTIC ) && \
0 commit comments