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
//! Low-level bindings for the Flipper Zero.
#![no_std]
pub mod canvas;
pub mod furi;
pub mod gui;
pub mod view_port;
/// Declare an opaque type.
#[macro_export]
macro_rules! opaque {
($name:ident) => {
#[repr(C)]
pub struct $name {
_data: [u8; 0],
_marker:
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
};
}
/// Create a static C string.
/// Will automatically add a nul terminator.
#[macro_export]
macro_rules! c_string {
($str:expr) => {
(concat!($str, "\0").as_ptr() as *const core::ffi::c_char)
}
}