Files
start-os/lifeline/src/main.rs
Aiden McClelland e8a693049e add lifeline
2020-12-24 14:33:38 -07:00

15 lines
351 B
Rust

use std::time::Duration;
mod sound;
use sound::{notes::*, Song};
const SUCCESS_SONG: Song = Song(&[(Some(A_4), Duration::from_millis(100))]);
fn main() {
std::fs::write("/sys/class/pwm/pwmchip0/export", "0").unwrap();
let res = SUCCESS_SONG.play();
std::fs::write("/sys/class/pwm/pwmchip0/unexport", "0").unwrap();
res.unwrap();
}