summaryrefslogtreecommitdiff
path: root/nrf-softdevice/src/softdevice.rs
diff options
context:
space:
mode:
Diffstat (limited to 'nrf-softdevice/src/softdevice.rs')
-rw-r--r--nrf-softdevice/src/softdevice.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/nrf-softdevice/src/softdevice.rs b/nrf-softdevice/src/softdevice.rs
index af8a0b4..d697cbe 100644
--- a/nrf-softdevice/src/softdevice.rs
+++ b/nrf-softdevice/src/softdevice.rs
@@ -323,10 +323,11 @@ impl Softdevice {
self.run_with_callback(|_| {}).await
}
- /// Runs the softdevice event handling loop.
+ /// Runs the softdevice event handling loop with a callback for [`SocEvent`]s.
///
- /// It must be called in its own async task after enabling the softdevice
- /// and before doing any operation. Failure to doing so will cause async operations to never finish.
+ /// It must be called under the same conditions as [`Softdevice::run()`]. This
+ /// version allows the application to provide a callback to receive SoC events
+ /// from the softdevice (other than flash events which are handled by [`Flash`](crate::flash::Flash)).
pub async fn run_with_callback<F: FnMut(SocEvent)>(&self, f: F) -> ! {
crate::events::run(f).await
}