cmsis_cffi/
lib.rs

1extern crate cmsis_pack;
2#[macro_use]
3extern crate ctor;
4
5#[ctor]
6fn cmsis_cffi_init() {
7    simplelog::TermLogger::init(
8        simplelog::LevelFilter::Error,
9        simplelog::Config::default(),
10        simplelog::TerminalMode::Mixed,
11        simplelog::ColorChoice::Auto,
12    )
13    .unwrap();
14}
15
16macro_rules! with_from_raw {
17    (let $boxed:ident = $ptr:ident, $block:block) => {{
18        #[allow(unused_unsafe)]
19        let $boxed = unsafe { Box::from_raw($ptr) };
20        let ret = $block;
21        Box::into_raw($boxed);
22        ret
23    }};
24    (let mut $boxed:ident = $ptr:ident, $block:block) => {{
25        #[allow(unused_unsafe)]
26        let mut $boxed = unsafe { Box::from_raw($ptr) };
27        let ret = $block;
28        Box::into_raw($boxed);
29        ret
30    }};
31}
32#[macro_use]
33pub mod utils;
34
35pub mod config;
36pub mod pack;
37pub mod pack_index;
38pub mod pdsc;