pub struct Builder { /* private fields */ }Expand description
A builder for the SoftDevice Controller.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn central_count(self, count: u8) -> Result<Self, Error>
pub fn central_count(self, count: u8) -> Result<Self, Error>
Sets the number of central links.
Sourcepub fn peripheral_count(self, count: u8) -> Result<Self, Error>
pub fn peripheral_count(self, count: u8) -> Result<Self, Error>
Sets the number of peripheral links.
Sourcepub fn buffer_cfg(
self,
tx_packet_size: u16,
rx_packet_size: u16,
tx_packet_count: u8,
rx_packet_count: u8,
) -> Result<Self, Error>
pub fn buffer_cfg( self, tx_packet_size: u16, rx_packet_size: u16, tx_packet_count: u8, rx_packet_count: u8, ) -> Result<Self, Error>
Sets the buffer configuration.
Sourcepub fn scan_buffer_cfg(self, count: u8) -> Result<Self, Error>
pub fn scan_buffer_cfg(self, count: u8) -> Result<Self, Error>
Sets the scan buffer configuration.
Sourcepub fn adv_buffer_cfg(self, max_adv_data: u16) -> Result<Self, Error>
pub fn adv_buffer_cfg(self, max_adv_data: u16) -> Result<Self, Error>
Sets the advertising buffer configuration.
Sourcepub fn periodic_adv_count(self, count: u8) -> Result<Self, Error>
pub fn periodic_adv_count(self, count: u8) -> Result<Self, Error>
Sets the number of periodic advertising sets.
Sourcepub fn periodic_sync_count(self, count: u8) -> Result<Self, Error>
pub fn periodic_sync_count(self, count: u8) -> Result<Self, Error>
Sets the number of periodic syncs.
Sourcepub fn periodic_sync_buffer_cfg(self, count: u8) -> Result<Self, Error>
pub fn periodic_sync_buffer_cfg(self, count: u8) -> Result<Self, Error>
Sets the periodic sync buffer configuration.
Sourcepub fn periodic_adv_list_len(self, len: u8) -> Result<Self, Error>
pub fn periodic_adv_list_len(self, len: u8) -> Result<Self, Error>
Sets the periodic advertising list length.
Sourcepub fn support_adv(self) -> Result<Self, Error>
pub fn support_adv(self) -> Result<Self, Error>
Enables support for advertising.
Sourcepub fn support_ext_adv(self) -> Result<Self, Error>
pub fn support_ext_adv(self) -> Result<Self, Error>
Enables support for extended advertising.
Sourcepub fn support_peripheral(self) -> Result<Self, Error>
pub fn support_peripheral(self) -> Result<Self, Error>
Enables support for peripheral role.
Sourcepub fn support_scan(self) -> Result<Self, Error>
pub fn support_scan(self) -> Result<Self, Error>
Enables support for scanning.
Sourcepub fn support_ext_scan(self) -> Result<Self, Error>
pub fn support_ext_scan(self) -> Result<Self, Error>
Enables support for extended scanning.
Sourcepub fn support_central(self) -> Result<Self, Error>
pub fn support_central(self) -> Result<Self, Error>
Enables support for central role.
Sourcepub fn support_ext_central(self) -> Result<Self, Error>
pub fn support_ext_central(self) -> Result<Self, Error>
Enables support for extended central role.
Sourcepub fn support_dle_central(self) -> Result<Self, Error>
pub fn support_dle_central(self) -> Result<Self, Error>
Enables support for Data Length Extension (DLE) in central role.
Sourcepub fn support_dle_peripheral(self) -> Result<Self, Error>
pub fn support_dle_peripheral(self) -> Result<Self, Error>
Enables support for Data Length Extension (DLE) in peripheral role.
Sourcepub fn support_le_2m_phy(self) -> Result<Self, Error>
pub fn support_le_2m_phy(self) -> Result<Self, Error>
Enables support for 2M PHY.
Sourcepub fn support_le_coded_phy(self) -> Result<Self, Error>
pub fn support_le_coded_phy(self) -> Result<Self, Error>
Enables support for coded PHY.
Sourcepub fn support_phy_update_central(self) -> Result<Self, Error>
pub fn support_phy_update_central(self) -> Result<Self, Error>
Enables support for PHY update in central role.
Sourcepub fn support_phy_update_peripheral(self) -> Result<Self, Error>
pub fn support_phy_update_peripheral(self) -> Result<Self, Error>
Enables support for PHY update in peripheral role.
Sourcepub fn support_le_periodic_adv(self) -> Result<Self, Error>
pub fn support_le_periodic_adv(self) -> Result<Self, Error>
Enables support for periodic advertising.
Sourcepub fn support_le_periodic_sync(self) -> Result<Self, Error>
pub fn support_le_periodic_sync(self) -> Result<Self, Error>
Enables support for periodic sync.
Sourcepub fn support_le_power_control_central(self) -> Result<Self, Error>
pub fn support_le_power_control_central(self) -> Result<Self, Error>
Enables support for LE power control in central role.
Sourcepub fn support_le_power_control_peripheral(self) -> Result<Self, Error>
pub fn support_le_power_control_peripheral(self) -> Result<Self, Error>
Enables support for LE power control in peripheral role.
Sourcepub fn support_sca_central(self) -> Result<Self, Error>
pub fn support_sca_central(self) -> Result<Self, Error>
Enables support for sleep clock accuracy (SCA) updates in central role.
Sourcepub fn support_sca_peripheral(self) -> Result<Self, Error>
pub fn support_sca_peripheral(self) -> Result<Self, Error>
Enables support for sleep clock accuracy (SCA) updates in peripheral role.
Sourcepub fn support_le_conn_cte_rsp_central(self) -> Result<Self, Error>
pub fn support_le_conn_cte_rsp_central(self) -> Result<Self, Error>
Enables support for LE connection CTE response in central role.
Sourcepub fn support_le_conn_cte_rsp_peripheral(self) -> Result<Self, Error>
pub fn support_le_conn_cte_rsp_peripheral(self) -> Result<Self, Error>
Enables support for LE connection CTE response in peripheral role.
Sourcepub fn support_periodic_adv_sync_transfer_sender_central(
self,
) -> Result<Self, Error>
pub fn support_periodic_adv_sync_transfer_sender_central( self, ) -> Result<Self, Error>
Enables support for periodic advertising sync transfer sender in central role.
Sourcepub fn support_periodic_adv_sync_transfer_sender_peripheral(
self,
) -> Result<Self, Error>
pub fn support_periodic_adv_sync_transfer_sender_peripheral( self, ) -> Result<Self, Error>
Enables support for periodic advertising sync transfer sender in peripheral role.
Sourcepub fn support_periodic_adv_sync_transfer_receiver_central(
self,
) -> Result<Self, Error>
pub fn support_periodic_adv_sync_transfer_receiver_central( self, ) -> Result<Self, Error>
Enables support for periodic advertising sync transfer receiver in central role.
Sourcepub fn support_periodic_adv_sync_transfer_receiver_peripheral(
self,
) -> Result<Self, Error>
pub fn support_periodic_adv_sync_transfer_receiver_peripheral( self, ) -> Result<Self, Error>
Enables support for periodic advertising sync transfer receiver in peripheral role.
Sourcepub fn support_qos_channel_survey(self) -> Result<Self, Error>
pub fn support_qos_channel_survey(self) -> Result<Self, Error>
Enables support for QoS channel survey.
Sourcepub fn default_tx_power(self, dbm: i8) -> Result<Self, Error>
pub fn default_tx_power(self, dbm: i8) -> Result<Self, Error>
Sets the default TX power.
Sourcepub fn required_memory(&self) -> Result<usize, Error>
pub fn required_memory(&self) -> Result<usize, Error>
Calculates the required memory for the current configuration.
Sourcepub fn build<'d, R: CryptoRng + Send, const N: usize>(
self,
p: Peripherals<'d>,
rng: &'d mut R,
mpsl: &'d MultiprotocolServiceLayer<'_>,
mem: &'d mut Mem<N>,
) -> Result<SoftdeviceController<'d>, Error>
pub fn build<'d, R: CryptoRng + Send, const N: usize>( self, p: Peripherals<'d>, rng: &'d mut R, mpsl: &'d MultiprotocolServiceLayer<'_>, mem: &'d mut Mem<N>, ) -> Result<SoftdeviceController<'d>, Error>
Builds the SoftDevice Controller.
§Safety
The returned SoftdeviceController must not have its lifetime end without running its destructor, e.g. using mem::forget.