hardware 0.0.9

A no_std bare-metal hardware abstraction layer — all port I/O, memory and swap allocations are guarded at runtime. Do not consider this dependency stable before x.1.x
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use core::sync::atomic::{AtomicUsize, Ordering};

pub fn init_all() -> bool {
    let res = crate::tpu::lifecycle::init(0x1000);
    debug_assert!(res.is_ok());

    if let Some(mut drv) = generic::GenericTpu::probe() {
        drv.init();
        static TPU_DRV_SIG: AtomicUsize = AtomicUsize::new(0);
        TPU_DRV_SIG.store(1, Ordering::Release);
    }

    true
}

pub mod generic;