commit
15a6e04887
@ -45,20 +45,19 @@ use self::phy_consts::*;
|
|||||||
pub struct GenericSMI {
|
pub struct GenericSMI {
|
||||||
#[cfg(feature = "time")]
|
#[cfg(feature = "time")]
|
||||||
poll_interval: Duration,
|
poll_interval: Duration,
|
||||||
|
#[cfg(not(feature = "time"))]
|
||||||
|
_private: (),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GenericSMI {
|
impl GenericSMI {
|
||||||
#[cfg(feature = "time")]
|
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
#[cfg(feature = "time")]
|
||||||
poll_interval: Duration::from_millis(500),
|
poll_interval: Duration::from_millis(500),
|
||||||
|
#[cfg(not(feature = "time"))]
|
||||||
|
_private: (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "time"))]
|
|
||||||
pub fn new() -> Self {
|
|
||||||
Self {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl PHY for GenericSMI {
|
unsafe impl PHY for GenericSMI {
|
||||||
@ -102,6 +101,7 @@ unsafe impl PHY for GenericSMI {
|
|||||||
|
|
||||||
/// Public functions for the PHY
|
/// Public functions for the PHY
|
||||||
impl GenericSMI {
|
impl GenericSMI {
|
||||||
|
#[cfg(feature = "time")]
|
||||||
pub fn set_poll_interval(&mut self, poll_interval: Duration) {
|
pub fn set_poll_interval(&mut self, poll_interval: Duration) {
|
||||||
self.poll_interval = poll_interval
|
self.poll_interval = poll_interval
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user