#[repr(u8)]
#[derive(Debug, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub(crate) enum CallState {
Active,
Held,
Dialing,
Alerting,
Incoming,
Waiting,
Disconnect,
}
impl From<u8> for CallState {
fn from(value: u8) -> Self {
match value {
0 => Self::Active,
1 => Self::Held,
2 => Self::Dialing,
3 => Self::Alerting,
4 => Self::Incoming,
5 => Self::Waiting,
_ => Self::Disconnect,
}
}
}