Builder

Struct Builder 

Source
pub struct Builder { /* private fields */ }
Expand description

A builder for the SoftDevice Controller.

Implementations§

Source§

impl Builder

Source

pub fn new() -> Result<Self, Error>

Creates a new Builder instance.

Source

pub fn central_count(self, count: u8) -> Result<Self, Error>

Sets the number of central links.

Source

pub fn peripheral_count(self, count: u8) -> Result<Self, Error>

Sets the number of peripheral links.

Source

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.

Source

pub fn adv_count(self, count: u8) -> Result<Self, Error>

Sets the number of advertising sets.

Source

pub fn scan_buffer_cfg(self, count: u8) -> Result<Self, Error>

Sets the scan buffer configuration.

Source

pub fn adv_buffer_cfg(self, max_adv_data: u16) -> Result<Self, Error>

Sets the advertising buffer configuration.

Source

pub fn periodic_adv_count(self, count: u8) -> Result<Self, Error>

Sets the number of periodic advertising sets.

Source

pub fn periodic_sync_count(self, count: u8) -> Result<Self, Error>

Sets the number of periodic syncs.

Source

pub fn periodic_sync_buffer_cfg(self, count: u8) -> Result<Self, Error>

Sets the periodic sync buffer configuration.

Source

pub fn periodic_adv_list_len(self, len: u8) -> Result<Self, Error>

Sets the periodic advertising list length.

Source

pub fn support_adv(self) -> Result<Self, Error>

Enables support for advertising.

Source

pub fn support_ext_adv(self) -> Result<Self, Error>

Enables support for extended advertising.

Source

pub fn support_peripheral(self) -> Result<Self, Error>

Enables support for peripheral role.

Source

pub fn support_scan(self) -> Result<Self, Error>

Enables support for scanning.

Source

pub fn support_ext_scan(self) -> Result<Self, Error>

Enables support for extended scanning.

Source

pub fn support_central(self) -> Result<Self, Error>

Enables support for central role.

Source

pub fn support_ext_central(self) -> Result<Self, Error>

Enables support for extended central role.

Source

pub fn support_dle_central(self) -> Result<Self, Error>

Enables support for Data Length Extension (DLE) in central role.

Source

pub fn support_dle_peripheral(self) -> Result<Self, Error>

Enables support for Data Length Extension (DLE) in peripheral role.

Source

pub fn support_le_2m_phy(self) -> Result<Self, Error>

Enables support for 2M PHY.

Source

pub fn support_le_coded_phy(self) -> Result<Self, Error>

Enables support for coded PHY.

Source

pub fn support_phy_update_central(self) -> Result<Self, Error>

Enables support for PHY update in central role.

Source

pub fn support_phy_update_peripheral(self) -> Result<Self, Error>

Enables support for PHY update in peripheral role.

Source

pub fn support_le_periodic_adv(self) -> Result<Self, Error>

Enables support for periodic advertising.

Source

pub fn support_le_periodic_sync(self) -> Result<Self, Error>

Enables support for periodic sync.

Source

pub fn support_le_power_control_central(self) -> Result<Self, Error>

Enables support for LE power control in central role.

Source

pub fn support_le_power_control_peripheral(self) -> Result<Self, Error>

Enables support for LE power control in peripheral role.

Source

pub fn support_sca_central(self) -> Result<Self, Error>

Enables support for sleep clock accuracy (SCA) updates in central role.

Source

pub fn support_sca_peripheral(self) -> Result<Self, Error>

Enables support for sleep clock accuracy (SCA) updates in peripheral role.

Source

pub fn support_le_conn_cte_rsp_central(self) -> Result<Self, Error>

Enables support for LE connection CTE response in central role.

Source

pub fn support_le_conn_cte_rsp_peripheral(self) -> Result<Self, Error>

Enables support for LE connection CTE response in peripheral role.

Source

pub fn support_periodic_adv_sync_transfer_sender_central( self, ) -> Result<Self, Error>

Enables support for periodic advertising sync transfer sender in central role.

Source

pub fn support_periodic_adv_sync_transfer_sender_peripheral( self, ) -> Result<Self, Error>

Enables support for periodic advertising sync transfer sender in peripheral role.

Source

pub fn support_periodic_adv_sync_transfer_receiver_central( self, ) -> Result<Self, Error>

Enables support for periodic advertising sync transfer receiver in central role.

Source

pub fn support_periodic_adv_sync_transfer_receiver_peripheral( self, ) -> Result<Self, Error>

Enables support for periodic advertising sync transfer receiver in peripheral role.

Source

pub fn support_qos_channel_survey(self) -> Result<Self, Error>

Enables support for QoS channel survey.

Source

pub fn default_tx_power(self, dbm: i8) -> Result<Self, Error>

Sets the default TX power.

Source

pub fn required_memory(&self) -> Result<usize, Error>

Calculates the required memory for the current configuration.

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

Source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
Source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

Source§

fn lossy_into(self) -> Dst

Performs the conversion.
Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.