32#define SDC_DEFAULT_RESOURCE_CFG_TAG 0
35#define SDC_DEFAULT_ADV_COUNT 1
38#define SDC_DEFAULT_PERIODIC_ADV_COUNT 0
42#define SDC_DEFAULT_PERIODIC_SYNC_COUNT 0
45#define SDC_DEFAULT_PERIODIC_ADV_RSP_COUNT 0
48#define SDC_DEFAULT_PERIODIC_ADV_RSP_TX_BUFFER_COUNT 1
51#define SDC_DEFAULT_PERIODIC_ADV_RSP_MAX_TX_DATA 73
54#define SDC_DEFAULT_PERIODIC_ADV_RSP_RX_BUFFER_COUNT 0
57#define SDC_DEFAULT_PERIODIC_SYNC_RSP_TX_BUFFER_COUNT 1
60#define SDC_DEFAULT_PERIPHERAL_COUNT 1
63#define SDC_DEFAULT_CENTRAL_COUNT 1
66#define SDC_DEFAULT_TX_PACKET_SIZE 27
69#define SDC_DEFAULT_RX_PACKET_SIZE 27
75#define SDC_DEFAULT_TX_PACKET_COUNT 3
81#define SDC_DEFAULT_RX_PACKET_COUNT 2
84#define SDC_DEFAULT_FAL_SIZE 8
91#define SDC_DEFAULT_SCAN_BUFFER_COUNT 3
94#define SDC_DEFAULT_PERIODIC_SYNC_BUFFER_COUNT 2
97#define SDC_DEFAULT_ADV_BUF_SIZE 31
100#define SDC_DEFAULT_PERIODIC_ADV_LIST_SIZE 0
103#define SDC_DEFAULT_CIG_COUNT 0
106#define SDC_DEFAULT_CIS_COUNT 0
109#define SDC_DEFAULT_BIG_COUNT 0
112#define SDC_DEFAULT_BIS_SINK_COUNT 0
115#define SDC_DEFAULT_BIS_SOURCE_COUNT 0
118#define SDC_DEFAULT_ISO_RX_PDU_BUFFER_PER_STREAM_COUNT 0
121#define SDC_DEFAULT_ISO_RX_SDU_BUFFER_COUNT 0
124#define SDC_DEFAULT_ISO_RX_SDU_BUFFER_SIZE 251
127#define SDC_DEFAULT_ISO_TX_SDU_BUFFER_COUNT 0
130#define SDC_DEFAULT_ISO_TX_SDU_BUFFER_SIZE 247
133#define SDC_DEFAULT_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT 0
136#define SDC_DEFAULT_CS_COUNT 0
139#define SDC_DEFAULT_CS_MAX_ANTENNA_PATHS_SUPPORTED 1
142#define SDC_DEFAULT_CS_NUM_ANTENNAS_SUPPORTED 1
145#define SDC_DEFAULT_EXTENDED_FEATURE_PAGE_COUNT 10
148#define SDC_BUILD_REVISION_SIZE 20
162#define __MEM_MINIMAL_CENTRAL_LINK_SIZE 795
163#define __MEM_MINIMAL_PERIPHERAL_LINK_SIZE 915
164#define __MEM_TX_BUFFER_OVERHEAD_SIZE 15
165#define __MEM_RX_BUFFER_OVERHEAD_SIZE 15
167#define __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count) \
168 ((tx_count) * ((tx_size) + __MEM_TX_BUFFER_OVERHEAD_SIZE) - \
169 (SDC_DEFAULT_TX_PACKET_SIZE + __MEM_TX_BUFFER_OVERHEAD_SIZE) + \
170 (rx_count) * ((rx_size) + __MEM_RX_BUFFER_OVERHEAD_SIZE) - \
171 (SDC_DEFAULT_RX_PACKET_SIZE + __MEM_RX_BUFFER_OVERHEAD_SIZE))
180#define SDC_MEM_PER_CENTRAL_LINK(tx_size, rx_size, tx_count, rx_count) \
181 (__MEM_MINIMAL_CENTRAL_LINK_SIZE + \
182 __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count))
191#define SDC_MEM_PER_PERIPHERAL_LINK(tx_size, rx_size, tx_count, rx_count) \
192 (__MEM_MINIMAL_PERIPHERAL_LINK_SIZE + \
193 __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count))
196#define SDC_MEM_CENTRAL_LINKS_SHARED 21
199#define SDC_MEM_PERIPHERAL_LINKS_SHARED 17
205#define SDC_MEM_LE_POWER_CONTROL(num_links) ((num_links) > 0 ? (13 + (num_links) * 123) : 0)
211#define SDC_MEM_SUBRATING(num_links) ((num_links) > 0 ? (12 + (num_links) * 60) : 0)
217#define SDC_MEM_SYNC_TRANSFER(num_links) ((num_links) > 0 ? (13 + (num_links) * 139) : 0)
220#define __MEM_PER_EXTENDED_FEATURE_PAGE 24
227#define SDC_MEM_EXTENDED_FEATURE_SET(num_links, num_pages) \
228 ((num_links) > 0 ? (11 + (num_links) * (19 + (num_pages) * __MEM_PER_EXTENDED_FEATURE_PAGE)) : 0)
234#define SDC_MEM_FRAME_SPACE_UPDATE(num_links) ((num_links) > 0 ? (12 + (num_links) * 68) : 0)
240#define SDC_MEM_SHORTER_CONNECTION_INTERVALS(num_links) ((num_links) > 0 ? (12 + (num_links) * 52) : 0)
243#define SDC_MEM_QOS_CHANNEL_SURVEY (40)
246#define SDC_MEM_SCAN(buffer_count) (408 + (buffer_count) * 104)
249#define SDC_MEM_SCAN_EXT(buffer_count) (408 + (buffer_count) * 320)
254#define SDC_MEM_INITIATOR (384)
257#define SDC_MEM_FAL(max_num_entries) ((max_num_entries) > 0 ? (4 + (max_num_entries) * 8) : 0)
260#define __MEM_PER_ADV_SET_LOW(max_adv_data) ((5184+(max_adv_data)*18)/10)
261#define __MEM_PER_ADV_SET_HIGH(max_adv_data) (706+(max_adv_data))
262#define __MEM_PER_PERIODIC_ADV_SET_LOW(max_adv_data) ((3104+(max_adv_data)*18)/10)
263#define __MEM_PER_PERIODIC_ADV_SET_HIGH(max_adv_data) (498+(max_adv_data))
269#define SDC_MEM_PER_ADV_SET(max_adv_data) ((max_adv_data<255)?\
270 (__MEM_PER_ADV_SET_LOW(max_adv_data)):\
271 (__MEM_PER_ADV_SET_HIGH(max_adv_data)))
279#define SDC_MEM_PER_PERIODIC_ADV_SET(max_adv_data) ((max_adv_data<255)?\
280 (__MEM_PER_PERIODIC_ADV_SET_LOW(max_adv_data)):\
281 (__MEM_PER_PERIODIC_ADV_SET_HIGH(max_adv_data)))
287#define SDC_MEM_PER_PERIODIC_SYNC(buffer_count) (256 + (buffer_count) * 278)
294#define SDC_MEM_PER_PERIODIC_SYNC_RSP(tx_buffer_count, rx_buffer_count) \
295 (671 + (tx_buffer_count - 1) * 255 + (rx_buffer_count) * 279)
301#define SDC_MEM_PERIODIC_ADV_LIST(list_size) ((list_size) * 8)
304#define __MEM_PER_PERIODIC_ADV_RSP_TX_BUFFER(max_tx_data_size) ((max_tx_data_size) + 5)
305#define __MEM_PER_PERIODIC_ADV_RSP_RX_BUFFER (283)
306#define __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITH_RX (461)
307#define __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITHOUT_RX (161)
308#define __MEM_FOR_PERIODIC_ADV_RSP_FAILURE_REPORTING (224)
309#define __MEM_PER_ISO_PDU_POOL(count) ((count) > 0 ? (16 + (count) * 288) : 0)
319#define SDC_MEM_PER_PERIODIC_ADV_RSP_SET(max_adv_data, tx_buffer_count, rx_buffer_count, max_tx_data_size, failure_reporting_enabled) \
320 (SDC_MEM_PER_PERIODIC_ADV_SET(max_adv_data) \
321 + ((rx_buffer_count) > 0 ? __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITH_RX : \
322 __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITHOUT_RX ) \
323 + (tx_buffer_count) * __MEM_PER_PERIODIC_ADV_RSP_TX_BUFFER(max_tx_data_size) \
324 + (rx_buffer_count) * __MEM_PER_PERIODIC_ADV_RSP_RX_BUFFER \
325 + ((failure_reporting_enabled) ? __MEM_FOR_PERIODIC_ADV_RSP_FAILURE_REPORTING : 0))
328#define SDC_MEM_PER_CIG(count) ((count) > 0 ? (13 + (count) * 163) : 0)
331#define SDC_MEM_PER_CIS(count) ((count) > 0 ? (13 + (count) * 547) : 0)
334#define SDC_MEM_PER_BIG(count) ((count) > 0 ? (13 + (count) * 331) : 0)
337#define SDC_MEM_PER_BIS(count) ((count) > 0 ? (13 + (count) * 259) : 0)
344#define SDC_MEM_ISO_RX_PDU_POOL_PER_STREAM_SIZE(rx_pdu_buffer_per_stream_count, cis_count, bis_sink_count) \
345 (__MEM_PER_ISO_PDU_POOL(rx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_sink_count)))
350#define SDC_MEM_ISO_RX_SDU_POOL_SIZE(count, size) ((count) > 0 ? (8 + (count) * ((size) + 13)) : 0)
357#define SDC_MEM_ISO_TX_PDU_POOL_SIZE(tx_pdu_buffer_per_stream_count, cis_count, bis_source_count) \
358 ((tx_pdu_buffer_per_stream_count) > 0 ? \
359 __MEM_PER_ISO_PDU_POOL(tx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_source_count)) : 0)
364#define SDC_MEM_ISO_TX_SDU_POOL_SIZE(count, size) ((count) > 0 ? (12 + (count) * ((size) + 49)) : 0)
367#define __MEM_CS_ANTENNA_PATHS(max_antenna_paths_supported) (((max_antenna_paths_supported) - 1) * 1024)
368#define __MEM_CS_STEP_MODE3(step_mode3_supported) ((step_mode3_supported) ? 1536 : 0)
376#define SDC_MEM_CS(count, max_antenna_paths_supported, step_mode3_supported) \
377 ((count) > 0 ? (13 + (count) * (4283 + __MEM_CS_ANTENNA_PATHS(max_antenna_paths_supported) \
378 + __MEM_CS_STEP_MODE3(step_mode3_supported))) : 0)
384#define SDC_MEM_CS_SETUP_PHASE_LINKS(count) ((count) > 0 ? (11 + (count) * 371) : 0)
void sdc_support_le_coded_phy(void)
Support LE Coded PHY.
void sdc_support_channel_sounding_initiator_role_central(void)
Support Channel Sounding Initiator role as Central.
void sdc_support_connection_subrating_central(void)
Support Connection Subrating for central role.
void sdc_support_direct_test_mode(void)
Support Direct Test Mode.
void sdc_support_lowest_frame_space(void)
Enable support for the lowest frame space possible for ACL connections.
void sdc_support_periodic_adv_sync_transfer_receiver_central(void)
Support for receiving periodic advertising sync transfers as central role.
void sdc_support_adv(void)
Support Advertising State.
void sdc_support_le_periodic_adv_with_rsp(void)
Support LE Periodic Advertising with Responses in the Advertising state.
void sdc_support_connection_subrating_peripheral(void)
Support Connection Subrating for peripheral role.
void sdc_support_dle_peripheral(void)
Support Data Length Extensions for a peripheral device.
void sdc_support_flushable_acl_data(void)
Support Flushable ACL Data.
int32_t sdc_disable(void)
Disable the SoftDevice Controller.
void sdc_support_sca_peripheral(void)
Support Sleep Clock Accuracy (SCA) Update procedure for peripheral role.
void sdc_support_phy_update_peripheral(void)
Support LE Coded PHY for peripheral role.
void sdc_support_ext_adv(void)
Support extended advertising.
void sdc_support_le_2m_phy(void)
Support LE 2M PHY.
void(* sdc_fault_handler_t)(const char *file, const uint32_t line)
Function prototype for the assertion handler.
Definition sdc.h:405
void sdc_support_le_privacy(void)
Support LE Privacy.
void sdc_support_sca_central(void)
Support Sleep Clock Accuracy (SCA) Update procedure for central role.
void sdc_support_cis_peripheral(void)
Support Connected Isochronous streams in the peripheral role.
void sdc_support_shorter_connection_intervals_peripheral(void)
Support Shorter Connection Intervals for peripheral role.
void sdc_support_le_conn_cte_rsp_peripheral(void)
Support LE Connection CTE response for peripheral role.
void sdc_support_ext_scan(void)
Support scanning for extended advertising PDUs.
void sdc_support_channel_sounding_initiator_role_peripheral(void)
Support Channel Sounding Initiator role as Peripheral.
void sdc_support_le_power_control_central(void)
Support LE Power Control 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.
void sdc_support_bis_source(void)
Support Broadcast Isochronous streams as a source.
void sdc_support_le_periodic_sync(void)
Support LE Periodic Advertising in the Synchronization state.
void sdc_support_qos_channel_survey(void)
Support for Quality of Service (QoS) channel survey module.
void sdc_support_periodic_adv_sync_transfer_receiver_peripheral(void)
Support for receiving periodic advertising sync transfers as peripheral role.
void sdc_cs_antenna_switch_callback_set(sdc_cs_antenna_switch_callback_t antenna_switch_cb)
Set antenna switch callback used by Channel Sounding.
void sdc_support_bis_sink(void)
Support Broadcast Isochronous streams as a sink.
void sdc_support_ext_central(void)
Support Extended Scanner, Extended Initiator, and Central role.
void sdc_support_le_periodic_sync_with_rsp(void)
Support LE Periodic Advertising with Responses in the Synchronization state.
int32_t sdc_enable(sdc_callback_t callback, uint8_t *p_mem)
Enable the SoftDevice Controller.
void sdc_support_le_conn_cte_rsp_central(void)
Support LE Connection CTE response for central role.
void sdc_support_channel_sounding_reflector_role_peripheral(void)
Support Channel Sounding Reflector role as Peripheral.
void sdc_iso_host_timestamps_ignore(bool ignore)
Configure the controller to ignore HCI ISO data timestamps from the host.
void sdc_support_central(void)
Support Scanner, Initiator, and Central role.
void sdc_support_phy_update_central(void)
Support PHY Update Procedure for central role.
void sdc_support_channel_sounding_reflector_role(void)
Support Channel Sounding Reflector role.
void sdc_support_parallel_scanning_and_initiating(void)
Support for scanning and initiating at the same time.
void sdc_support_frame_space_update_peripheral(void)
Support Frame Space Update for peripheral role.
void sdc_support_channel_sounding_initiator_role(void)
Support Channel Sounding Initiator role.
void sdc_use_global_channel_map_on_connection(void)
Use global channel map during connection setup.
void sdc_support_cis_central(void)
Support Connected Isochronous streams in the central role.
void sdc_support_channel_sounding_mode3(void)
Support Channel Sounding Step Mode 3.
void sdc_support_le_power_class_1(void)
Support LE Power Class 1.
int32_t sdc_init(sdc_fault_handler_t fault_handler)
Initialize the SoftDevice Controller.
int32_t sdc_build_revision_get(uint8_t *p_build_revision)
Obtain build revision string.
void sdc_support_channel_sounding_test(void)
Support Channel Sounding test command.
void(* sdc_callback_t)(void)
Function prototype for the SoftDevice Controller callback.
Definition sdc.h:412
void sdc_support_channel_sounding_reflector_role_central(void)
Support Channel Sounding Reflector role as Central.
void(* sdc_cs_antenna_switch_callback_t)(uint8_t antenna_index)
Function prototype for antenna switching callback in Channel Sounding.
Definition sdc.h:422
void sdc_support_extended_feature_set_central(void)
Support Extended Feature Set as Central.
sdc_cfg_type
Definition sdc.h:426
@ SDC_CFG_TYPE_PERIPHERAL_COUNT
Definition sdc.h:432
@ SDC_CFG_TYPE_PERIODIC_ADV_COUNT
Definition sdc.h:444
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_COUNT
Definition sdc.h:452
@ SDC_CFG_TYPE_BIS_SINK_COUNT
Definition sdc.h:466
@ SDC_CFG_TYPE_CIS_COUNT
Definition sdc.h:462
@ SDC_CFG_TYPE_BIS_SOURCE_COUNT
Definition sdc.h:468
@ SDC_CFG_TYPE_CS_CFG
Definition sdc.h:474
@ SDC_CFG_TYPE_BUFFER_CFG
Definition sdc.h:434
@ SDC_CFG_TYPE_PERIODIC_SYNC_COUNT
Definition sdc.h:446
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_BUFFER_CFG
Definition sdc.h:454
@ SDC_CFG_TYPE_ADV_BUFFER_CFG
Definition sdc.h:440
@ SDC_CFG_TYPE_ISO_BUFFER_CFG
Definition sdc.h:470
@ SDC_CFG_TYPE_ADV_COUNT
Definition sdc.h:436
@ SDC_CFG_TYPE_BIG_COUNT
Definition sdc.h:464
@ SDC_CFG_TYPE_CENTRAL_COUNT
Definition sdc.h:430
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_FAILURE_REPORTING_CFG
Definition sdc.h:456
@ SDC_CFG_TYPE_EXTENDED_FEATURE_PAGE_COUNT
Definition sdc.h:476
@ SDC_CFG_TYPE_CS_COUNT
Definition sdc.h:472
@ SDC_CFG_TYPE_PERIODIC_SYNC_RSP_TX_BUFFER_CFG
Definition sdc.h:458
@ SDC_CFG_TYPE_PERIODIC_ADV_LIST_SIZE
Definition sdc.h:450
@ SDC_CFG_TYPE_CIG_COUNT
Definition sdc.h:460
@ SDC_CFG_TYPE_PERIODIC_SYNC_BUFFER_CFG
Definition sdc.h:448
@ SDC_CFG_TYPE_SCAN_BUFFER_CFG
Definition sdc.h:438
@ SDC_CFG_TYPE_FAL_SIZE
Definition sdc.h:442
@ SDC_CFG_TYPE_NONE
Definition sdc.h:428
void sdc_support_periodic_adv_sync_transfer_sender_central(void)
Support for sending periodic advertising sync transfers as central role.
void sdc_support_le_path_loss_monitoring(void)
Support LE Path Loss Monitoring.
void sdc_support_peripheral(void)
Support Peripheral role.
void sdc_support_le_periodic_adv(void)
Support LE Periodic Advertising in the Advertising state.
void sdc_support_extended_feature_set(void)
Support Extended Feature Set.
void sdc_support_extended_feature_set_peripheral(void)
Support Extended Feature Set as Peripheral.
void sdc_support_dle_central(void)
Support Data Length Extensions for a central device.
void sdc_support_le_power_control_peripheral(void)
Support LE Power Control for peripheral role.
void sdc_support_periodic_adv_sync_transfer_sender_peripheral(void)
Support for sending periodic advertising sync transfers as peripheral role.
int32_t sdc_default_tx_power_set(int8_t requested_power_level)
Support for setting the default radio TX power level.
void sdc_support_frame_space_update_central(void)
Support Frame Space Update for central role.
void sdc_support_le_connectionless_cte_transmitter(void)
Support LE Connectionless CTE Transmitter.
int32_t sdc_support_helper(void(*sdc_support_func)(void))
Helper function that can be used for sdc_support_* APIs call.
void sdc_support_scan(void)
Support Scanning state.
void sdc_support_shorter_connection_intervals_central(void)
Support Shorter Connection Intervals for central role.
uint16_t max_adv_data
Definition sdc.h:517
uint8_t rx_packet_count
Definition sdc.h:496
uint16_t tx_packet_size
Definition sdc.h:490
uint16_t rx_packet_size
Definition sdc.h:492
uint8_t tx_packet_count
Definition sdc.h:494
Buffer configuration.
Definition sdc.h:489
uint8_t count
Definition sdc.h:504
Buffer count configuration.
Definition sdc.h:503
uint8_t max_antenna_paths_supported
Definition sdc.h:599
uint8_t num_antennas_supported
Definition sdc.h:605
uint8_t tx_sdu_buffer_count
Definition sdc.h:551
uint16_t rx_sdu_buffer_size
Definition sdc.h:588
uint8_t tx_pdu_buffer_per_stream_count
Definition sdc.h:568
uint8_t rx_pdu_buffer_per_stream_count
Definition sdc.h:578
uint8_t rx_sdu_buffer_count
Definition sdc.h:583
uint16_t tx_sdu_buffer_size
Definition sdc.h:556
uint8_t max_tx_data_size
Definition sdc.h:533
uint8_t tx_buffer_count
Definition sdc.h:528
uint8_t rx_buffer_count
Definition sdc.h:541
uint8_t count
Definition sdc.h:483
Role count.
Definition sdc.h:482
sdc_cfg_role_count_t cs_count
Definition sdc.h:741
sdc_cfg_role_count_t periodic_adv_count
Definition sdc.h:652
uint8_t periodic_adv_list_size
Definition sdc.h:682
sdc_cfg_role_count_t bis_source_count
Definition sdc.h:731
sdc_cfg_role_count_t cig_count
Definition sdc.h:711
sdc_cfg_role_count_t central_count
Definition sdc.h:615
sdc_cfg_role_count_t periodic_sync_count
Definition sdc.h:657
uint8_t extended_feature_page_count
Definition sdc.h:751
sdc_cfg_iso_buffer_cfg_t iso_buffer_cfg
Definition sdc.h:736
sdc_cfg_adv_buffer_cfg_t adv_buffer_cfg
Definition sdc.h:642
sdc_cfg_buffer_count_t scan_buffer_cfg
Definition sdc.h:638
sdc_cfg_buffer_count_t periodic_sync_buffer_cfg
Definition sdc.h:675
sdc_cfg_role_count_t cis_count
Definition sdc.h:716
uint8_t periodic_adv_rsp_failure_reporting_cfg
Definition sdc.h:698
sdc_cfg_role_count_t adv_count
Definition sdc.h:628
sdc_cfg_buffer_cfg_t buffer_cfg
Definition sdc.h:623
uint16_t fal_size
Definition sdc.h:647
sdc_cfg_buffer_count_t periodic_sync_rsp_tx_buffer_cfg
Definition sdc.h:706
sdc_cfg_role_count_t big_count
Definition sdc.h:721
sdc_cfg_role_count_t bis_sink_count
Definition sdc.h:726
sdc_cfg_cs_cfg_t cs_cfg
Definition sdc.h:746
sdc_cfg_periodic_adv_rsp_buffer_cfg_t periodic_adv_rsp_buffer_cfg
Definition sdc.h:691
sdc_cfg_role_count_t periodic_adv_rsp_count
Definition sdc.h:687
sdc_cfg_role_count_t peripheral_count
Definition sdc.h:619
SoftDevice Controller configuration.
Definition sdc.h:611