tudelft_quadrupel/lib.rs
1#![no_std]
2#![feature(strict_provenance)]
3#![deny(missing_docs)]
4// #![deny(warnings)]
5#![deny(unused_import_braces)]
6#![deny(unused_results)]
7#![deny(trivial_casts)]
8#![deny(trivial_numeric_casts)]
9#![deny(unused_qualifications)]
10// don't want this to show up in pedantic for now
11#![allow(clippy::cast_possible_truncation)]
12#![allow(clippy::module_name_repetitions)]
13#![allow(clippy::struct_excessive_bools)]
14#![allow(clippy::unused_self)]
15
16//! # tudelft quadrupel support library
17//!
18//! This library re-exports some crates (see below). That just makes it
19//! easy for your drone code to use those libraries. For example:
20//! ```
21//! use tudelft_quadrupel::cortex_m;
22//! ```
23
24extern crate alloc;
25/// reexport of the `nrf51_hal` crate
26pub extern crate nrf51_hal;
27
28/// reexport of the `cortex_m_rt` entry macro
29pub use cortex_m_rt::entry;
30/// reexport of the `nb::block` macro.
31pub use nb::block;
32
33/// reexport of the `cortex_m` crate
34pub use cortex_m;
35/// reexport of the `cortex_m_rt` crate
36pub use cortex_m_rt;
37/// reexport of the `fixed` crate
38pub use fixed;
39/// reexport of the `nrf51_pac` crate
40pub use nrf51_pac;
41/// reexport of the `ringbuffer` crate
42pub use ringbuffer;
43
44/// Utilities to read out the barometer
45pub mod barometer;
46
47/// Utilities to read out the battery voltage. You may see
48/// this referred to as the "ADC" (analog to digital converter).
49pub mod battery;
50
51/// Utilities to read from and write to the flash chip
52pub mod flash;
53
54/// Initialize all the drivers
55pub mod initialize;
56
57/// Utilities to control the leds on the board.
58///
59/// Note that in the template,
60/// some leds have already been assigned meaning:
61///
62/// * red blinking: you probably have a panic
63/// * blue blinking: your code is probably running fine
64/// * yellow on + red blinking: this happens during initialization. If initialization fails,
65/// this is never turned off. If a panic happens and yellow is on, initialization likely failed
66/// * green on + red blinking: an allocation happened causing a panic.
67///
68/// You are free to change the meaning of these leds (though some restrictions apply, see the assignment manual).
69pub mod led;
70
71/// Utilities to drive the drone motors (PWM control)
72pub mod motor;
73
74/// Utilities to read out the motion processing unit (mpu)
75pub mod mpu;
76
77/// A [`Mutex`](mutex::Mutex) abstraction like you learned in Software Systems. Turns off interrupts
78pub mod mutex;
79
80/// A [`OnceCell`](once_cell::OnceCell) abstraction like you learned in Software Systems
81pub mod once_cell;
82
83/// Utilities to read out the current time
84pub mod time;
85
86/// Utilities to read from and write to UART
87pub mod uart;
88
89/// Internal utilities to read out TWI (I2C) devices
90mod twi;