#![no_std]
#[macro_use]
extern crate log;
mod ethernet;
#[cfg(feature = "phy_ksz8081r")]
mod ksz8081r;
#[cfg(feature = "phy_lan8742a")]
mod lan8742a;
#[cfg(not(any(feature = "phy_ksz8081r", feature = "phy_lan8742a")))]
compile_error!(
"A least one PHY device must be enabled. Use a feature gate to
enable."
);
#[cfg(all(feature = "phy_ksz8081r", feature = "phy_lan8742a"))]
compile_error!(
"Cannot enable multiple PHY devices. Try setting
`default-features = false`."
);
pub const ETH_PHY_ADDR: u8 = 0;
pub trait StationManagement {
fn smi_read(&mut self, reg: u8) -> u16;
fn smi_write(&mut self, reg: u8, val: u16);
}
trait PHY {
fn phy_reset(&mut self);
fn phy_init(&mut self);
}
pub use ethernet::{enable_interrupt, ethernet_init, interrupt_handler};
pub use ethernet::{DesRing, EthernetDMA, EthernetMAC};