aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-nrf/src')
-rw-r--r--embassy-nrf/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs
index 9093ad919..e3458e2de 100644
--- a/embassy-nrf/src/lib.rs
+++ b/embassy-nrf/src/lib.rs
@@ -354,7 +354,11 @@ unsafe fn uicr_write_masked(address: *mut u32, value: u32, mask: u32) -> WriteRe
354 WriteResult::Written 354 WriteResult::Written
355} 355}
356 356
357/// Initialize peripherals with the provided configuration. This should only be called once at startup. 357/// Initialize the `embassy-nrf` HAL with the provided configuration.
358///
359/// This returns the peripheral singletons that can be used for creating drivers.
360///
361/// This should only be called once at startup, otherwise it panics.
358pub fn init(config: config::Config) -> Peripherals { 362pub fn init(config: config::Config) -> Peripherals {
359 // Do this first, so that it panics if user is calling `init` a second time 363 // Do this first, so that it panics if user is calling `init` a second time
360 // before doing anything important. 364 // before doing anything important.