reordering the crate and addind more documentation and added the docs to the same repo

This commit is contained in:
ZennDev1337 2023-08-15 12:41:08 +02:00
parent 6fb155dff3
commit 34c781e882
1035 changed files with 11041 additions and 18 deletions

View file

@ -1,2 +1,3 @@
//! This is the Module to interact in a save way with the Arduboy hardware.
pub mod buttons;
pub mod led;

View file

@ -3,12 +3,11 @@
#![feature(c_size_t)]
extern crate panic_halt;
mod hardware;
pub mod hardware;
mod library;
pub mod prelude;
mod print;
pub use crate::library::arduboy2::{self, Arduboy2, Color, FONT_SIZE, HEIGHT, WIDTH};
pub use crate::library::arduboy_tone::ArduboyTones;
pub use crate::library::arduboy_tone::{self, ArduboyTones};
pub use crate::library::eeprom::{EEPROM, EEPROMBYTE};
pub use crate::library::{arduboy_tone_pitch, c, sprites};
pub use hardware::*;
pub use crate::library::{c, sprites};

View file

@ -2,7 +2,7 @@
//!
//! All of the functions are safe wrapped inside the struct.
#![allow(dead_code)]
use crate::prelude::ButtonSet;
use crate::hardware::buttons::ButtonSet;
use crate::print::Printable;
use core::ffi::{c_char, c_int, c_long, c_size_t, c_uchar, c_uint, c_ulong};
use core::mem;
@ -66,7 +66,7 @@ impl Arduboy2 {
/// ```
/// const arduboy: Arduboy2 = Arduboy2::new();
/// ```
pub fn new() -> Self {
pub const fn new() -> Self {
Arduboy2 {}
}
/// Initialize the hardware, display the boot logo, provide boot utilities, etc.

View file

@ -1,6 +1,6 @@
//pub use crate::library::arduboy_tone_pitch::*;
//!This is the Module to interact in a save way with the ArduboyTones C++ library.
pub use crate::library::arduboy_tone_pitch;
use core::ffi::{c_uchar, c_uint, c_ulong};
extern "C" {
#[link_name = "sound_tone"]
fn sound_tone(frequency: c_uint, duration: c_ulong);
@ -40,7 +40,7 @@ impl ArduboyTones {
/// ```
/// const sound: ArduboyTones = ArduboyTones::new();
/// ```
pub fn new() -> ArduboyTones {
pub const fn new() -> ArduboyTones {
ArduboyTones {}
}
///Play a single tone.

View file

@ -1,11 +1,14 @@
//! This is the important one to use this library effective in your project
pub use crate::hardware::buttons::*;
pub use crate::hardware::led::{BLUE_LED, GREEN_LED, RED_LED, RGB_OFF, RGB_ON};
pub use crate::library::arduboy2::{Arduboy2, Color, Point, Rect, FONT_SIZE, HEIGHT, WIDTH};
pub use crate::library::arduboy_tone::*;
#[doc(inline)]
pub use crate::hardware::buttons::{self, *};
#[doc(inline)]
pub use crate::hardware::led::{self, *};
pub use crate::library::arduboy2::{self, *};
pub use crate::library::arduboy_tone::{self, ArduboyTones};
pub use crate::library::arduino::*;
pub use crate::library::c::*;
pub use crate::library::eeprom::{EEPROM, EEPROMBYTE};
#[doc(hidden)]
pub use crate::library::progmem::Pstring;
pub use crate::library::sprites;
pub use crate::print::*;