update of the docs and implementing a proper scorebord in snake demo

This commit is contained in:
Zenn 2023-08-14 19:32:34 +02:00
parent c21aa97915
commit 0721c6cc45
5 changed files with 46 additions and 22 deletions

View file

@ -8,7 +8,7 @@ pub mod prelude;
mod print;
pub use crate::library::arduboy::{Arduboy, Color, FONT_SIZE, HEIGHT, WIDTH};
pub use crate::library::arduboy_tone::Sound;
pub use crate::library::eeprom::EEPROM;
pub use crate::library::eeprom::{EEPROM, EEPROMBYTE};
pub use crate::library::{arduboy_tone_pitch, c, sprites};
pub use hardware::buttons;

View file

@ -328,9 +328,15 @@ impl Arduboy {
pub fn audio_save_on_off(&self) {
unsafe { arduboy_audio_save_on_off() }
}
pub fn audio_save_toggle(&self) {
pub fn audio_toggle(&self) {
unsafe { arduboy_audio_toggle() }
}
pub fn audio_on_and_save(&self) {
unsafe {
arduboy_audio_on();
arduboy_audio_save_on_off()
}
}
///Get the current sound state.
///
///### Returns