2023-08-08 08:36:49 +02:00
|
|
|
//! This is the important one to use this library effective in your project
|
2023-08-06 18:34:36 +02:00
|
|
|
pub use crate::library::arduboy::Arduboy;
|
|
|
|
pub use core::ffi::{
|
|
|
|
c_char, c_double, c_float, c_int, c_long, c_longlong, c_size_t, c_uchar, c_uint, c_ulong,
|
|
|
|
c_ulonglong,
|
|
|
|
};
|
2023-08-08 08:36:49 +02:00
|
|
|
#[doc(hidden)]
|
2023-08-06 18:34:36 +02:00
|
|
|
pub use core::ptr::addr_of;
|
|
|
|
///The main [Arduboy] struct ready to use in your project
|
|
|
|
#[allow(non_upper_case_globals)]
|
|
|
|
pub const arduboy: Arduboy = Arduboy {};
|
|
|
|
///The main [Sound] struct ready to use in your project
|
|
|
|
#[allow(non_upper_case_globals)]
|
|
|
|
pub const sound: Sound = Sound {};
|
|
|
|
pub use crate::hardware::buttons::*;
|
2023-08-08 08:36:49 +02:00
|
|
|
pub use crate::library::arduboy::{Color, Point, Rect, FONT_SIZE, HEIGHT, WIDTH};
|
2023-08-06 18:34:36 +02:00
|
|
|
pub use crate::library::arduboy_tone::*;
|
|
|
|
pub use crate::library::arduino::*;
|
|
|
|
pub use crate::library::c::*;
|
2023-08-14 16:05:11 +02:00
|
|
|
pub use crate::library::eeprom::{EEPROM, EEPROMBYTE};
|
2023-08-08 08:36:49 +02:00
|
|
|
pub use crate::library::progmem::Pstring;
|
2023-08-06 18:34:36 +02:00
|
|
|
pub use crate::library::sprites;
|
|
|
|
pub use crate::print::*;
|
2023-08-07 20:40:06 +02:00
|
|
|
pub use crate::{f, get_sprite_addr, get_string_addr, get_tones_addr, progmem};
|
2023-08-06 18:34:36 +02:00
|
|
|
use core::cmp;
|
|
|
|
|
|
|
|
pub fn constrain<T: Ord>(x: T, a: T, b: T) -> T {
|
|
|
|
cmp::max(cmp::min(x, b), a)
|
|
|
|
}
|