aboutsummaryrefslogtreecommitdiff
path: root/src/_arch/arm/asm.rs
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-08-19 21:22:18 -0700
committerChristian Cunningham <cc@localhost>2022-08-19 21:22:18 -0700
commit26ab71043d97c1b06bdd252378b64171cb95b1a9 (patch)
tree9bea25574fc20e77a4faae6811add97e0a248175 /src/_arch/arm/asm.rs
parent0d061dac9e31831e4fe426a0df777463043868d7 (diff)
Updated docs
Diffstat (limited to 'src/_arch/arm/asm.rs')
-rw-r--r--src/_arch/arm/asm.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/_arch/arm/asm.rs b/src/_arch/arm/asm.rs
index c1af5b4..5d53aa0 100644
--- a/src/_arch/arm/asm.rs
+++ b/src/_arch/arm/asm.rs
@@ -1,6 +1,10 @@
-//! Wrapping ARMv7-A Instructions
+//! # Wrapping ARMv7-A Instructions
+//!
+//! This provides bindings for assembly instructions
+//! to be used in other rust functions without `unsafe`
+//! markers everywhere.
-/// WFE
+/// # Wait for event
#[inline(always)]
pub fn wfe() {
unsafe {
@@ -8,7 +12,7 @@ pub fn wfe() {
}
}
-/// NOP
+/// # No Operation
#[inline(always)]
pub fn nop() {
unsafe {
@@ -16,7 +20,7 @@ pub fn nop() {
}
}
-/// Store u32 to address
+/// # Store u32 to memory address
#[inline]
pub fn store32(addr: u32, value: u32) {
unsafe {
@@ -24,7 +28,7 @@ pub fn store32(addr: u32, value: u32) {
}
}
-/// Read u32 value from address
+/// # Read u32 from memory address
#[inline]
pub fn load32(addr: u32) -> u32 {
unsafe {
@@ -32,7 +36,7 @@ pub fn load32(addr: u32) -> u32 {
}
}
-/// Wait for n cycles
+/// # Spin CPU for `n` cycles
#[inline]
pub fn spin_for_n_cycles(n: u32) {
unsafe {