Struct w5500_ll::Mode[][src]

pub struct Mode(_);
Expand description

Mode register (MR).

Used for software reset, and controlling modes of operation.

This is used by the Registers::mr and Registers::set_mr methods.

Implementations

Mode register reset value.

Default value.

This is the same as default, but as a const value.

Example
use w5500_ll::Mode;

assert_eq!(Mode::DEFAULT, Mode::default());

Bit offset for the RST field.

Bit offset for the WOL field.

Bit offset for the PB field.

Bit offset for the PPPoE field.

Bit offset for the FARP field.

Bit mask for the RST field.

Bit mask for the WOL field.

Bit mask for the PB field.

Bit mask for the PPPoE field.

Bit mask for the FARP field.

Set the software reset bit to 1.

When reset all internal registers will be initialized.

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
use w5500_ll::Mode;

let mr: Mode = Mode::DEFAULT;
assert!(!mr.wol_enabled());
let mr: Mode = mr.enable_wol();
assert!(mr.wol_enabled());
let mr: Mode = mr.disable_wol();
assert!(!mr.wol_enabled());

Enable wake on LAN.

Disable wake on LAN.

Ping block mode.

If enabled it blocks responses to ping requests.

Example
use w5500_ll::Mode;

let mr: Mode = Mode::DEFAULT;
assert!(!mr.pb_enabled());
let mr: Mode = mr.enable_pb();
assert!(mr.pb_enabled());
let mr: Mode = mr.disable_pb();
assert!(!mr.pb_enabled());

Enable ping block.

Disable ping block.

PPPoE mode.

If you use ADSL this should be enabled.

Example
use w5500_ll::Mode;

let mr: Mode = Mode::DEFAULT;
assert!(!mr.pppoe_enabled());
let mr: Mode = mr.enable_pppoe();
assert!(mr.pppoe_enabled());
let mr: Mode = mr.disable_pppoe();
assert!(!mr.pppoe_enabled());

Enable PPPoE mode.

Disable PPPoE mode.

Force ARP.

When enabled it forces sending ARP request whenever data is sent.

Example
use w5500_ll::Mode;

let mr: Mode = Mode::DEFAULT;
assert!(!mr.farp_enabled());
let mr: Mode = mr.enable_farp();
assert!(mr.farp_enabled());
let mr: Mode = mr.disable_farp();
assert!(!mr.farp_enabled());

Enable force ARP.

Disable force ARP.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.