#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct PlcaConfig {
pub node_id: u8,
pub node_count: u8,
pub burst_count: u8,
pub burst_timer: u8,
}
impl Default for PlcaConfig {
fn default() -> Self {
Self {
node_id: 0,
node_count: 8,
burst_count: 0,
burst_timer: 0,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct PlcaStatus {
pub enabled: bool,
pub node_id: u8,
pub is_coordinator: bool,
pub stable: bool,
}
#[derive(Debug)]
#[non_exhaustive]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum PlcaError<E> {
Mdio(E),
InvalidConfig,
}