Skip to content

Commit

Permalink
[feat] add is_link_up
Browse files Browse the repository at this point in the history
  • Loading branch information
ZR233 committed Aug 6, 2024
1 parent 186303f commit df0da2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "e1000-driver"
authors = ["Luoyuan Xiao <[email protected]>", "Zhou Rui <[email protected]>"]
version = "0.2.2"
version = "0.2.3"
edition = "2018"
license = "GPL-2.0"
repository = "https://github.com/elliott10/e1000-driver.git"
Expand Down
4 changes: 3 additions & 1 deletion src/e1000/e1000.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ impl E1000 {

Ok(())
}

pub fn is_link_up(&self) -> bool {
self.is_link_up.load(Ordering::SeqCst)
}
pub fn down(&mut self) {
/* disable transmits in the hardware */
let mut tctl = self.er32(TCTL);
Expand Down

0 comments on commit df0da2d

Please sign in to comment.