Kasli-SoC: Enable Ethernet LEDs #91

Merged
sb10q merged 1 commits from mwojcik/zynq-rs:ethernet_leds into master 2024-08-17 17:37:18 +08:00
2 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,7 @@ impl Leds {
0b1101 => Led0Control::Mode2, 0b1101 => Led0Control::Mode2,
0b1110 => Led0Control::Mode3, 0b1110 => Led0Control::Mode3,
0b1111 => Led0Control::Mode4, 0b1111 => Led0Control::Mode4,
_ => Led0Control::OnLinkOffNoLink, //impossible, but Rust compiler requires it _ => unreachable!()
} }
} }
pub fn led1(&self) -> Led1Control { pub fn led1(&self) -> Led1Control {
@ -41,7 +41,7 @@ impl Leds {
0b1001 => Led1Control::ForceOn, 0b1001 => Led1Control::ForceOn,
0b1010 => Led1Control::ForceHiZ, 0b1010 => Led1Control::ForceHiZ,
0b1011 => Led1Control::ForceBlink, 0b1011 => Led1Control::ForceBlink,
_ => Led1Control::Invalid, //impossible, but Rust compiler requires it _ => unreachable!()
} }
} }

View File

@ -62,7 +62,6 @@ pub enum Led1Control {
ForceOn = 0b1001, ForceOn = 0b1001,
ForceHiZ = 0b1010, ForceHiZ = 0b1010,
ForceBlink = 0b1011, ForceBlink = 0b1011,
Invalid
} }
pub trait PhyAccess { pub trait PhyAccess {