Compare commits

...

2 Commits

Author SHA1 Message Date
8a6e51c877 start amps enums 2025-04-09 20:35:45 -04:00
5a3798732c chore: fix flake 2025-04-09 20:03:27 -04:00
3 changed files with 31 additions and 2 deletions

28
cellular/src/amps.rs Normal file
View File

@@ -0,0 +1,28 @@
enum DSPMode {
OFF, // Channel not active
AUDIO_RX_AUDIO_TX, // stream audio
AUDIO_RX_FRAME_TX, // stream audio and send frames
AUDIO_RX_SILENCE_TX, // stream audio and send silence
FRAME_RX_FRAME_TX, // send and receive frames
}
enum AMPSChannelType {
CC, // control channel
PC, // paging channel
CC_PC, // combined control+paging
VC, // voice channel
CC_PC_VC, // combined control+paging+voice
}
enum AMPSState {
NULL, // power off
IDLE, // channel not in use
BUSY, // channel busy (call in progress)
}
enum FSK_RX_Sync {
NONE, // not in sync, waiting for valid dotting sequence
DOTTING, // received a valid dotting sequence, check for sync sequence
POSITIVE, // valid sync, read all bits from the frame
NEGATIVE, // negative sync (high frequency deviation detected as low signal)
}

View File

@@ -2,7 +2,7 @@ use ferris_says::say;
use std::io::{stdout, BufWriter};
mod sdr;
mod amps;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let stdout = stdout();
let message = String::from("Welcome to the Cellular Revolution!");

View File

@@ -21,7 +21,8 @@
with pkgs;
{
devShells.default = mkShell {
buildInputs = [
buildInputs = [
pkgs.bashInteractive
rust-bin.stable.latest.default
pkgs.pkg-config
pkgs.alsa-lib