aboutsummaryrefslogtreecommitdiff
path: root/src/asm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/asm.rs')
-rw-r--r--src/asm.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/asm.rs b/src/asm.rs
index ebd61b3..372924b 100644
--- a/src/asm.rs
+++ b/src/asm.rs
@@ -26,13 +26,16 @@ pub fn bkpt() {
/// Blocks the program for *at least* `n` instruction cycles
///
-/// This is implemented in assembly so its execution time is the same regardless of the optimization
-/// level.
+/// This is implemented in assembly so its execution time is independent of the optimization
+/// level, however it is dependent on the specific architecture and core configuration.
///
-/// NOTE that the delay can take much longer if interrupts are serviced during its execution.
+/// NOTE that the delay can take much longer if interrupts are serviced during its execution
+/// and the execution time may wary with other factors. This delay is mainly useful for simple
+/// timer-less initialisation of peripherals iff accurate timing is not essential. In any other
+/// case please use more accurate methods to cause a delay.
#[inline]
pub fn delay(_n: u32) {
- // NOTE(divide by 4) is easier to compute than `/ 3` is it's just a shift (`>> 2`).
+ // NOTE(divide by 4) is easier to compute than `/ 3` because it's just a shift (`>> 2`).
match () {
#[cfg(all(cortex_m, feature = "inline-asm"))]
() => unsafe {