#[repr(C, packed(1))]pub struct ShciBleInitCmdParam {Show 18 fields
pub p_ble_buffer_address: u32,
pub ble_buffer_size: u32,
pub num_attr_record: u16,
pub num_attr_serv: u16,
pub attr_value_arr_size: u16,
pub num_of_links: u8,
pub extended_packet_length_enable: u8,
pub prepare_write_list_size: u8,
pub block_count: u8,
pub att_mtu: u16,
pub slave_sca: u16,
pub master_sca: u8,
pub ls_source: u8,
pub max_conn_event_length: u32,
pub hs_startup_time: u16,
pub viterbi_enable: u8,
pub options: u8,
pub hw_version: u8,
}
Fields§
§p_ble_buffer_address: u32
NOT USED - shall be set to 0
ble_buffer_size: u32
NOT USED - shall be set to 0
num_attr_record: u16
Maximum number of attribute records related to all the required characteristics (excluding the services) that can be stored in the GATT database, for the specific BLE user application. For each characteristic, the number of attribute records goes from two to five depending on the characteristic properties:
- minimum of two (one for declaration and one for the value)
- add one more record for each additional property: notify or indicate, broadcast, extended property. The total calculated value must be increased by 9, due to the records related to the standard attribute profile and GAP service characteristics, and automatically added when initializing GATT and GAP layers
- Min value:
+ 9 - Max value: depending on the GATT database defined by user application
num_attr_serv: u16
Defines the maximum number of services that can be stored in the GATT database. Note that the GAP and GATT services are automatically added at initialization so this parameter must be the number of user services increased by two.
- Min value:
+ 2 - Max value: depending GATT database defined by user application
attr_value_arr_size: u16
NOTE: This parameter is ignored by the CPU2 when the parameter “Options” is set to “LL_only” ( see Options description in that structure )
Size of the storage area for the attribute values. Each characteristic contributes to the attrValueArrSize value as follows:
- Characteristic value length plus:
- 5 bytes if characteristic UUID is 16 bits
- 19 bytes if characteristic UUID is 128 bits
- 2 bytes if characteristic has a server configuration descriptor
- 2 bytes * NumOfLinks if the characteristic has a client configuration descriptor
- 2 bytes if the characteristic has extended properties Each descriptor contributes to the attrValueArrSize value as follows:
- Descriptor length
num_of_links: u8
Maximum number of BLE links supported
- Min value: 1
- Max value: 8
extended_packet_length_enable: u8
Disable/enable the extended packet length BLE 5.0 feature
- Disable: 0
- Enable: 1
prepare_write_list_size: u8
NOTE: This parameter is ignored by the CPU2 when the parameter “Options” is set to “LL_only” ( see Options description in that structure )
Maximum number of supported “prepare write request”
- Min value: given by the macro DEFAULT_PREP_WRITE_LIST_SIZE
- Max value: a value higher than the minimum required can be specified, but it is not recommended
block_count: u8
NOTE: This parameter is overwritten by the CPU2 with an hardcoded optimal value when the parameter “Options” is set to “LL_only” ( see Options description in that structure )
Number of allocated memory blocks for the BLE stack - Min value: given by the macro MBLOCKS_CALC - Max value: a higher value can improve data throughput performance, but uses more memory
att_mtu: u16
NOTE: This parameter is ignored by the CPU2 when the parameter “Options” is set to “LL_only” ( see Options description in that structure )
Maximum ATT MTU size supported - Min value: 23 - Max value: 512
slave_sca: u16
The sleep clock accuracy (ppm value) that used in BLE connected slave mode to calculate the window widening (in combination with the sleep clock accuracy sent by master in CONNECT_REQ PDU), refer to BLE 5.0 specifications - Vol 6 - Part B - chap 4.5.7 and 4.2.2 - Min value: 0 - Max value: 500 (worst possible admitted by specification)
master_sca: u8
The sleep clock accuracy handled in master mode. It is used to determine the connection and advertising events timing. It is transmitted to the slave in CONNEC_REQ PDU used by the slave to calculate the window widening, see SlaveSca and Bluetooth Core Specification v5.0 Vol 6 - Part B - chap 4.5.7 and 4.2.2 Possible values:
- 251 ppm to 500 ppm: 0
- 151 ppm to 250 ppm: 1
- 101 ppm to 150 ppm: 2
- 76 ppm to 100 ppm: 3
- 51 ppm to 75 ppm: 4
- 31 ppm to 50 ppm: 5
- 21 ppm to 30 ppm: 6
- 0 ppm to 20 ppm: 7
ls_source: u8
Some information for Low speed clock mapped in bits field
- bit 0:
- 1: Calibration for the RF system wakeup clock source
- 0: No calibration for the RF system wakeup clock source
- bit 1:
- 1: STM32W5M Module device
- 0: Other devices as STM32WBxx SOC, STM32WB1M module
- bit 2:
- 1: HSE/1024 Clock config
- 0: LSE Clock config
max_conn_event_length: u32
This parameter determines the maximum duration of a slave connection event. When this duration is reached the slave closes the current connections event (whatever is the CE_length parameter specified by the master in HCI_CREATE_CONNECTION HCI command), expressed in units of 625/256 µs (~2.44 µs)
- Min value: 0 (if 0 is specified, the master and slave perform only a single TX-RX exchange per connection event)
- Max value: 1638400 (4000 ms). A higher value can be specified (max 0xFFFFFFFF) but results in a maximum connection time of 4000 ms as specified. In this case the parameter is not applied, and the predicted CE length calculated on slave is not shortened
hs_startup_time: u16
Startup time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 µs (~2.44 µs).
- Min value: 0
- Max value: 820 (~2 ms). A higher value can be specified, but the value that implemented in stack is forced to ~2 ms
viterbi_enable: u8
Viterbi implementation in BLE LL reception.
- 0: Enable
- 1: Disable
options: u8
- bit 0:
- 1: LL only
- 0: LL + host
- bit 1:
- 1: no service change desc.
- 0: with service change desc.
- bit 2:
- 1: device name Read-Only
- 0: device name R/W
- bit 3:
- 1: extended advertizing supported
- 0: extended advertizing not supported
- bit 4:
- 1: CS Algo #2 supported
- 0: CS Algo #2 not supported
- bit 5:
- 1: Reduced GATT database in NVM
- 0: Full GATT database in NVM
- bit 6:
- 1: GATT caching is used
- 0: GATT caching is not used
- bit 7:
- 1: LE Power Class 1
- 0: LE Power Classe 2-3
- other bits: complete with Options_extension flag
hw_version: u8
Reserved for future use - shall be set to 0
Implementations§
Trait Implementations§
Source§impl Clone for ShciBleInitCmdParam
impl Clone for ShciBleInitCmdParam
Source§fn clone(&self) -> ShciBleInitCmdParam
fn clone(&self) -> ShciBleInitCmdParam
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more