You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/09/06 11:25:44 UTC
[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #1349: nimble/ll: Add support for custom scheduling items
apache-mynewt-bot commented on PR #1349:
URL: https://github.com/apache/mynewt-nimble/pull/1349#issuecomment-1238022494
<!-- style-bot -->
## Style check summary
### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
#### nimble/controller/include/controller/ble_ll_sched.h
<details>
```diff
@@ -95,20 +95,19 @@
* txrx_offset: Number of ticks from start time until tx/rx should occur.
*
*/
-struct ble_ll_sched_item
-{
+struct ble_ll_sched_item {
#if MYNEWT_VAL(BLE_LL_EXT_SCHED)
- uint8_t sched_type : 4;
- uint8_t sched_ext_type : 4;
+ uint8_t sched_type : 4;
+ uint8_t sched_ext_type : 4;
#else
- uint8_t sched_type;
-#endif
- uint8_t enqueued;
- uint8_t remainder;
- uint32_t start_time;
- uint32_t end_time;
- void *cb_arg;
- sched_cb_func sched_cb;
+ uint8_t sched_type;
+#endif
+ uint8_t enqueued;
+ uint8_t remainder;
+ uint32_t start_time;
+ uint32_t end_time;
+ void *cb_arg;
+ sched_cb_func sched_cb;
TAILQ_ENTRY(ble_ll_sched_item) link;
};
```
</details>
#### nimble/controller/src/ble_ll_sched.c
<details>
```diff
@@ -143,41 +143,41 @@
switch (entry->sched_type) {
#if MYNEWT_VAL(BLE_LL_ROLE_CENTRAL) || MYNEWT_VAL(BLE_LL_ROLE_PERIPHERAL)
- case BLE_LL_SCHED_TYPE_CONN:
- connsm = (struct ble_ll_conn_sm *)entry->cb_arg;
- ble_ll_event_add(&connsm->conn_ev_end);
- break;
+ case BLE_LL_SCHED_TYPE_CONN:
+ connsm = (struct ble_ll_conn_sm *)entry->cb_arg;
+ ble_ll_event_add(&connsm->conn_ev_end);
+ break;
#endif
#if MYNEWT_VAL(BLE_LL_ROLE_BROADCASTER)
- case BLE_LL_SCHED_TYPE_ADV:
- ble_ll_adv_event_rmvd_from_sched(entry->cb_arg);
- break;
+ case BLE_LL_SCHED_TYPE_ADV:
+ ble_ll_adv_event_rmvd_from_sched(entry->cb_arg);
+ break;
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) && MYNEWT_VAL(BLE_LL_ROLE_OBSERVER)
- case BLE_LL_SCHED_TYPE_SCAN_AUX:
- ble_ll_scan_aux_break(entry->cb_arg);
- break;
+ case BLE_LL_SCHED_TYPE_SCAN_AUX:
+ ble_ll_scan_aux_break(entry->cb_arg);
+ break;
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PERIODIC_ADV)
#if MYNEWT_VAL(BLE_LL_ROLE_BROADCASTER)
- case BLE_LL_SCHED_TYPE_PERIODIC:
- ble_ll_adv_periodic_rmvd_from_sched(entry->cb_arg);
- break;
+ case BLE_LL_SCHED_TYPE_PERIODIC:
+ ble_ll_adv_periodic_rmvd_from_sched(entry->cb_arg);
+ break;
#endif
#if MYNEWT_VAL(BLE_LL_ROLE_OBSERVER)
- case BLE_LL_SCHED_TYPE_SYNC:
- ble_ll_sync_rmvd_from_sched(entry->cb_arg);
- break;
+ case BLE_LL_SCHED_TYPE_SYNC:
+ ble_ll_sync_rmvd_from_sched(entry->cb_arg);
+ break;
#endif
#endif
#endif
#if MYNEWT_VAL(BLE_LL_EXT_SCHED)
- case BLE_LL_SCHED_TYPE_EXTERNAL:
- ble_ll_ext_sched_removed(entry);
- break;
-#endif
- default:
- BLE_LL_ASSERT(0);
- break;
+ case BLE_LL_SCHED_TYPE_EXTERNAL:
+ ble_ll_ext_sched_removed(entry);
+ break;
+#endif
+ default:
+ BLE_LL_ASSERT(0);
+ break;
}
entry = next;
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org