added docs and change the lib structure

This commit is contained in:
ZennDev1337 2023-09-12 22:01:54 +02:00
parent d033160657
commit 063ed9301f
28 changed files with 155 additions and 63 deletions

View file

@ -34,5 +34,6 @@ mod print;
pub extern crate heapless;
pub use crate::library::arduboy2::{self, Arduboy2, Color, FONT_SIZE, HEIGHT, WIDTH};
pub use crate::library::arduboy_tone::{self, ArduboyTones};
pub use crate::library::ardvoice::{self, ArdVoice};
pub use crate::library::eeprom::{EEPROM, EEPROMBYTE};
pub use crate::library::{arduino, c, sprites};

View file

@ -1,4 +1,5 @@
//!This is the Module to interact in a save way with the ArduboyTones C++ library.
//! You will need to uncomment the ArduboyTones_Library in the import_config.h file.
pub use crate::library::arduboy_tone_pitch;
use core::ffi::{c_uchar, c_uint, c_ulong};
extern "C" {
@ -33,6 +34,7 @@ extern "C" {
}
///This is the struct to interact in a save way with the ArduboyTones C++ library.
/// You will need to uncomment the ArduboyTones_Library in the import_config.h file.
pub struct ArduboyTones {}
impl ArduboyTones {
///Get a new instance of [ArduboyTones]

View file

@ -1,3 +1,6 @@
//! This is the Module to interact in a save way with the ArdVoice C++ library.
//! You will need to uncomment the ArdVoice_Library in the import_config.h file.
use core::ffi::{c_float, c_uchar, c_ulong};
extern "C" {
@ -15,7 +18,8 @@ extern "C" {
#[link_name = "ardvoice_is_voice_playing"]
fn ardvoice_is_voice_playing_raw() -> bool;
}
///This is the struct to interact in a save way with the ArdVoice C++ library.
///You will need to uncomment the ArdVoice_Library in the import_config.h file.
pub struct ArdVoice {}
impl ArdVoice {
pub const fn new() -> Self {

View file

@ -93,7 +93,7 @@ macro_rules! get_ardvoice_tone_addr {
};
}
pub(super) use get_ardvoice_tone_addr;
///Create a `const` raw pointer to a sprite as u16, without creating an intermediate reference.
///Create a `const` raw pointer to a tone sequenze as u16, without creating an intermediate reference.
#[macro_export]
macro_rules! get_tones_addr {
( $s:expr ) => {