agb/examples/beep.rs

19 lines
355 B
Rust
Raw Normal View History

2021-04-16 08:34:12 +10:00
#![no_std]
#![feature(start)]
extern crate gba;
2021-04-16 08:49:17 +10:00
use gba::sound;
2021-04-16 08:34:12 +10:00
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
let mut gba = gba::Gba::new();
gba.sound.enable();
2021-04-16 08:49:17 +10:00
let sweep_settings = sound::SweepSettings::new(3, sound::SoundDirection::Decrease, 7);
2021-04-16 08:49:17 +10:00
gba.sound.channel1().play_sound(&sweep_settings);
2021-04-16 08:34:12 +10:00
loop {}
}