1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#![no_std]
pub mod furi;
#[allow(non_upper_case_globals)]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
mod bindings;
#[macro_export]
macro_rules! c_string {
($str:literal) => {{
concat!($str, "\0").as_ptr() as *const core::ffi::c_char
}};
}
#[macro_export]
macro_rules! crash {
($msg:literal) => {
unsafe {
let msg = $crate::c_string!($msg);
core::arch::asm!("", in("r12") msg, options(nomem, nostack));
$crate::__furi_crash();
core::arch::asm!("", options(noreturn));
}
};
}
pub use bindings::*;