safe_vex/
lib.rs

1//! A modular, safe and data-orientated rust wrapper over the Purdue PROS library for vex
2
3#![no_std]
4#![feature(alloc_error_handler)]
5#![feature(negative_impls)]
6#![warn(missing_docs)]
7
8pub mod bindings;
9
10extern crate alloc;
11
12pub mod allocator;
13pub mod entry;
14pub mod rtos;
15pub mod io;
16pub mod error;
17pub mod port;
18pub mod motor;
19pub mod adi;
20pub mod controller;
21pub mod imu;
22pub mod rotation;
23pub mod fs;
24
25/// Handles the program's panics
26#[panic_handler]
27fn panic_handler(info: &core::panic::PanicInfo) -> ! {
28    crate::io::eprintln!(
29        "panic occurred!: {:#?}",
30        info,
31    );
32
33    unsafe {
34        libc::exit(1)
35    }
36}