[−][src]Struct w5500_ll::Mode
Mode register (MR).
Used for software reset, and controlling modes of operation.
This is used by the crate::Registers::mr
and
crate::Registers::set_mr
methods.
Implementations
impl Mode
[src]
pub const RESET: u8
[src]
Mode register reset value.
pub const RST_OFFSET: u8
[src]
Bit offset for the RST
field.
pub const WOL_OFFSET: u8
[src]
Bit offset for the WOL
field.
pub const PB_OFFSET: u8
[src]
Bit offset for the PB
field.
pub const PPPOE_OFFSET: u8
[src]
Bit offset for the PPPoE
field.
pub const FARP_OFFSET: u8
[src]
Bit offset for the FARP
field.
pub const RST_MASK: u8
[src]
Bit mask for the RST
field.
pub const WOL_MASK: u8
[src]
Bit mask for the WOL
field.
pub const PB_MASK: u8
[src]
Bit mask for the PB
field.
pub const PPPOE_MASK: u8
[src]
Bit mask for the PPPoE
field.
pub const FARP_MASK: u8
[src]
Bit mask for the FARP
field.
pub fn rst(&mut self)
[src]
Set the software reset bit to '1'.
When reset all internal registers will be initialized.
pub fn wol_enabled(&self) -> bool
[src]
Wake on LAN.
If WOL mode is enabled and the received magic packet over UDP has been normally processed, the interrupt pin (INTn) asserts to low.
Example
let mut mr = w5500_ll::Mode::default(); assert!(!mr.wol_enabled()); mr.enable_wol(); assert!(mr.wol_enabled()); mr.disable_wol(); assert!(!mr.wol_enabled());
pub fn enable_wol(&mut self)
[src]
Enable wake on LAN.
pub fn disable_wol(&mut self)
[src]
Disable wake on LAN.
pub fn pb_enabled(&self) -> bool
[src]
Ping block mode.
If enabled it blocks responses to ping requests.
Example
let mut mr = w5500_ll::Mode::default(); assert!(!mr.pb_enabled()); mr.enable_pb(); assert!(mr.pb_enabled()); mr.disable_pb(); assert!(!mr.pb_enabled());
pub fn enable_pb(&mut self)
[src]
Enable ping block.
pub fn disable_pb(&mut self)
[src]
Disable ping block.
pub fn pppoe_enabled(&self) -> bool
[src]
PPPoE mode.
If you use ADSL this should be enabled.
Example
let mut mr = w5500_ll::Mode::default(); assert!(!mr.pppoe_enabled()); mr.enable_pppoe(); assert!(mr.pppoe_enabled()); mr.disable_pppoe(); assert!(!mr.pppoe_enabled());
pub fn enable_pppoe(&mut self)
[src]
Enable PPPoE mode.
pub fn disable_pppoe(&mut self)
[src]
Disable PPPoE mode.
pub fn farp_enabled(&self) -> bool
[src]
Force ARP.
When enabled it forces sending ARP request whenever data is sent.
Example
let mut mr = w5500_ll::Mode::default(); assert!(!mr.farp_enabled()); mr.enable_farp(); assert!(mr.farp_enabled()); mr.disable_farp(); assert!(!mr.farp_enabled());
pub fn enable_farp(&mut self)
[src]
Enable force ARP.
pub fn disable_farp(&mut self)
[src]
Disable force ARP.
Trait Implementations
impl Clone for Mode
[src]
pub fn clone(&self) -> Mode
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Mode
[src]
impl Debug for Mode
[src]
impl Default for Mode
[src]
impl Eq for Mode
[src]
impl From<u8> for Mode
[src]
impl Hash for Mode
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Mode> for Mode
[src]
impl StructuralEq for Mode
[src]
impl StructuralPartialEq for Mode
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,