safe_vex/
lib.rs

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
//! A modular, safe and data-orientated rust wrapper over the Purdue PROS library for vex

#![no_std]
#![feature(alloc_error_handler)]
#![feature(negative_impls)]
#![warn(missing_docs)]

pub mod bindings;

extern crate alloc;

pub mod allocator;
pub mod entry;
pub mod rtos;
pub mod io;
pub mod error;
pub mod port;
pub mod motor;
pub mod adi;
pub mod controller;

/// Handles the program's panics
#[panic_handler]
fn panic_handler(info: &core::panic::PanicInfo) -> ! {
    crate::io::eprintln!(
        "panic occurred!: {:#?}",
        info,
    );

    unsafe {
        libc::exit(1)
    }
}