33#define SDC_DEFAULT_RESOURCE_CFG_TAG 0
36#define SDC_DEFAULT_ADV_COUNT 1
39#define SDC_DEFAULT_PERIODIC_ADV_COUNT 0
43#define SDC_DEFAULT_PERIODIC_SYNC_COUNT 0
46#define SDC_DEFAULT_PERIODIC_ADV_RSP_COUNT 0
49#define SDC_DEFAULT_PERIODIC_ADV_RSP_TX_BUFFER_COUNT 1
52#define SDC_DEFAULT_PERIODIC_ADV_RSP_MAX_TX_DATA 73
55#define SDC_DEFAULT_PERIODIC_ADV_RSP_RX_BUFFER_COUNT 0
58#define SDC_DEFAULT_PERIODIC_SYNC_RSP_TX_BUFFER_COUNT 1
61#define SDC_DEFAULT_PERIPHERAL_COUNT 1
64#define SDC_DEFAULT_CENTRAL_COUNT 1
67#define SDC_DEFAULT_TX_PACKET_SIZE 27
70#define SDC_DEFAULT_RX_PACKET_SIZE 27
76#define SDC_DEFAULT_TX_PACKET_COUNT 3
82#define SDC_DEFAULT_RX_PACKET_COUNT 2
85#define SDC_DEFAULT_FAL_SIZE 8
92#define SDC_DEFAULT_SCAN_BUFFER_COUNT 3
95#define SDC_DEFAULT_PERIODIC_SYNC_BUFFER_COUNT 2
98#define SDC_DEFAULT_ADV_BUF_SIZE 31
101#define SDC_DEFAULT_PERIODIC_ADV_LIST_SIZE 0
104#define SDC_DEFAULT_CIG_COUNT 0
107#define SDC_DEFAULT_CIS_COUNT 0
110#define SDC_DEFAULT_BIG_COUNT 0
113#define SDC_DEFAULT_BIS_SINK_COUNT 0
116#define SDC_DEFAULT_BIS_SOURCE_COUNT 0
119#define SDC_DEFAULT_ISO_RX_PDU_BUFFER_PER_STREAM_COUNT 0
122#define SDC_DEFAULT_ISO_RX_SDU_BUFFER_COUNT 0
125#define SDC_DEFAULT_ISO_RX_SDU_BUFFER_SIZE 251
128#define SDC_DEFAULT_ISO_TX_SDU_BUFFER_COUNT 0
131#define SDC_DEFAULT_ISO_TX_SDU_BUFFER_SIZE 247
134#define SDC_DEFAULT_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT 0
137#define SDC_BUILD_REVISION_SIZE 20
151#define __MEM_MINIMAL_CENTRAL_LINK_SIZE 811
152#define __MEM_MINIMAL_PERIPHERAL_LINK_SIZE 915
153#define __MEM_TX_BUFFER_OVERHEAD_SIZE 14
154#define __MEM_RX_BUFFER_OVERHEAD_SIZE 14
156#define __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count) \
157 ((tx_count) * ((tx_size) + __MEM_TX_BUFFER_OVERHEAD_SIZE) - \
158 (SDC_DEFAULT_TX_PACKET_SIZE + __MEM_TX_BUFFER_OVERHEAD_SIZE) + \
159 (rx_count) * ((rx_size) + __MEM_RX_BUFFER_OVERHEAD_SIZE) - \
160 (SDC_DEFAULT_RX_PACKET_SIZE + __MEM_RX_BUFFER_OVERHEAD_SIZE))
169#define SDC_MEM_PER_CENTRAL_LINK(tx_size, rx_size, tx_count, rx_count) \
170 (__MEM_MINIMAL_CENTRAL_LINK_SIZE + \
171 __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count))
180#define SDC_MEM_PER_PERIPHERAL_LINK(tx_size, rx_size, tx_count, rx_count) \
181 (__MEM_MINIMAL_PERIPHERAL_LINK_SIZE + \
182 __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count))
185#define SDC_MEM_CENTRAL_LINKS_SHARED 17
188#define SDC_MEM_PERIPHERAL_LINKS_SHARED 17
194#define SDC_MEM_LE_POWER_CONTROL(num_links) ((num_links) > 0 ? (13 + (num_links) * 115) : 0)
200#define SDC_MEM_SUBRATING(num_links) (11 + (num_links) * 19)
206#define SDC_MEM_SYNC_TRANSFER(num_links) ((num_links) > 0 ? (13 + (num_links) * 139) : 0)
209#define SDC_MEM_QOS_CHANNEL_SURVEY (40)
212#define SDC_MEM_SCAN(buffer_count) (345 + (buffer_count) * 98)
215#define SDC_MEM_SCAN_EXT(buffer_count) (345 + (buffer_count) * 320)
220#define SDC_MEM_INITIATOR (320)
223#define SDC_MEM_FAL(max_num_entries) ((max_num_entries) > 0 ? (4 + (max_num_entries) * 8) : 0)
226#define __MEM_PER_ADV_SET_LOW(max_adv_data) ((4912+(max_adv_data)*18)/10)
227#define __MEM_PER_ADV_SET_HIGH(max_adv_data) (679+(max_adv_data))
228#define __MEM_PER_PERIODIC_ADV_SET_LOW(max_adv_data) ((2658+(max_adv_data)*18)/10)
229#define __MEM_PER_PERIODIC_ADV_SET_HIGH(max_adv_data) (457+(max_adv_data))
235#define SDC_MEM_PER_ADV_SET(max_adv_data) ((max_adv_data<255)?\
236 (__MEM_PER_ADV_SET_LOW(max_adv_data)):\
237 (__MEM_PER_ADV_SET_HIGH(max_adv_data)))
245#define SDC_MEM_PER_PERIODIC_ADV_SET(max_adv_data) ((max_adv_data<255)?\
246 (__MEM_PER_PERIODIC_ADV_SET_LOW(max_adv_data)):\
247 (__MEM_PER_PERIODIC_ADV_SET_HIGH(max_adv_data)))
253#define SDC_MEM_PER_PERIODIC_SYNC(buffer_count) (218 + (buffer_count) * 279)
260#define SDC_MEM_PER_PERIODIC_SYNC_RSP(tx_buffer_count, rx_buffer_count) \
261 (639 + (tx_buffer_count - 1) * 254 + (rx_buffer_count) * 278)
267#define SDC_MEM_PERIODIC_ADV_LIST(list_size) ((list_size) * 8)
270#define __MEM_PER_PERIODIC_ADV_RSP_TX_BUFFER(max_tx_data_size) ((max_tx_data_size) + 5)
271#define __MEM_PER_PERIODIC_ADV_RSP_RX_BUFFER (282)
272#define __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITH_RX (465)
273#define __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITHOUT_RX (166)
274#define __MEM_FOR_PERIODIC_ADV_RSP_FAILURE_REPORTING (224)
275#define __MEM_PER_ISO_PDU_POOL(count) ((count) > 0 ? (16 + (count) * 288) : 0)
276#define __MEM_PER_ISO_TX_HCI_BUFFER(count) ((count) > 0 ? (12 + (count) * 300) : 0)
286#define SDC_MEM_PER_PERIODIC_ADV_RSP_SET(max_adv_data, tx_buffer_count, rx_buffer_count, max_tx_data_size, failure_reporting_enabled) \
287 (SDC_MEM_PER_PERIODIC_ADV_SET(max_adv_data) \
288 + ((rx_buffer_count) > 0 ? __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITH_RX : \
289 __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITHOUT_RX ) \
290 + (tx_buffer_count) * __MEM_PER_PERIODIC_ADV_RSP_TX_BUFFER(max_tx_data_size) \
291 + (rx_buffer_count) * __MEM_PER_PERIODIC_ADV_RSP_RX_BUFFER \
292 + ((failure_reporting_enabled) ? __MEM_FOR_PERIODIC_ADV_RSP_FAILURE_REPORTING : 0))
295#define SDC_MEM_PER_CIG(count) ((count) > 0 ? (13 + (count) * 123) : 0)
298#define SDC_MEM_PER_CIS(count) ((count) > 0 ? (13 + (count) * 548) : 0)
301#define SDC_MEM_PER_BIG(count) ((count) > 0 ? (13 + (count) * 284) : 0)
304#define SDC_MEM_PER_BIS(count) ((count) > 0 ? (13 + (count) * 268) : 0)
311#define SDC_MEM_ISO_RX_PDU_POOL_PER_STREAM_SIZE(rx_pdu_buffer_per_stream_count, cis_count, bis_sink_count) \
312 (__MEM_PER_ISO_PDU_POOL(rx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_sink_count)))
317#define SDC_MEM_ISO_RX_SDU_POOL_SIZE(count, size) ((count) > 0 ? (8 + (count) * ((size) + 13)) : 0)
324#define SDC_MEM_ISO_TX_PDU_POOL_SIZE(tx_pdu_buffer_per_stream_count, cis_count, bis_source_count) \
325 ((tx_pdu_buffer_per_stream_count) > 0 ? \
326 __MEM_PER_ISO_PDU_POOL(tx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_source_count)) : 0)
331#define SDC_MEM_ISO_TX_SDU_POOL_SIZE(count, size) ((count) > 0 ? (12 + (count) * ((size) + 49)) : 0)
int32_t sdc_support_le_path_loss_monitoring(void)
Support LE Path Loss Monitoring.
int32_t sdc_support_peripheral(void)
Support Peripheral role.
int32_t sdc_support_le_conn_cte_rsp_peripheral(void)
Support LE Connection CTE response for peripheral role.
int32_t sdc_support_ext_adv(void)
Support extended advertising.
int32_t sdc_disable(void)
Disable the SoftDevice Controller.
int32_t sdc_iso_host_timestamps_ignore(bool ignore)
Configure the controller to ignore HCI ISO data timestamps from the host.
int32_t sdc_support_sca_central(void)
Support Sleep Clock Accuracy (SCA) Update procedure for central role.
int32_t sdc_support_connection_subrating_peripheral(void)
Support Connection Subrating for peripheral role.
void(* sdc_fault_handler_t)(const char *file, const uint32_t line)
Function prototype for the fault handler.
Definition: sdc.h:344
int32_t sdc_support_periodic_adv_sync_transfer_sender_peripheral(void)
Support for sending periodic advertising sync transfers as peripheral role.
int32_t sdc_support_periodic_adv_sync_transfer_receiver_peripheral(void)
Support for receiving periodic advertising sync transfers as peripheral role.
int32_t sdc_support_connection_subrating_central(void)
Support Connection Subrating for central role.
int32_t sdc_support_le_conn_cte_rsp_central(void)
Support LE Connection CTE response for central role.
int32_t sdc_cfg_set(uint8_t config_tag, uint8_t config_type, sdc_cfg_t const *p_resource_cfg)
Change or add a SoftDevice Controller configuration.
int32_t sdc_support_cis_peripheral(void)
Support Connected Isochronous streams in the peripheral role.
int32_t sdc_support_periodic_adv_sync_transfer_sender_central(void)
Support for sending periodic advertising sync transfers as central role.
int32_t sdc_support_ext_scan(void)
Support scanning for extended advertising PDUs.
int32_t sdc_enable(sdc_callback_t callback, uint8_t *p_mem)
Enable the SoftDevice Controller.
int32_t sdc_support_scan(void)
Support Scanning state.
int32_t sdc_support_le_periodic_adv(void)
Support LE Periodic Advertising in the Advertising state.
int32_t sdc_support_le_power_control_peripheral(void)
Support LE Power Control for peripheral role.
int32_t sdc_support_cis_central(void)
Support Connected Isochronous streams in the central role.
int32_t sdc_support_le_periodic_sync_with_rsp(void)
Support LE Periodic Advertising with Responses in the Synchronization state.
int32_t sdc_support_bis_source(void)
Support Broadcast Isochronous streams as a source.
int32_t sdc_support_central(void)
Support Scanner, Initiator, and Central role.
int32_t sdc_support_dle_peripheral(void)
Support Data Length Extensions for a peripheral device.
int32_t sdc_support_le_power_control_central(void)
Support LE Power Control for central role.
int32_t sdc_support_adv(void)
Support Advertising State.
int32_t sdc_support_parallel_scanning_and_initiating(void)
Support for scanning and initiating at the same time.
int32_t sdc_support_le_periodic_adv_with_rsp(void)
Support LE Periodic Advertising with Responses in the Advertising state.
int32_t sdc_init(sdc_fault_handler_t fault_handler)
Initialize the SoftDevice Controller.
int32_t sdc_support_phy_update_central(void)
Support PHY Update Procedure for central role.
int32_t sdc_support_qos_channel_survey(void)
Support for Quality of Service (QoS) channel survey module.
int32_t sdc_build_revision_get(uint8_t *p_build_revision)
Obtain build revision string.
int32_t sdc_support_phy_update_peripheral(void)
Support LE Coded PHY for peripheral role.
void(* sdc_callback_t)(void)
Function prototype for the SoftDevice Controller callback.
Definition: sdc.h:351
int32_t sdc_support_sca_peripheral(void)
Support Sleep Clock Accuracy (SCA) Update procedure for peripheral role.
int32_t sdc_support_bis_sink(void)
Support Broadcast Isochronous streams as a sink.
int32_t sdc_support_le_periodic_sync(void)
Support LE Periodic Advertising in the Synchronization state.
sdc_cfg_type
Definition: sdc.h:355
@ SDC_CFG_TYPE_PERIPHERAL_COUNT
Definition: sdc.h:361
@ SDC_CFG_TYPE_PERIODIC_ADV_COUNT
Definition: sdc.h:373
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_COUNT
Definition: sdc.h:381
@ SDC_CFG_TYPE_BIS_SINK_COUNT
Definition: sdc.h:395
@ SDC_CFG_TYPE_CIS_COUNT
Definition: sdc.h:391
@ SDC_CFG_TYPE_BIS_SOURCE_COUNT
Definition: sdc.h:397
@ SDC_CFG_TYPE_BUFFER_CFG
Definition: sdc.h:363
@ SDC_CFG_TYPE_PERIODIC_SYNC_COUNT
Definition: sdc.h:375
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_BUFFER_CFG
Definition: sdc.h:383
@ SDC_CFG_TYPE_ADV_BUFFER_CFG
Definition: sdc.h:369
@ SDC_CFG_TYPE_ISO_BUFFER_CFG
Definition: sdc.h:399
@ SDC_CFG_TYPE_ADV_COUNT
Definition: sdc.h:365
@ SDC_CFG_TYPE_BIG_COUNT
Definition: sdc.h:393
@ SDC_CFG_TYPE_CENTRAL_COUNT
Definition: sdc.h:359
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_FAILURE_REPORTING_CFG
Definition: sdc.h:385
@ SDC_CFG_TYPE_PERIODIC_SYNC_RSP_TX_BUFFER_CFG
Definition: sdc.h:387
@ SDC_CFG_TYPE_PERIODIC_ADV_LIST_SIZE
Definition: sdc.h:379
@ SDC_CFG_TYPE_CIG_COUNT
Definition: sdc.h:389
@ SDC_CFG_TYPE_PERIODIC_SYNC_BUFFER_CFG
Definition: sdc.h:377
@ SDC_CFG_TYPE_SCAN_BUFFER_CFG
Definition: sdc.h:367
@ SDC_CFG_TYPE_FAL_SIZE
Definition: sdc.h:371
@ SDC_CFG_TYPE_NONE
Definition: sdc.h:357
int32_t sdc_support_ext_central(void)
Support Extended Scanner, Extended Initiator, and Central role.
int32_t sdc_support_dle_central(void)
Support Data Length Extensions for a central device.
int32_t sdc_support_le_2m_phy(void)
Support LE 2M PHY.
int32_t sdc_support_le_coded_phy(void)
Support LE Coded PHY.
int32_t sdc_default_tx_power_set(int8_t requested_power_level)
Support for setting the default radio TX power level.
int32_t sdc_support_periodic_adv_sync_transfer_receiver_central(void)
Support for receiving periodic advertising sync transfers as central role.
uint16_t max_adv_data
Definition: sdc.h:440
uint8_t rx_packet_count
Definition: sdc.h:419
uint8_t rx_packet_size
Definition: sdc.h:415
uint8_t tx_packet_size
Definition: sdc.h:413
uint8_t tx_packet_count
Definition: sdc.h:417
Buffer configuration.
Definition: sdc.h:412
uint8_t count
Definition: sdc.h:427
Buffer count configuration.
Definition: sdc.h:426
uint8_t tx_sdu_buffer_count
Definition: sdc.h:474
uint16_t rx_sdu_buffer_size
Definition: sdc.h:511
uint8_t tx_pdu_buffer_per_stream_count
Definition: sdc.h:491
uint8_t rx_pdu_buffer_per_stream_count
Definition: sdc.h:501
uint8_t rx_sdu_buffer_count
Definition: sdc.h:506
uint16_t tx_sdu_buffer_size
Definition: sdc.h:479
uint8_t max_tx_data_size
Definition: sdc.h:456
uint8_t tx_buffer_count
Definition: sdc.h:451
uint8_t rx_buffer_count
Definition: sdc.h:464
uint8_t count
Definition: sdc.h:406
Role count.
Definition: sdc.h:405
sdc_cfg_role_count_t periodic_adv_count
Definition: sdc.h:558
uint8_t periodic_adv_list_size
Definition: sdc.h:588
sdc_cfg_role_count_t bis_source_count
Definition: sdc.h:637
sdc_cfg_role_count_t cig_count
Definition: sdc.h:617
sdc_cfg_role_count_t central_count
Definition: sdc.h:521
sdc_cfg_role_count_t periodic_sync_count
Definition: sdc.h:563
sdc_cfg_iso_buffer_cfg_t iso_buffer_cfg
Definition: sdc.h:642
sdc_cfg_adv_buffer_cfg_t adv_buffer_cfg
Definition: sdc.h:548
sdc_cfg_buffer_count_t scan_buffer_cfg
Definition: sdc.h:544
sdc_cfg_buffer_count_t periodic_sync_buffer_cfg
Definition: sdc.h:581
sdc_cfg_role_count_t cis_count
Definition: sdc.h:622
uint8_t periodic_adv_rsp_failure_reporting_cfg
Definition: sdc.h:604
sdc_cfg_role_count_t adv_count
Definition: sdc.h:534
sdc_cfg_buffer_cfg_t buffer_cfg
Definition: sdc.h:529
uint16_t fal_size
Definition: sdc.h:553
sdc_cfg_buffer_count_t periodic_sync_rsp_tx_buffer_cfg
Definition: sdc.h:612
sdc_cfg_role_count_t big_count
Definition: sdc.h:627
sdc_cfg_role_count_t bis_sink_count
Definition: sdc.h:632
sdc_cfg_periodic_adv_rsp_buffer_cfg_t periodic_adv_rsp_buffer_cfg
Definition: sdc.h:597
sdc_cfg_role_count_t periodic_adv_rsp_count
Definition: sdc.h:593
sdc_cfg_role_count_t peripheral_count
Definition: sdc.h:525
SoftDevice Controller configuration.
Definition: sdc.h:517