Skip to content

Commit

Permalink
Add safety comments to unsafe rom function
Browse files Browse the repository at this point in the history
  • Loading branch information
jannic committed Nov 16, 2023
1 parent c69f4ce commit 6cb7a11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rp2040-hal/src/rom_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ macro_rules! declare_rom_function {
}

$(#[$outer])*
/// # Safety
///
/// This is a low-level C function. It may be difficult to call safely from
/// Rust. If in doubt, check the RP2040 datasheet for details and do your own
/// safety evaluation.
pub unsafe extern "C" fn $name( $($argname: $ty),* ) -> $ret {
$name::ptr()($($argname),*)
}
Expand Down

0 comments on commit 6cb7a11

Please sign in to comment.