added all sound options
This commit is contained in:
parent
251491e4e6
commit
d382da0300
3 changed files with 22 additions and 0 deletions
|
@ -8,6 +8,14 @@ void arduboy_audio_off()
|
|||
{
|
||||
arduboy.audio.off();
|
||||
}
|
||||
void arduboy_audio_toggle()
|
||||
{
|
||||
arduboy.audio.toggle();
|
||||
}
|
||||
void arduboy_audio_save_on_off()
|
||||
{
|
||||
arduboy.audio.saveOnOff();
|
||||
}
|
||||
bool arduboy_audio_enabled()
|
||||
{
|
||||
return arduboy.audio.enabled();
|
||||
|
|
|
@ -10,6 +10,8 @@ extern "C"
|
|||
void arduboy_audio_on();
|
||||
void arduboy_audio_off();
|
||||
bool arduboy_audio_enabled();
|
||||
void arduboy_audio_toggle();
|
||||
void arduboy_audio_save_on_off();
|
||||
void sound_tone(unsigned int frequency, unsigned long duration);
|
||||
void sound_tone2(unsigned int frequency1, unsigned long duration1, unsigned int frequency2, unsigned long duration2);
|
||||
void sound_tone3(unsigned int frequency1, unsigned long duration1, unsigned int frequency2, unsigned long duration2, unsigned int frequency3, unsigned long duration3);
|
||||
|
|
|
@ -325,6 +325,12 @@ impl Arduboy {
|
|||
pub fn audio_off(&self) {
|
||||
unsafe { arduboy_audio_off() }
|
||||
}
|
||||
pub fn audio_save_on_off(&self) {
|
||||
unsafe { arduboy_audio_save_on_off() }
|
||||
}
|
||||
pub fn audio_save_toggle(&self) {
|
||||
unsafe { arduboy_audio_toggle() }
|
||||
}
|
||||
///Get the current sound state.
|
||||
///
|
||||
///### Returns
|
||||
|
@ -456,6 +462,12 @@ extern "C" {
|
|||
#[link_name = "arduboy_audio_off"]
|
||||
fn arduboy_audio_off();
|
||||
|
||||
#[link_name = "arduboy_audio_save_on_off"]
|
||||
fn arduboy_audio_save_on_off();
|
||||
|
||||
#[link_name = "arduboy_audio_toggle"]
|
||||
fn arduboy_audio_toggle();
|
||||
|
||||
#[link_name = "arduboy_audio_enabled"]
|
||||
fn arduboy_audio_enabled() -> bool;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue