diff --git a/arduboy-rust/src/library/arduboy_tone.rs b/arduboy-rust/src/library/arduboy_tone.rs index e7e70ad..cc8574f 100644 --- a/arduboy-rust/src/library/arduboy_tone.rs +++ b/arduboy-rust/src/library/arduboy_tone.rs @@ -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}; @@ -34,6 +35,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 { diff --git a/arduboy-rust/src/library/ardvoice.rs b/arduboy-rust/src/library/ardvoice.rs index 43750d2..53d2d61 100644 --- a/arduboy-rust/src/library/ardvoice.rs +++ b/arduboy-rust/src/library/ardvoice.rs @@ -1,4 +1,5 @@ //! 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}; @@ -19,6 +20,7 @@ extern "C" { 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 { diff --git a/docs/doc/arduboy_rust/arduboy_tone/index.html b/docs/doc/arduboy_rust/arduboy_tone/index.html index cca1ae9..45c29da 100644 --- a/docs/doc/arduboy_rust/arduboy_tone/index.html +++ b/docs/doc/arduboy_rust/arduboy_tone/index.html @@ -1,4 +1,3 @@ -arduboy_rust::arduboy_tone - Rust
Expand description

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.

-

Modules

  • A list of all tones available and used by the Sounds library Arduboy2Tones

Structs

  • 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.
\ No newline at end of file +arduboy_rust::arduboy_tone - Rust
Expand description

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.

+

Modules

  • A list of all tones available and used by the Sounds library Arduboy2Tones

Structs

  • This is the struct to interact in a save way with the ArduboyTones C++ library.
\ No newline at end of file diff --git a/docs/doc/arduboy_rust/arduboy_tone/struct.ArduboyTones.html b/docs/doc/arduboy_rust/arduboy_tone/struct.ArduboyTones.html index a9c9f74..8a707f6 100644 --- a/docs/doc/arduboy_rust/arduboy_tone/struct.ArduboyTones.html +++ b/docs/doc/arduboy_rust/arduboy_tone/struct.ArduboyTones.html @@ -1,9 +1,9 @@ -ArduboyTones in arduboy_rust::arduboy_tone - Rust
pub struct ArduboyTones {}
Expand description

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.

-

Implementations§

source§

impl ArduboyTones

source

pub const fn new() -> ArduboyTones

Get a new instance of ArduboyTones

+ArduboyTones in arduboy_rust::arduboy_tone - Rust
pub struct ArduboyTones {}
Expand description

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.

+

Implementations§

source§

impl ArduboyTones

source

pub const fn new() -> ArduboyTones

Get a new instance of ArduboyTones

Example
const sound: ArduboyTones = ArduboyTones::new();
-
source

pub fn tone(&self, frequency: u16, duration: u32)

Play a single tone.

+
source

pub fn tone(&self, frequency: u16, duration: u32)

Play a single tone.

  • freq The frequency of the tone, in hertz.
  • dur The duration to play the tone for, in 1024ths of a @@ -11,7 +11,7 @@ second (very close to milliseconds). A duration of 0, or if not provided, means play forever, or until noTone() is called or a new tone or sequence is started.
-
source

pub fn tone2( +

source

pub fn tone2( &self, frequency1: u16, duration1: u32, @@ -23,7 +23,7 @@ sequence is started.
  • dur1,dur2 The duration to play the tone for, in 1024ths of a second (very close to milliseconds).
  • -

    source

    pub fn tone3( +

    source

    pub fn tone3( &self, frequency1: u16, duration1: u32, @@ -37,7 +37,7 @@ second (very close to milliseconds).
  • dur1,dur2,dur3 The duration to play the tone for, in 1024ths of a second (very close to milliseconds).
  • -

    source

    pub fn tones(&self, tones: *const u16)

    Play a tone sequence from frequency/duration pairs in a PROGMEM array.

    +
    source

    pub fn tones(&self, tones: *const u16)

    Play a tone sequence from frequency/duration pairs in a PROGMEM array.

    • tones A pointer to an array of frequency/duration pairs.
    @@ -52,14 +52,14 @@ A frequency of 0 for any tone means silence (a musical rest).

    ); tones(get_tones_addr!(sound1));
    -
    source

    pub fn no_tone(&self)

    Stop playing the tone or sequence.

    +
    source

    pub fn no_tone(&self)

    Stop playing the tone or sequence.

    If a tone or sequence is playing, it will stop. If nothing is playing, this function will do nothing.

    -
    source

    pub fn playing(&self) -> bool

    Check if a tone or tone sequence is playing.

    +
    source

    pub fn playing(&self) -> bool

    Check if a tone or tone sequence is playing.

    • return boolean true if playing (even if sound is muted).
    -
    source

    pub fn tones_in_ram(&self, tones: *mut u32)

    Play a tone sequence from frequency/duration pairs in an array in RAM.

    +
    source

    pub fn tones_in_ram(&self, tones: *mut u32)

    Play a tone sequence from frequency/duration pairs in an array in RAM.

    • tones A pointer to an array of frequency/duration pairs.
    @@ -73,7 +73,7 @@ A frequency of 0 for any tone means silence (a musical rest).

    Using tones(), with the data in PROGMEM, is normally a better choice. The only reason to use tonesInRAM() would be if dynamically altering the contents of the array is required.

    -
    source

    pub fn volume_mode(&self, mode: u8)

    Set the volume to always normal, always high, or tone controlled.

    +
    source

    pub fn volume_mode(&self, mode: u8)

    Set the volume to always normal, always high, or tone controlled.

    One of the following values should be used:

    To get an idea, the ArduboyTones Library needs additional 2-3% of the flash memory.

    Here is the link to the GitHub Repo

    -

    Modules

    Macros

    Structs

    Enums

    Constants

    \ No newline at end of file +

    Modules

    Macros

    Structs

    Enums

    Constants

    \ No newline at end of file diff --git a/docs/doc/arduboy_rust/prelude/arduboy_tone/index.html b/docs/doc/arduboy_rust/prelude/arduboy_tone/index.html index 7f4d4ed..5eb2c3e 100644 --- a/docs/doc/arduboy_rust/prelude/arduboy_tone/index.html +++ b/docs/doc/arduboy_rust/prelude/arduboy_tone/index.html @@ -1,4 +1,3 @@ -arduboy_rust::prelude::arduboy_tone - Rust
    Expand description

    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.

    -

    Modules

    • A list of all tones available and used by the Sounds library Arduboy2Tones

    Structs

    • 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.
    \ No newline at end of file +arduboy_rust::prelude::arduboy_tone - Rust
    Expand description

    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.

    +

    Modules

    • A list of all tones available and used by the Sounds library Arduboy2Tones

    Structs

    • This is the struct to interact in a save way with the ArduboyTones C++ library.
    \ No newline at end of file diff --git a/docs/doc/arduboy_rust/prelude/arduboy_tone/struct.ArduboyTones.html b/docs/doc/arduboy_rust/prelude/arduboy_tone/struct.ArduboyTones.html index c0172e7..44882a2 100644 --- a/docs/doc/arduboy_rust/prelude/arduboy_tone/struct.ArduboyTones.html +++ b/docs/doc/arduboy_rust/prelude/arduboy_tone/struct.ArduboyTones.html @@ -1,9 +1,9 @@ -ArduboyTones in arduboy_rust::prelude::arduboy_tone - Rust
    pub struct ArduboyTones {}
    Expand description

    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.

    -

    Implementations§

    source§

    impl ArduboyTones

    source

    pub const fn new() -> ArduboyTones

    Get a new instance of ArduboyTones

    +ArduboyTones in arduboy_rust::prelude::arduboy_tone - Rust
    pub struct ArduboyTones {}
    Expand description

    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.

    +

    Implementations§

    source§

    impl ArduboyTones

    source

    pub const fn new() -> ArduboyTones

    Get a new instance of ArduboyTones

    Example
    const sound: ArduboyTones = ArduboyTones::new();
    -
    source

    pub fn tone(&self, frequency: u16, duration: u32)

    Play a single tone.

    +
    source

    pub fn tone(&self, frequency: u16, duration: u32)

    Play a single tone.

    • freq The frequency of the tone, in hertz.
    • dur The duration to play the tone for, in 1024ths of a @@ -11,7 +11,7 @@ second (very close to milliseconds). A duration of 0, or if not provided, means play forever, or until noTone() is called or a new tone or sequence is started.
    -
    source

    pub fn tone2( +

    source

    pub fn tone2( &self, frequency1: u16, duration1: u32, @@ -23,7 +23,7 @@ sequence is started.
  • dur1,dur2 The duration to play the tone for, in 1024ths of a second (very close to milliseconds).
  • -

    source

    pub fn tone3( +

    source

    pub fn tone3( &self, frequency1: u16, duration1: u32, @@ -37,7 +37,7 @@ second (very close to milliseconds).
  • dur1,dur2,dur3 The duration to play the tone for, in 1024ths of a second (very close to milliseconds).
  • -

    source

    pub fn tones(&self, tones: *const u16)

    Play a tone sequence from frequency/duration pairs in a PROGMEM array.

    +
    source

    pub fn tones(&self, tones: *const u16)

    Play a tone sequence from frequency/duration pairs in a PROGMEM array.

    • tones A pointer to an array of frequency/duration pairs.
    @@ -52,14 +52,14 @@ A frequency of 0 for any tone means silence (a musical rest).

    ); tones(get_tones_addr!(sound1));
    -
    source

    pub fn no_tone(&self)

    Stop playing the tone or sequence.

    +
    source

    pub fn no_tone(&self)

    Stop playing the tone or sequence.

    If a tone or sequence is playing, it will stop. If nothing is playing, this function will do nothing.

    -
    source

    pub fn playing(&self) -> bool

    Check if a tone or tone sequence is playing.

    +
    source

    pub fn playing(&self) -> bool

    Check if a tone or tone sequence is playing.

    • return boolean true if playing (even if sound is muted).
    -
    source

    pub fn tones_in_ram(&self, tones: *mut u32)

    Play a tone sequence from frequency/duration pairs in an array in RAM.

    +
    source

    pub fn tones_in_ram(&self, tones: *mut u32)

    Play a tone sequence from frequency/duration pairs in an array in RAM.

    • tones A pointer to an array of frequency/duration pairs.
    @@ -73,7 +73,7 @@ A frequency of 0 for any tone means silence (a musical rest).

    Using tones(), with the data in PROGMEM, is normally a better choice. The only reason to use tonesInRAM() would be if dynamically altering the contents of the array is required.

    -
    source

    pub fn volume_mode(&self, mode: u8)

    Set the volume to always normal, always high, or tone controlled.

    +
    source

    pub fn volume_mode(&self, mode: u8)

    Set the volume to always normal, always high, or tone controlled.

    One of the following values should be used:

    • VOLUME_IN_TONE The volume of each tone will be specified in the tone diff --git a/docs/doc/arduboy_rust/prelude/index.html b/docs/doc/arduboy_rust/prelude/index.html index cd69459..0e1e540 100644 --- a/docs/doc/arduboy_rust/prelude/index.html +++ b/docs/doc/arduboy_rust/prelude/index.html @@ -2,10 +2,7 @@

      Import the module:

      use arduboy_rust::prelude::*;
      -

    Modules

    Macros

    Structs

    \ No newline at end of file diff --git a/docs/doc/arduboy_rust/prelude/struct.ArdVoice.html b/docs/doc/arduboy_rust/prelude/struct.ArdVoice.html index a4cbda9..d414523 100644 --- a/docs/doc/arduboy_rust/prelude/struct.ArdVoice.html +++ b/docs/doc/arduboy_rust/prelude/struct.ArdVoice.html @@ -1,12 +1,12 @@ -ArdVoice in arduboy_rust::prelude - Rust
    pub struct ArdVoice {}
    Expand description

    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.

    -

    Implementations§

    source§

    impl ArdVoice

    source

    pub const fn new() -> Self

    source

    pub fn play_voice(&self, audio: *const u8)

    source

    pub fn play_voice_complex( +ArdVoice in arduboy_rust::prelude - Rust
    pub struct ArdVoice {}
    Expand description

    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.

    +

    Implementations§

    source§

    impl ArdVoice

    source

    pub const fn new() -> Self

    source

    pub fn play_voice(&self, audio: *const u8)

    source

    pub fn play_voice_complex( &self, audio: *const u8, start_time: u32, end_time: u32, speed: f32 -)

    source

    pub fn stop_voice(&self)

    source

    pub fn is_voice_playing(&self) -> bool

    Auto Trait Implementations§

    §

    impl RefUnwindSafe for ArdVoice

    §

    impl Send for ArdVoice

    §

    impl Sync for ArdVoice

    §

    impl Unpin for ArdVoice

    §

    impl UnwindSafe for ArdVoice

    Blanket Implementations§

    §

    impl<T> Any for Twhere +)

    source

    pub fn stop_voice(&self)

    source

    pub fn is_voice_playing(&self) -> bool

    Auto Trait Implementations§

    §

    impl RefUnwindSafe for ArdVoice

    §

    impl Send for ArdVoice

    §

    impl Sync for ArdVoice

    §

    impl Unpin for ArdVoice

    §

    impl UnwindSafe for ArdVoice

    Blanket Implementations§

    §

    impl<T> Any for Twhere T: 'static + ?Sized,

    §

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<T> Borrow<T> for Twhere T: ?Sized,

    §

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    §

    impl<T> BorrowMut<T> for Twhere T: ?Sized,

    §

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> From<T> for T

    §

    fn from(t: T) -> T

    Returns the argument unchanged.

    diff --git a/docs/doc/arduboy_rust/prelude/struct.ArduboyTones.html b/docs/doc/arduboy_rust/prelude/struct.ArduboyTones.html index b3f579a..9180280 100644 --- a/docs/doc/arduboy_rust/prelude/struct.ArduboyTones.html +++ b/docs/doc/arduboy_rust/prelude/struct.ArduboyTones.html @@ -1,9 +1,9 @@ -ArduboyTones in arduboy_rust::prelude - Rust
    pub struct ArduboyTones {}
    Expand description

    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.

    -

    Implementations§

    source§

    impl ArduboyTones

    source

    pub const fn new() -> ArduboyTones

    Get a new instance of ArduboyTones

    +ArduboyTones in arduboy_rust::prelude - Rust
    pub struct ArduboyTones {}
    Expand description

    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.

    +

    Implementations§

    source§

    impl ArduboyTones

    source

    pub const fn new() -> ArduboyTones

    Get a new instance of ArduboyTones

    Example
    const sound: ArduboyTones = ArduboyTones::new();
    -
    source

    pub fn tone(&self, frequency: u16, duration: u32)

    Play a single tone.

    +
    source

    pub fn tone(&self, frequency: u16, duration: u32)

    Play a single tone.

    • freq The frequency of the tone, in hertz.
    • dur The duration to play the tone for, in 1024ths of a @@ -11,7 +11,7 @@ second (very close to milliseconds). A duration of 0, or if not provided, means play forever, or until noTone() is called or a new tone or sequence is started.
    -
    source

    pub fn tone2( +

    source

    pub fn tone2( &self, frequency1: u16, duration1: u32, @@ -23,7 +23,7 @@ sequence is started.
  • dur1,dur2 The duration to play the tone for, in 1024ths of a second (very close to milliseconds).
  • -

    source

    pub fn tone3( +

    source

    pub fn tone3( &self, frequency1: u16, duration1: u32, @@ -37,7 +37,7 @@ second (very close to milliseconds).
  • dur1,dur2,dur3 The duration to play the tone for, in 1024ths of a second (very close to milliseconds).
  • -

    source

    pub fn tones(&self, tones: *const u16)

    Play a tone sequence from frequency/duration pairs in a PROGMEM array.

    +
    source

    pub fn tones(&self, tones: *const u16)

    Play a tone sequence from frequency/duration pairs in a PROGMEM array.

    • tones A pointer to an array of frequency/duration pairs.
    @@ -52,14 +52,14 @@ A frequency of 0 for any tone means silence (a musical rest).

    ); tones(get_tones_addr!(sound1));
    -
    source

    pub fn no_tone(&self)

    Stop playing the tone or sequence.

    +
    source

    pub fn no_tone(&self)

    Stop playing the tone or sequence.

    If a tone or sequence is playing, it will stop. If nothing is playing, this function will do nothing.

    -
    source

    pub fn playing(&self) -> bool

    Check if a tone or tone sequence is playing.

    +
    source

    pub fn playing(&self) -> bool

    Check if a tone or tone sequence is playing.

    • return boolean true if playing (even if sound is muted).
    -
    source

    pub fn tones_in_ram(&self, tones: *mut u32)

    Play a tone sequence from frequency/duration pairs in an array in RAM.

    +
    source

    pub fn tones_in_ram(&self, tones: *mut u32)

    Play a tone sequence from frequency/duration pairs in an array in RAM.

    • tones A pointer to an array of frequency/duration pairs.
    @@ -73,7 +73,7 @@ A frequency of 0 for any tone means silence (a musical rest).

    Using tones(), with the data in PROGMEM, is normally a better choice. The only reason to use tonesInRAM() would be if dynamically altering the contents of the array is required.

    -
    source

    pub fn volume_mode(&self, mode: u8)

    Set the volume to always normal, always high, or tone controlled.

    +
    source

    pub fn volume_mode(&self, mode: u8)

    Set the volume to always normal, always high, or tone controlled.

    One of the following values should be used:

    -
    source

    pub fn tone3( +

    source

    pub fn tone3( &self, frequency1: u16, duration1: u32, @@ -37,7 +37,7 @@ second (very close to milliseconds).
  • dur1,dur2,dur3 The duration to play the tone for, in 1024ths of a second (very close to milliseconds).
  • -

    source

    pub fn tones(&self, tones: *const u16)

    Play a tone sequence from frequency/duration pairs in a PROGMEM array.

    +
    source

    pub fn tones(&self, tones: *const u16)

    Play a tone sequence from frequency/duration pairs in a PROGMEM array.

    • tones A pointer to an array of frequency/duration pairs.
    @@ -52,14 +52,14 @@ A frequency of 0 for any tone means silence (a musical rest).

    ); tones(get_tones_addr!(sound1));
    -
    source

    pub fn no_tone(&self)

    Stop playing the tone or sequence.

    +
    source

    pub fn no_tone(&self)

    Stop playing the tone or sequence.

    If a tone or sequence is playing, it will stop. If nothing is playing, this function will do nothing.

    -
    source

    pub fn playing(&self) -> bool

    Check if a tone or tone sequence is playing.

    +
    source

    pub fn playing(&self) -> bool

    Check if a tone or tone sequence is playing.

    • return boolean true if playing (even if sound is muted).
    -
    source

    pub fn tones_in_ram(&self, tones: *mut u32)

    Play a tone sequence from frequency/duration pairs in an array in RAM.

    +
    source

    pub fn tones_in_ram(&self, tones: *mut u32)

    Play a tone sequence from frequency/duration pairs in an array in RAM.

    • tones A pointer to an array of frequency/duration pairs.
    @@ -73,7 +73,7 @@ A frequency of 0 for any tone means silence (a musical rest).

    Using tones(), with the data in PROGMEM, is normally a better choice. The only reason to use tonesInRAM() would be if dynamically altering the contents of the array is required.

    -
    source

    pub fn volume_mode(&self, mode: u8)

    Set the volume to always normal, always high, or tone controlled.

    +
    source

    pub fn volume_mode(&self, mode: u8)

    Set the volume to always normal, always high, or tone controlled.

    One of the following values should be used:

    • VOLUME_IN_TONE The volume of each tone will be specified in the tone diff --git a/docs/doc/src/arduboy_rust/library/arduboy_tone.rs.html b/docs/doc/src/arduboy_rust/library/arduboy_tone.rs.html index 3177a52..dbc8cf8 100644 --- a/docs/doc/src/arduboy_rust/library/arduboy_tone.rs.html +++ b/docs/doc/src/arduboy_rust/library/arduboy_tone.rs.html @@ -148,7 +148,10 @@ 148 149 150 +151 +152
    //!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};
    @@ -184,6 +187,7 @@
     
     }
     ///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 {
    diff --git a/docs/doc/src/arduboy_rust/library/ardvoice.rs.html b/docs/doc/src/arduboy_rust/library/ardvoice.rs.html
    index 337f096..8ec2147 100644
    --- a/docs/doc/src/arduboy_rust/library/ardvoice.rs.html
    +++ b/docs/doc/src/arduboy_rust/library/ardvoice.rs.html
    @@ -38,7 +38,10 @@
     38
     39
     40
    +41
    +42
     
    //! 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};
    @@ -59,6 +62,7 @@
         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 {