mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
32 lines
594 B
Rust
32 lines
594 B
Rust
#![no_std]
|
|
#![feature(start)]
|
|
|
|
extern crate agb;
|
|
|
|
use agb::sound;
|
|
|
|
#[start]
|
|
fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
|
let gba = agb::Gba::new();
|
|
|
|
gba.sound.enable();
|
|
|
|
let sweep_settings = sound::SweepSettings::default();
|
|
gba.sound.channel1().play_sound(
|
|
1024,
|
|
Some(0),
|
|
&sweep_settings,
|
|
&sound::EnvelopeSettings::default(),
|
|
sound::DutyCycle::Half,
|
|
);
|
|
|
|
gba.sound.channel2().play_sound(
|
|
1524,
|
|
Some(0),
|
|
&sound::EnvelopeSettings::default(),
|
|
sound::DutyCycle::Half,
|
|
);
|
|
|
|
loop {}
|
|
}
|