aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32-wpan/src/shci.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-stm32-wpan/src/shci.rs')
-rw-r--r--embassy-stm32-wpan/src/shci.rs134
1 files changed, 70 insertions, 64 deletions
diff --git a/embassy-stm32-wpan/src/shci.rs b/embassy-stm32-wpan/src/shci.rs
index 30d689716..1946c55fd 100644
--- a/embassy-stm32-wpan/src/shci.rs
+++ b/embassy-stm32-wpan/src/shci.rs
@@ -274,69 +274,64 @@ pub struct ShciBleInitCmdParam {
274 pub options: u8, 274 pub options: u8,
275 /// Reserved for future use - shall be set to 0 275 /// Reserved for future use - shall be set to 0
276 pub hw_version: u8, 276 pub hw_version: u8,
277 // /** 277 ///
278 // * Maximum number of connection-oriented channels in initiator mode. 278 /// Maximum number of connection-oriented channels in initiator mode.
279 // * Range: 0 .. 64 279 /// Range: 0 .. 64
280 // */ 280 pub max_coc_initiator_nbr: u8,
281 // pub max_coc_initiator_nbr: u8, 281
282 // 282 ///
283 // /** 283 /// Minimum transmit power in dBm supported by the Controller.
284 // * Minimum transmit power in dBm supported by the Controller. 284 /// Range: -127 .. 20
285 // * Range: -127 .. 20 285 pub min_tx_power: i8,
286 // */ 286
287 // pub min_tx_power: i8, 287 ///
288 // 288 /// Maximum transmit power in dBm supported by the Controller.
289 // /** 289 /// Range: -127 .. 20
290 // * Maximum transmit power in dBm supported by the Controller. 290 pub max_tx_power: i8,
291 // * Range: -127 .. 20 291
292 // */ 292 ///
293 // pub max_tx_power: i8, 293 /// RX model configuration
294 // 294 /// - bit 0: 1: agc_rssi model improved vs RF blockers 0: Legacy agc_rssi model
295 // /** 295 /// - other bits: reserved ( shall be set to 0)
296 // * RX model configuration 296 pub rx_model_config: u8,
297 // * - bit 0: 1: agc_rssi model improved vs RF blockers 0: Legacy agc_rssi model 297
298 // * - other bits: reserved ( shall be set to 0) 298 /// Maximum number of advertising sets.
299 // */ 299 /// Range: 1 .. 8 with limitation:
300 // pub rx_model_config: u8, 300 /// This parameter is linked to max_adv_data_len such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based
301 // 301 /// on Max Extended advertising configuration supported.
302 // /* Maximum number of advertising sets. 302 /// This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set
303 // * Range: 1 .. 8 with limitation: 303 pub max_adv_set_nbr: u8,
304 // * This parameter is linked to max_adv_data_len such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based 304
305 // * on Max Extended advertising configuration supported. 305 /// Maximum advertising data length (in bytes)
306 // * This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set 306 /// Range: 31 .. 1650 with limitation:
307 // */ 307 /// This parameter is linked to max_adv_set_nbr such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based
308 // pub max_adv_set_nbr: u8, 308 /// on Max Extended advertising configuration supported.
309 // 309 /// This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set
310 // /* Maximum advertising data length (in bytes) 310 pub max_adv_data_len: u16,
311 // * Range: 31 .. 1650 with limitation: 311
312 // * This parameter is linked to max_adv_set_nbr such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based 312 /// RF TX Path Compensation Value (16-bit signed integer). Units: 0.1 dB.
313 // * on Max Extended advertising configuration supported. 313 /// Range: -1280 .. 1280
314 // * This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set 314 pub tx_path_compens: i16,
315 // */ 315
316 // pub max_adv_data_len: u16, 316 //// RF RX Path Compensation Value (16-bit signed integer). Units: 0.1 dB.
317 // 317 /// Range: -1280 .. 1280
318 // /* RF TX Path Compensation Value (16-bit signed integer). Units: 0.1 dB. 318 pub rx_path_compens: i16,
319 // * Range: -1280 .. 1280 319
320 // */ 320 /// BLE core specification version (8-bit unsigned integer).
321 // pub tx_path_compens: i16, 321 /// values as: 11(5.2), 12(5.3)
322 // 322 pub ble_core_version: u8,
323 // /* RF RX Path Compensation Value (16-bit signed integer). Units: 0.1 dB. 323
324 // * Range: -1280 .. 1280 324 /// Options flags extension
325 // */ 325 /// - bit 0: 1: appearance Writable 0: appearance Read-Only
326 // pub rx_path_compens: i16, 326 /// - bit 1: 1: Enhanced ATT supported 0: Enhanced ATT not supported
327 // 327 /// - other bits: reserved ( shall be set to 0)
328 // /* BLE core specification version (8-bit unsigned integer). 328 pub options_extension: u8,
329 // * values as: 11(5.2), 12(5.3) 329
330 // */ 330 /// MaxAddEattBearers
331 // pub ble_core_version: u8, 331 /// Maximum number of bearers that can be created for Enhanced ATT
332 // 332 /// in addition to the number of links
333 // /** 333 /// - Range: 0 .. 4
334 // * Options flags extension 334 pub max_add_eatt_bearers: u8,
335 // * - bit 0: 1: appearance Writable 0: appearance Read-Only
336 // * - bit 1: 1: Enhanced ATT supported 0: Enhanced ATT not supported
337 // * - other bits: reserved ( shall be set to 0)
338 // */
339 // pub options_extension: u8,
340} 335}
341 336
342impl ShciBleInitCmdParam { 337impl ShciBleInitCmdParam {
@@ -351,7 +346,7 @@ impl Default for ShciBleInitCmdParam {
351 p_ble_buffer_address: 0, 346 p_ble_buffer_address: 0,
352 ble_buffer_size: 0, 347 ble_buffer_size: 0,
353 num_attr_record: 68, 348 num_attr_record: 68,
354 num_attr_serv: 8, 349 num_attr_serv: 4,
355 attr_value_arr_size: 1344, 350 attr_value_arr_size: 1344,
356 num_of_links: 2, 351 num_of_links: 2,
357 extended_packet_length_enable: 1, 352 extended_packet_length_enable: 1,
@@ -366,6 +361,17 @@ impl Default for ShciBleInitCmdParam {
366 viterbi_enable: 1, 361 viterbi_enable: 1,
367 options: 0, 362 options: 0,
368 hw_version: 0, 363 hw_version: 0,
364 max_coc_initiator_nbr: 32,
365 min_tx_power: -40,
366 max_tx_power: 6,
367 rx_model_config: 0,
368 max_adv_set_nbr: 2,
369 max_adv_data_len: 1650,
370 tx_path_compens: 0,
371 rx_path_compens: 0,
372 ble_core_version: 11,
373 options_extension: 0,
374 max_add_eatt_bearers: 4,
369 } 375 }
370 } 376 }
371} 377}