create stub AMPS handset emulator

This commit is contained in:
2025-03-25 14:20:47 -04:00
parent 483e9d9475
commit 9aeb9ea3f4
5 changed files with 1029 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
use fsk::fsk_modulate;
use text_io::scan;
use std::io;
mod fsk;
mod audio;
fn main() -> Result<(), io::Error> {
println!("Press 1 to send test tone");
println!("Press 0 to exit");
let a: i32;
scan!("{}", a);
match a {
1 => {
println!("1 has been pressed! No test tone implemented yet");
let tone: signal;
tone = fsk_modulate([0x25, 0x08, 0x00, 0x25, 0xA0]);
play_audio(tone);
return main();
},
0 => {
return Ok(());
}
_ => {
eprintln!("Invalid command.");
return Ok(());
}
}
//Ok(())
}