aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32-wpan/src
diff options
context:
space:
mode:
authorLofty Inclination <[email protected]>2025-01-01 01:14:34 +0000
committerLofty Inclination <[email protected]>2025-01-01 01:35:41 +0000
commit7d387f52a2b9a3bac063665f1b0706af02c7da6c (patch)
tree507914885a3b46e6bdaa90c2c33dc05d8702443e /embassy-stm32-wpan/src
parentc967c368769ea2308acbe7e96977e4a1833fad22 (diff)
fixup! Add docs for the BLE bindings
Diffstat (limited to 'embassy-stm32-wpan/src')
-rw-r--r--embassy-stm32-wpan/src/lib.rs7
-rw-r--r--embassy-stm32-wpan/src/sub/ble.rs6
-rw-r--r--embassy-stm32-wpan/src/sub/sys.rs3
-rw-r--r--embassy-stm32-wpan/src/tables.rs2
4 files changed, 10 insertions, 8 deletions
diff --git a/embassy-stm32-wpan/src/lib.rs b/embassy-stm32-wpan/src/lib.rs
index 1a01be200..00eaac867 100644
--- a/embassy-stm32-wpan/src/lib.rs
+++ b/embassy-stm32-wpan/src/lib.rs
@@ -73,9 +73,10 @@ impl<'d> TlMbox<'d> {
73 /// Figure 65. 73 /// Figure 65.
74 /// 74 ///
75 /// If the `ble` feature is enabled, at this point, the user should call 75 /// If the `ble` feature is enabled, at this point, the user should call
76 /// [sys_subsystem.shci_c2_ble_init], before any commands are written to the [ble_subsystem] 76 /// [sys_subsystem.shci_c2_ble_init], before any commands are written to the
77 /// ([Ble::new()] completes the process that would otherwise be handled by `TL_BLE_Init`; see 77 /// [TlMbox.ble_subsystem] ([sub::ble::Ble::new()] completes the process that would otherwise
78 /// Figure 66). This completes the procedure laid out in Figure 66. 78 /// be handled by `TL_BLE_Init`; see Figure 66). This completes the procedure laid out in
79 /// Figure 66.
79 // TODO: document what the user should do after calling init to use the mac_802_15_4 subsystem 80 // TODO: document what the user should do after calling init to use the mac_802_15_4 subsystem
80 pub fn init( 81 pub fn init(
81 ipcc: impl Peripheral<P = IPCC> + 'd, 82 ipcc: impl Peripheral<P = IPCC> + 'd,
diff --git a/embassy-stm32-wpan/src/sub/ble.rs b/embassy-stm32-wpan/src/sub/ble.rs
index a47c6a699..37a2f3b0c 100644
--- a/embassy-stm32-wpan/src/sub/ble.rs
+++ b/embassy-stm32-wpan/src/sub/ble.rs
@@ -14,9 +14,9 @@ use crate::{channels, evt};
14/// A guard that, once constructed, may be used to send BLE commands to CPU2. 14/// A guard that, once constructed, may be used to send BLE commands to CPU2.
15/// 15///
16/// It is the responsibility of the caller to ensure that they have awaited an event via 16/// It is the responsibility of the caller to ensure that they have awaited an event via
17/// [crate::sub::Sys::read] before sending any of these commands, and to call 17/// [crate::sub::sys::Sys::read] before sending any of these commands, and to call
18/// [crate::sub::Sys::shci_c2_ble_init] and await the HCI_COMMAND_COMPLETE_EVENT before sending any 18/// [crate::sub::sys::Sys::shci_c2_ble_init] and await the HCI_COMMAND_COMPLETE_EVENT before
19/// other commands. 19/// sending any other commands.
20pub struct Ble { 20pub struct Ble {
21 _private: (), 21 _private: (),
22} 22}
diff --git a/embassy-stm32-wpan/src/sub/sys.rs b/embassy-stm32-wpan/src/sub/sys.rs
index fcc2c651e..cf6df58bf 100644
--- a/embassy-stm32-wpan/src/sub/sys.rs
+++ b/embassy-stm32-wpan/src/sub/sys.rs
@@ -91,7 +91,8 @@ impl Sys {
91 /// 91 ///
92 /// This must be called before any BLE commands are sent via the BLE channel (according to 92 /// This must be called before any BLE commands are sent via the BLE channel (according to
93 /// AN5289, Figures 65 and 66). It should only be called after CPU2 sends a system event, via 93 /// AN5289, Figures 65 and 66). It should only be called after CPU2 sends a system event, via
94 /// `HW_IPCC_SYS_EvtNot`, aka `IoBusCallBackUserEvt` (as detailed in Figure 65), aka [read]. 94 /// `HW_IPCC_SYS_EvtNot`, aka `IoBusCallBackUserEvt` (as detailed in Figure 65), aka
95 /// [crate::sub::ble::hci::host::uart::UartHci::read].
95 #[cfg(feature = "ble")] 96 #[cfg(feature = "ble")]
96 pub async fn shci_c2_ble_init(&self, param: ShciBleInitCmdParam) -> Result<SchiCommandStatus, ()> { 97 pub async fn shci_c2_ble_init(&self, param: ShciBleInitCmdParam) -> Result<SchiCommandStatus, ()> {
97 self.write_and_get_response(ShciOpcode::BleInit, param.payload()).await 98 self.write_and_get_response(ShciOpcode::BleInit, param.payload()).await
diff --git a/embassy-stm32-wpan/src/tables.rs b/embassy-stm32-wpan/src/tables.rs
index 152930ac6..d374814a3 100644
--- a/embassy-stm32-wpan/src/tables.rs
+++ b/embassy-stm32-wpan/src/tables.rs
@@ -98,7 +98,7 @@ pub struct BleTable {
98 /// A pointer to the buffer used for storing Command statuses. 98 /// A pointer to the buffer used for storing Command statuses.
99 pub pcs_buffer: *const u8, 99 pub pcs_buffer: *const u8,
100 /// A pointer to the event queue, over which IPCC BLE events are sent. This may be accessed via 100 /// A pointer to the event queue, over which IPCC BLE events are sent. This may be accessed via
101 /// [crate::sub::ble::tl_read]. 101 /// [crate::sub::ble::Ble::tl_read].
102 pub pevt_queue: *const u8, 102 pub pevt_queue: *const u8,
103 /// A pointer to the buffer that is used for sending HCI (Host-Controller Interface) ACL 103 /// A pointer to the buffer that is used for sending HCI (Host-Controller Interface) ACL
104 /// (Asynchronous Connection-oriented Logical transport) commands (unused). 104 /// (Asynchronous Connection-oriented Logical transport) commands (unused).