#[derive(Copy, Clone, Debug)]
pub struct DynamicConfiguration {
pub transmitter: State,
pub adc: State,
pub tia: State,
pub rest_of_adc: State,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum State {
Enabled,
Disabled,
}
impl From<bool> for State {
fn from(val: bool) -> Self {
if val {
State::Disabled
} else {
State::Enabled
}
}
}
impl From<State> for bool {
fn from(val: State) -> Self {
val == State::Disabled
}
}