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_DEFAULT_CS_COUNT 0
140#define SDC_BUILD_REVISION_SIZE 20
154#define __MEM_MINIMAL_CENTRAL_LINK_SIZE 811
155#define __MEM_MINIMAL_PERIPHERAL_LINK_SIZE 915
156#define __MEM_TX_BUFFER_OVERHEAD_SIZE 14
157#define __MEM_RX_BUFFER_OVERHEAD_SIZE 14
159#define __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count) \
160 ((tx_count) * ((tx_size) + __MEM_TX_BUFFER_OVERHEAD_SIZE) - \
161 (SDC_DEFAULT_TX_PACKET_SIZE + __MEM_TX_BUFFER_OVERHEAD_SIZE) + \
162 (rx_count) * ((rx_size) + __MEM_RX_BUFFER_OVERHEAD_SIZE) - \
163 (SDC_DEFAULT_RX_PACKET_SIZE + __MEM_RX_BUFFER_OVERHEAD_SIZE))
172#define SDC_MEM_PER_CENTRAL_LINK(tx_size, rx_size, tx_count, rx_count) \
173 (__MEM_MINIMAL_CENTRAL_LINK_SIZE + \
174 __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count))
183#define SDC_MEM_PER_PERIPHERAL_LINK(tx_size, rx_size, tx_count, rx_count) \
184 (__MEM_MINIMAL_PERIPHERAL_LINK_SIZE + \
185 __MEM_ADDITIONAL_LINK_SIZE(tx_size, rx_size, tx_count, rx_count))
188#define SDC_MEM_CENTRAL_LINKS_SHARED 17
191#define SDC_MEM_PERIPHERAL_LINKS_SHARED 17
197#define SDC_MEM_LE_POWER_CONTROL(num_links) ((num_links) > 0 ? (13 + (num_links) * 115) : 0)
203#define SDC_MEM_SUBRATING(num_links) (11 + (num_links) * 19)
209#define SDC_MEM_SYNC_TRANSFER(num_links) ((num_links) > 0 ? (13 + (num_links) * 139) : 0)
212#define SDC_MEM_QOS_CHANNEL_SURVEY (40)
215#define SDC_MEM_SCAN(buffer_count) (345 + (buffer_count) * 98)
218#define SDC_MEM_SCAN_EXT(buffer_count) (345 + (buffer_count) * 320)
223#define SDC_MEM_INITIATOR (320)
226#define SDC_MEM_FAL(max_num_entries) ((max_num_entries) > 0 ? (4 + (max_num_entries) * 8) : 0)
229#define __MEM_PER_ADV_SET_LOW(max_adv_data) ((4912+(max_adv_data)*18)/10)
230#define __MEM_PER_ADV_SET_HIGH(max_adv_data) (679+(max_adv_data))
231#define __MEM_PER_PERIODIC_ADV_SET_LOW(max_adv_data) ((2658+(max_adv_data)*18)/10)
232#define __MEM_PER_PERIODIC_ADV_SET_HIGH(max_adv_data) (457+(max_adv_data))
238#define SDC_MEM_PER_ADV_SET(max_adv_data) ((max_adv_data<255)?\
239 (__MEM_PER_ADV_SET_LOW(max_adv_data)):\
240 (__MEM_PER_ADV_SET_HIGH(max_adv_data)))
248#define SDC_MEM_PER_PERIODIC_ADV_SET(max_adv_data) ((max_adv_data<255)?\
249 (__MEM_PER_PERIODIC_ADV_SET_LOW(max_adv_data)):\
250 (__MEM_PER_PERIODIC_ADV_SET_HIGH(max_adv_data)))
256#define SDC_MEM_PER_PERIODIC_SYNC(buffer_count) (218 + (buffer_count) * 279)
263#define SDC_MEM_PER_PERIODIC_SYNC_RSP(tx_buffer_count, rx_buffer_count) \
264 (639 + (tx_buffer_count - 1) * 254 + (rx_buffer_count) * 278)
270#define SDC_MEM_PERIODIC_ADV_LIST(list_size) ((list_size) * 8)
273#define __MEM_PER_PERIODIC_ADV_RSP_TX_BUFFER(max_tx_data_size) ((max_tx_data_size) + 5)
274#define __MEM_PER_PERIODIC_ADV_RSP_RX_BUFFER (282)
275#define __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITH_RX (465)
276#define __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITHOUT_RX (166)
277#define __MEM_FOR_PERIODIC_ADV_RSP_FAILURE_REPORTING (224)
278#define __MEM_PER_ISO_PDU_POOL(count) ((count) > 0 ? (16 + (count) * 288) : 0)
279#define __MEM_PER_ISO_TX_HCI_BUFFER(count) ((count) > 0 ? (12 + (count) * 300) : 0)
289#define SDC_MEM_PER_PERIODIC_ADV_RSP_SET(max_adv_data, tx_buffer_count, rx_buffer_count, max_tx_data_size, failure_reporting_enabled) \
290 (SDC_MEM_PER_PERIODIC_ADV_SET(max_adv_data) \
291 + ((rx_buffer_count) > 0 ? __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITH_RX : \
292 __MEM_MINIMAL_PERIODIC_ADV_RSP_SET_SIZE_WITHOUT_RX ) \
293 + (tx_buffer_count) * __MEM_PER_PERIODIC_ADV_RSP_TX_BUFFER(max_tx_data_size) \
294 + (rx_buffer_count) * __MEM_PER_PERIODIC_ADV_RSP_RX_BUFFER \
295 + ((failure_reporting_enabled) ? __MEM_FOR_PERIODIC_ADV_RSP_FAILURE_REPORTING : 0))
298#define SDC_MEM_PER_CIG(count) ((count) > 0 ? (13 + (count) * 123) : 0)
301#define SDC_MEM_PER_CIS(count) ((count) > 0 ? (13 + (count) * 548) : 0)
304#define SDC_MEM_PER_BIG(count) ((count) > 0 ? (13 + (count) * 284) : 0)
307#define SDC_MEM_PER_BIS(count) ((count) > 0 ? (13 + (count) * 268) : 0)
314#define SDC_MEM_ISO_RX_PDU_POOL_PER_STREAM_SIZE(rx_pdu_buffer_per_stream_count, cis_count, bis_sink_count) \
315 (__MEM_PER_ISO_PDU_POOL(rx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_sink_count)))
320#define SDC_MEM_ISO_RX_SDU_POOL_SIZE(count, size) ((count) > 0 ? (8 + (count) * ((size) + 13)) : 0)
327#define SDC_MEM_ISO_TX_PDU_POOL_SIZE(tx_pdu_buffer_per_stream_count, cis_count, bis_source_count) \
328 ((tx_pdu_buffer_per_stream_count) > 0 ? \
329 __MEM_PER_ISO_PDU_POOL(tx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_source_count)) : 0)
334#define SDC_MEM_ISO_TX_SDU_POOL_SIZE(count, size) ((count) > 0 ? (12 + (count) * ((size) + 49)) : 0)
340#define SDC_MEM_CS(count) ((count) > 0 ? (13 + (count) * 8907) : 0)
346#define SDC_MEM_CS_SETUP_PHASE_LINKS(count) ((count) > 0 ? (11 + (count)*315) : 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:359
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_channel_sounding(void)
Support LE Channel Sounding.
int32_t sdc_support_connection_subrating_central(void)
Support Connection Subrating for central role.
int32_t sdc_support_le_power_class_1(void)
Support LE Power Class 1.
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:366
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:370
@ SDC_CFG_TYPE_PERIPHERAL_COUNT
Definition sdc.h:376
@ SDC_CFG_TYPE_PERIODIC_ADV_COUNT
Definition sdc.h:388
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_COUNT
Definition sdc.h:396
@ SDC_CFG_TYPE_BIS_SINK_COUNT
Definition sdc.h:410
@ SDC_CFG_TYPE_CIS_COUNT
Definition sdc.h:406
@ SDC_CFG_TYPE_BIS_SOURCE_COUNT
Definition sdc.h:412
@ SDC_CFG_TYPE_BUFFER_CFG
Definition sdc.h:378
@ SDC_CFG_TYPE_PERIODIC_SYNC_COUNT
Definition sdc.h:390
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_BUFFER_CFG
Definition sdc.h:398
@ SDC_CFG_TYPE_ADV_BUFFER_CFG
Definition sdc.h:384
@ SDC_CFG_TYPE_ISO_BUFFER_CFG
Definition sdc.h:414
@ SDC_CFG_TYPE_ADV_COUNT
Definition sdc.h:380
@ SDC_CFG_TYPE_BIG_COUNT
Definition sdc.h:408
@ SDC_CFG_TYPE_CENTRAL_COUNT
Definition sdc.h:374
@ SDC_CFG_TYPE_PERIODIC_ADV_RSP_FAILURE_REPORTING_CFG
Definition sdc.h:400
@ SDC_CFG_TYPE_CS_COUNT
Definition sdc.h:416
@ SDC_CFG_TYPE_PERIODIC_SYNC_RSP_TX_BUFFER_CFG
Definition sdc.h:402
@ SDC_CFG_TYPE_PERIODIC_ADV_LIST_SIZE
Definition sdc.h:394
@ SDC_CFG_TYPE_CIG_COUNT
Definition sdc.h:404
@ SDC_CFG_TYPE_PERIODIC_SYNC_BUFFER_CFG
Definition sdc.h:392
@ SDC_CFG_TYPE_SCAN_BUFFER_CFG
Definition sdc.h:382
@ SDC_CFG_TYPE_FAL_SIZE
Definition sdc.h:386
@ SDC_CFG_TYPE_NONE
Definition sdc.h:372
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_channel_sounding_test(void)
Support Channel Sounding test command.
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:457
uint8_t rx_packet_count
Definition sdc.h:436
uint8_t rx_packet_size
Definition sdc.h:432
uint8_t tx_packet_size
Definition sdc.h:430
uint8_t tx_packet_count
Definition sdc.h:434
Buffer configuration.
Definition sdc.h:429
uint8_t count
Definition sdc.h:444
Buffer count configuration.
Definition sdc.h:443
uint8_t tx_sdu_buffer_count
Definition sdc.h:491
uint16_t rx_sdu_buffer_size
Definition sdc.h:528
uint8_t tx_pdu_buffer_per_stream_count
Definition sdc.h:508
uint8_t rx_pdu_buffer_per_stream_count
Definition sdc.h:518
uint8_t rx_sdu_buffer_count
Definition sdc.h:523
uint16_t tx_sdu_buffer_size
Definition sdc.h:496
uint8_t max_tx_data_size
Definition sdc.h:473
uint8_t tx_buffer_count
Definition sdc.h:468
uint8_t rx_buffer_count
Definition sdc.h:481
uint8_t count
Definition sdc.h:423
Role count.
Definition sdc.h:422
sdc_cfg_role_count_t cs_count
Definition sdc.h:664
sdc_cfg_role_count_t periodic_adv_count
Definition sdc.h:575
uint8_t periodic_adv_list_size
Definition sdc.h:605
sdc_cfg_role_count_t bis_source_count
Definition sdc.h:654
sdc_cfg_role_count_t cig_count
Definition sdc.h:634
sdc_cfg_role_count_t central_count
Definition sdc.h:538
sdc_cfg_role_count_t periodic_sync_count
Definition sdc.h:580
sdc_cfg_iso_buffer_cfg_t iso_buffer_cfg
Definition sdc.h:659
sdc_cfg_adv_buffer_cfg_t adv_buffer_cfg
Definition sdc.h:565
sdc_cfg_buffer_count_t scan_buffer_cfg
Definition sdc.h:561
sdc_cfg_buffer_count_t periodic_sync_buffer_cfg
Definition sdc.h:598
sdc_cfg_role_count_t cis_count
Definition sdc.h:639
uint8_t periodic_adv_rsp_failure_reporting_cfg
Definition sdc.h:621
sdc_cfg_role_count_t adv_count
Definition sdc.h:551
sdc_cfg_buffer_cfg_t buffer_cfg
Definition sdc.h:546
uint16_t fal_size
Definition sdc.h:570
sdc_cfg_buffer_count_t periodic_sync_rsp_tx_buffer_cfg
Definition sdc.h:629
sdc_cfg_role_count_t big_count
Definition sdc.h:644
sdc_cfg_role_count_t bis_sink_count
Definition sdc.h:649
sdc_cfg_periodic_adv_rsp_buffer_cfg_t periodic_adv_rsp_buffer_cfg
Definition sdc.h:614
sdc_cfg_role_count_t periodic_adv_rsp_count
Definition sdc.h:610
sdc_cfg_role_count_t peripheral_count
Definition sdc.h:542
SoftDevice Controller configuration.
Definition sdc.h:534