Skip to content

Commit 2fa7a7e

Browse files
mtpr-otjhedberg
authored andcommitted
Bluetooth: controller: Added support for vendor ticker nodes
With BT_CTLR_USER_TICKER_ID_RANGE it is possible for vendors to add a number of ticker nodes for proprietary purposes. The feature depends on BT_CTLR_USER_EXT. Signed-off-by: Morten Priess <[email protected]>
1 parent dbfc2eb commit 2fa7a7e

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

subsys/bluetooth/controller/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,15 @@ config BT_CTLR_USER_EVT_RANGE
870870
Number of event types reserved for proprietary use. The range
871871
is typically used when BT_CTLR_USER_EXT is in use.
872872

873+
config BT_CTLR_USER_TICKER_ID_RANGE
874+
int "Range of ticker id constants reserved for proprietary ticker nodes"
875+
depends on BT_CTLR_USER_EXT
876+
default 0
877+
range 0 10
878+
help
879+
Number of ticker ids reserved for proprietary use. The range
880+
is typically used when BT_CTLR_USER_EXT is in use.
881+
873882
config BT_RX_USER_PDU_LEN
874883
int "Maximum supported proprietary PDU buffer length"
875884
depends on BT_CTLR_USER_EXT

subsys/bluetooth/controller/ll_sw/lll.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ enum {
5454
1),
5555
#endif /* CONFIG_BT_CONN */
5656

57+
#if defined(CONFIG_BT_CTLR_USER_EXT) && \
58+
(CONFIG_BT_CTLR_USER_TICKER_ID_RANGE > 0)
59+
TICKER_ID_USER_BASE,
60+
TICKER_ID_USER_LAST = (TICKER_ID_USER_BASE +
61+
CONFIG_BT_CTLR_USER_TICKER_ID_RANGE - 1),
62+
#endif /* CONFIG_BT_CTLR_USER_EXT */
63+
5764
TICKER_ID_MAX,
5865
};
5966

subsys/bluetooth/controller/ll_sw/ull.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,18 @@
9898
#define FLASH_TICKER_USER_APP_OPS 0
9999
#endif
100100

101+
#if defined(CONFIG_BT_CTLR_USER_EXT)
102+
#define USER_TICKER_NODES CONFIG_BT_CTLR_USER_TICKER_ID_RANGE
103+
#else
104+
#define USER_TICKER_NODES 0
105+
#endif
106+
101107
#define TICKER_NODES (TICKER_ID_ULL_BASE + \
102108
BT_ADV_TICKER_NODES + \
103109
BT_SCAN_TICKER_NODES + \
104110
BT_CONN_TICKER_NODES + \
105-
FLASH_TICKER_NODES)
111+
FLASH_TICKER_NODES + \
112+
USER_TICKER_NODES)
106113
#define TICKER_USER_APP_OPS (TICKER_USER_THREAD_OPS + \
107114
FLASH_TICKER_USER_APP_OPS)
108115
#define TICKER_USER_OPS (TICKER_USER_LLL_OPS + \

0 commit comments

Comments
 (0)