Skip to content

Commit

Permalink
Bluetooth: controller: Added support for vendor ticker nodes
Browse files Browse the repository at this point in the history
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 <mtpr@oticon.com>
  • Loading branch information
mtpr-ot authored and carlescufi committed May 7, 2020
1 parent eac56e4 commit 3ed658e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
9 changes: 9 additions & 0 deletions subsys/bluetooth/controller/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,15 @@ config BT_CTLR_USER_EVT_RANGE
Number of event types reserved for proprietary use. The range
is typically used when BT_CTLR_USER_EXT is in use.

config BT_CTLR_USER_TICKER_ID_RANGE
int "Range of ticker id constants reserved for proprietary ticker nodes"
depends on BT_CTLR_USER_EXT
default 0
range 0 10
help
Number of ticker ids reserved for proprietary use. The range
is typically used when BT_CTLR_USER_EXT is in use.

config BT_RX_USER_PDU_LEN
int "Maximum supported proprietary PDU buffer length"
depends on BT_CTLR_USER_EXT
Expand Down
7 changes: 7 additions & 0 deletions subsys/bluetooth/controller/ll_sw/lll.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ enum {
1),
#endif /* CONFIG_BT_CONN */

#if defined(CONFIG_BT_CTLR_USER_EXT) && \
(CONFIG_BT_CTLR_USER_TICKER_ID_RANGE > 0)
TICKER_ID_USER_BASE,
TICKER_ID_USER_LAST = (TICKER_ID_USER_BASE +
CONFIG_BT_CTLR_USER_TICKER_ID_RANGE - 1),
#endif /* CONFIG_BT_CTLR_USER_EXT */

TICKER_ID_MAX,
};

Expand Down
9 changes: 8 additions & 1 deletion subsys/bluetooth/controller/ll_sw/ull.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,18 @@
#define FLASH_TICKER_USER_APP_OPS 0
#endif

#if defined(CONFIG_BT_CTLR_USER_EXT)
#define USER_TICKER_NODES CONFIG_BT_CTLR_USER_TICKER_ID_RANGE
#else
#define USER_TICKER_NODES 0
#endif

#define TICKER_NODES (TICKER_ID_ULL_BASE + \
BT_ADV_TICKER_NODES + \
BT_SCAN_TICKER_NODES + \
BT_CONN_TICKER_NODES + \
FLASH_TICKER_NODES)
FLASH_TICKER_NODES + \
USER_TICKER_NODES)
#define TICKER_USER_APP_OPS (TICKER_USER_THREAD_OPS + \
FLASH_TICKER_USER_APP_OPS)
#define TICKER_USER_OPS (TICKER_USER_LLL_OPS + \
Expand Down

0 comments on commit 3ed658e

Please sign in to comment.