Skip to content

Commit 6558eca

Browse files
olivier-le-sagekartben
authored andcommitted
bluetooth: cs: Add docs about main/sub step mode combinations
Add docs about what main/sub mode combinations are considered valid by spec. In hindsight it would've been smarter to expose only one enum for both, such that the user can't select invalid combinations. Signed-off-by: Olivier Lesage <[email protected]>
1 parent b7efede commit 6558eca

File tree

1 file changed

+42
-2
lines changed
  • include/zephyr/bluetooth

1 file changed

+42
-2
lines changed

include/zephyr/bluetooth/cs.h

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,27 @@ enum bt_le_cs_test_override_8_cs_sync_payload_pattern {
248248
struct bt_le_cs_test_param {
249249
/** CS mode to be used during the CS procedure. */
250250
enum bt_conn_le_cs_main_mode main_mode;
251-
/** CS sub-mode to be used during the CS procedure. */
251+
/** CS sub-mode to be used during the CS procedure.
252+
*
253+
* Main_Mode and Sub_Mode combinations shall be selected from
254+
* the valid combinations defined below:
255+
*
256+
* +-----------+----------+
257+
* | Main_Mode | Sub_Mode |
258+
* +-----------+----------+
259+
* | Mode-1 | None |
260+
* +-----------+----------+
261+
* | Mode-2 | None |
262+
* +-----------+----------+
263+
* | Mode-3 | None |
264+
* +-----------+----------+
265+
* | Mode-2 | Mode-1 |
266+
* +-----------+----------+
267+
* | Mode-2 | Mode-3 |
268+
* +-----------+----------+
269+
* | Mode-3 | Mode-2 |
270+
* +-----------+----------+
271+
*/
252272
enum bt_conn_le_cs_sub_mode sub_mode;
253273
/** Number of main mode steps taken from the end of the last CS subevent
254274
* to be repeated at the beginning of the current CS subevent directly
@@ -483,7 +503,27 @@ struct bt_le_cs_create_config_params {
483503
uint8_t id;
484504
/** Main CS mode type */
485505
enum bt_conn_le_cs_main_mode main_mode_type;
486-
/** Sub CS mode type */
506+
/** Sub CS mode type
507+
*
508+
* Main_Mode and Sub_Mode combinations shall be selected from
509+
* the valid combinations defined below:
510+
*
511+
* +-----------+----------+
512+
* | Main_Mode | Sub_Mode |
513+
* +-----------+----------+
514+
* | Mode-1 | None |
515+
* +-----------+----------+
516+
* | Mode-2 | None |
517+
* +-----------+----------+
518+
* | Mode-3 | None |
519+
* +-----------+----------+
520+
* | Mode-2 | Mode-1 |
521+
* +-----------+----------+
522+
* | Mode-2 | Mode-3 |
523+
* +-----------+----------+
524+
* | Mode-3 | Mode-2 |
525+
* +-----------+----------+
526+
*/
487527
enum bt_conn_le_cs_sub_mode sub_mode_type;
488528
/** Minimum number of CS main mode steps to be executed before a submode step is executed */
489529
uint8_t min_main_mode_steps;

0 commit comments

Comments
 (0)