Config

Struct Config 

Source
pub struct Config { /* private fields */ }
Available on crate feature unstable only.
Expand description

Bluetooth controller configuration.

Implementations§

Source§

impl Config

Source

pub fn with_task_priority(self, task_priority: u8) -> Self

Assign the given value to the task_priority field.

Source

pub fn task_priority(&self) -> u8

The priority of the RTOS task.

Source

pub fn with_task_stack_size(self, task_stack_size: u16) -> Self

Assign the given value to the task_stack_size field.

Source

pub fn task_stack_size(&self) -> u16

The stack size of the RTOS task.

Source

pub fn with_max_connections(self, max_connections: u16) -> Self

Assign the given value to the max_connections field.

Source

pub fn max_connections(&self) -> u16

The maximum number of simultaneous connections.

Range: 1 - 35

Source

pub fn with_qa_test_mode(self, qa_test_mode: bool) -> Self

Assign the given value to the qa_test_mode field.

Source

pub fn qa_test_mode(&self) -> bool

Enable QA test mode.

Source

pub fn with_bqb_test(self, bqb_test: bool) -> Self

Assign the given value to the bqb_test field.

Source

pub fn bqb_test(&self) -> bool

Enable BQB test mode.

Source

pub fn with_ll_resolv_list_size(self, ll_resolv_list_size: u16) -> Self

Assign the given value to the ll_resolv_list_size field.

Source

pub fn ll_resolv_list_size(&self) -> u16

Size of the resolvable private address list.

Source

pub fn with_ll_sync_list_cnt(self, ll_sync_list_cnt: u8) -> Self

Assign the given value to the ll_sync_list_cnt field.

Source

pub fn ll_sync_list_cnt(&self) -> u8

Maximum number of periodic advertiser list.

Range: 1 - 5

Source

pub fn with_ll_sync_cnt(self, ll_sync_cnt: u8) -> Self

Assign the given value to the ll_sync_cnt field.

Source

pub fn ll_sync_cnt(&self) -> u8

Maximum number of periodic advertising syncs.

Range: 0 - 3

Source

pub fn with_ll_rsp_dup_list_count(self, ll_rsp_dup_list_count: u16) -> Self

Assign the given value to the ll_rsp_dup_list_count field.

Source

pub fn ll_rsp_dup_list_count(&self) -> u16

Count of duplicated lists for scan response packets

Range: 1 - 100

Source

pub fn with_ll_adv_dup_list_count(self, ll_adv_dup_list_count: u16) -> Self

Assign the given value to the ll_adv_dup_list_count field.

Source

pub fn ll_adv_dup_list_count(&self) -> u16

Count of duplicated lists for advertising packets

Range: 1 - 100

Source

pub fn with_verify_access_address(self, verify_access_address: bool) -> Self

Assign the given value to the verify_access_address field.

Source

pub fn verify_access_address(&self) -> bool

Enables verification of the Access Address within the CONNECT_IND PDU.

Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU. This improves security by ensuring that only connection requests with valid Access Addresses are accepted. If disabled, only basic checks are applied, improving compatibility.

Source

pub fn with_channel_assessment(self, channel_assessment: bool) -> Self

Assign the given value to the channel_assessment field.

Source

pub fn channel_assessment(&self) -> bool

Enable BLE channel assessment.

Source

pub fn with_default_tx_power(self, default_tx_power: TxPower) -> Self

Assign the given value to the default_tx_power field.

Source

pub fn default_tx_power(&self) -> TxPower

Default TX power.

Source

pub fn with_hci_high_buffer_count(self, hci_high_buffer_count: u16) -> Self

Assign the given value to the hci_high_buffer_count field.

Source

pub fn hci_high_buffer_count(&self) -> u16

High Priority HCI Event Buffer count

Source

pub fn with_hci_low_buffer_count(self, hci_low_buffer_count: u16) -> Self

Assign the given value to the hci_low_buffer_count field.

Source

pub fn hci_low_buffer_count(&self) -> u16

Low Priority HCI Event Buffer count

Source

pub fn with_whitelist_size(self, whitelist_size: u8) -> Self

Assign the given value to the whitelist_size field.

Source

pub fn whitelist_size(&self) -> u8

Size of the whitelist.

Source

pub fn with_acl_buf_size(self, acl_buf_size: u16) -> Self

Assign the given value to the acl_buf_size field.

Source

pub fn acl_buf_size(&self) -> u16

Buffer size of ACL (Asynchronous Connection-Less) data

Source

pub fn with_acl_buf_count(self, acl_buf_count: u16) -> Self

Assign the given value to the acl_buf_count field.

Source

pub fn acl_buf_count(&self) -> u16

Buffer count of ACL data

Source

pub fn with_hci_evt_buf_size(self, hci_evt_buf_size: u16) -> Self

Assign the given value to the hci_evt_buf_size field.

Source

pub fn hci_evt_buf_size(&self) -> u16

Buffer size for HCI event data

Source

pub fn with_multi_adv_instances(self, multi_adv_instances: u16) -> Self

Assign the given value to the multi_adv_instances field.

Source

pub fn multi_adv_instances(&self) -> u16

Maximum number of extended advertising instances.

Source

pub fn with_ext_adv_max_size(self, ext_adv_max_size: u16) -> Self

Assign the given value to the ext_adv_max_size field.

Source

pub fn ext_adv_max_size(&self) -> u16

Maximum size of extended advertising data

Range: 0 - 1650

Source

pub fn with_dis_scan_backoff(self, dis_scan_backoff: bool) -> Self

Assign the given value to the dis_scan_backoff field.

Source

pub fn dis_scan_backoff(&self) -> bool

Disable scan backoff

Source

pub fn with_scan_backoff_max(self, scan_backoff_max: u16) -> Self

Assign the given value to the scan_backoff_max field.

Source

pub fn scan_backoff_max(&self) -> u16

The value of upperlimitmax during scan backoff procedure

The value of upperlimitmax needs to be a power of 2.

Range: 1 - 256

Source

pub fn with_cca(self, cca: bool) -> Self

Assign the given value to the cca field.

Source

pub fn cca(&self) -> bool

Enable BLE Clear Channel Assessment (CCA).

Source

pub fn with_cca_threshold(self, cca_threshold: u8) -> Self

Assign the given value to the cca_threshold field.

Source

pub fn cca_threshold(&self) -> u8

Absolute value of hardware-triggered CCA threshold.

The CCA threshold is always negative.

If the channel assessment result exceeds the CCA threshold (e.g. -75 dBm), indicating the channel is busy, the hardware will not transmit packets on that channel.

Range: 20 dBm - 100 dBm

Source

pub fn with_data_length_zero_aux(self, data_length_zero_aux: bool) -> Self

Assign the given value to the data_length_zero_aux field.

Source

pub fn data_length_zero_aux(&self) -> bool

Enable / disable auxiliary packets when the extended ADV data length is zero.

Source

pub fn with_disconnect_llcp_conn_update( self, disconnect_llcp_conn_update: bool, ) -> Self

Assign the given value to the disconnect_llcp_conn_update field.

Source

pub fn disconnect_llcp_conn_update(&self) -> bool

Disconnect when Instant Passed (0x28) occurs during ACL connection update.

Source

pub fn with_disconnect_llcp_chan_map_update( self, disconnect_llcp_chan_map_update: bool, ) -> Self

Assign the given value to the disconnect_llcp_chan_map_update field.

Source

pub fn disconnect_llcp_chan_map_update(&self) -> bool

Disconnect when Instant Passed (0x28) occurs during ACL channel map update.

Source

pub fn with_disconnect_llcp_phy_update( self, disconnect_llcp_phy_update: bool, ) -> Self

Assign the given value to the disconnect_llcp_phy_update field.

Source

pub fn disconnect_llcp_phy_update(&self) -> bool

Disconnect when Instant Passed (0x28) occurs during ACL PHY update.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Format for Config
where TxPower: Format,

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl PartialEq for Config

Source§

fn eq(&self, other: &Config) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Config

Source§

impl Eq for Config

Source§

impl StructuralPartialEq for Config

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.