#![no_std]
#[cfg(not(all(
target_arch = "arm",
target_feature = "thumb2",
target_feature = "v7",
target_feature = "dsp",
target_os = "none",
)))]
core::compile_error!("This crate requires `--target thumbv7em-none-eabihf`");
pub mod furi;
mod inlines;
#[allow(non_upper_case_globals)]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
mod bindings;
#[macro_export]
macro_rules! c_string {
($str:expr $(,)?) => {{
concat!($str, "\0").as_ptr() as *const core::ffi::c_char
}};
}
#[macro_export]
macro_rules! crash {
($msg:expr $(,)?) => {
unsafe {
let msg = $crate::c_string!($msg);
core::arch::asm!("", in("r12") msg, options(nomem, nostack));
$crate::__furi_crash();
core::hint::unreachable_unchecked();
}
};
}
pub use bindings::*;
pub use inlines::furi_hal_gpio::*;