Skip to main content

BasicControl

Struct BasicControl 

Source
pub struct BasicControl { /* private fields */ }
Expand description

The Control Register, containing basic control bits.

Implementations§

Source§

impl BasicControl

Source

pub const ZERO: Self

Creates a new instance with a raw value of 0. Equivalent to [Self::new_with_raw_value(0)].

Source

pub const DEFAULT: Self

An instance that uses the default value 0

Source

pub const fn new() -> Self

👎Deprecated:

Use BasicControl::Default (or BasicControl::DEFAULT in const context) instead

Creates a new instance of this struct using the default value

Source

pub const fn raw_value(&self) -> u16

Returns the underlying raw value of this bitfield

Source

pub const fn new_with_raw_value(value: u16) -> BasicControl

Creates a new instance of this bitfield with the given raw value.

No checks are performed on the value, so it is possible to set bits that don’t have any accessors specified.

Source

pub const fn builder() -> PartialBasicControl<false, false, false, false, false, false, false, false, false, false, false>

Creates a builder for this bitfield which ensures that all writable fields are initialized.

Source

pub const fn unidirectional_enable(&self) -> bool

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn with_unidirectional_enable(&self, field_value: bool) -> Self

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub fn set_unidirectional_enable(&mut self, field_value: bool)

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn speed_sel_msb(&self) -> bool

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn with_speed_sel_msb(&self, field_value: bool) -> Self

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub fn set_speed_sel_msb(&mut self, field_value: bool)

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn collision_test(&self) -> bool

Enable the collision test signal.

Source

pub const fn with_collision_test(&self, field_value: bool) -> Self

Enable the collision test signal.

Source

pub fn set_collision_test(&mut self, field_value: bool)

Enable the collision test signal.

Source

pub const fn duplex_mode(&self) -> Duplex

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn with_duplex_mode(&self, field_value: Duplex) -> Self

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub fn set_duplex_mode(&mut self, field_value: Duplex)

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn restart_autonegotiation(&self) -> bool

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn with_restart_autonegotiation(&self, field_value: bool) -> Self

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub fn set_restart_autonegotiation(&mut self, field_value: bool)

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn isolate(&self) -> bool

Electrically isolate the PHY from its (Gigabit) Media Independent Interface.

In other words, disconnect the PHY from the pins it shares with the MAC component connected to it. Setting this bit does retain access to the PHY over MIIM.

Source

pub const fn with_isolate(&self, field_value: bool) -> Self

Electrically isolate the PHY from its (Gigabit) Media Independent Interface.

In other words, disconnect the PHY from the pins it shares with the MAC component connected to it. Setting this bit does retain access to the PHY over MIIM.

Source

pub fn set_isolate(&mut self, field_value: bool)

Electrically isolate the PHY from its (Gigabit) Media Independent Interface.

In other words, disconnect the PHY from the pins it shares with the MAC component connected to it. Setting this bit does retain access to the PHY over MIIM.

Source

pub const fn power_down(&self) -> bool

Enable Power-Down mode.

Source

pub const fn with_power_down(&self, field_value: bool) -> Self

Enable Power-Down mode.

Source

pub fn set_power_down(&mut self, field_value: bool)

Enable Power-Down mode.

Source

pub const fn autonegotiation_enable(&self) -> bool

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn with_autonegotiation_enable(&self, field_value: bool) -> Self

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub fn set_autonegotiation_enable(&mut self, field_value: bool)

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn speed_sel_lsb(&self) -> bool

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn with_speed_sel_lsb(&self, field_value: bool) -> Self

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub fn set_speed_sel_lsb(&mut self, field_value: bool)

Do not access this field directly: use BasicControl::set_link_config and BasicControl::get_link_config instead.

Source

pub const fn loopback(&self) -> bool

Enable loopback mode.

Source

pub const fn with_loopback(&self, field_value: bool) -> Self

Enable loopback mode.

Source

pub fn set_loopback(&mut self, field_value: bool)

Enable loopback mode.

Source

pub const fn reset(&self) -> bool

Perform a reset.

If set, this bit will stay high until the reset has completed.

Source

pub const fn with_reset(&self, field_value: bool) -> Self

Perform a reset.

If set, this bit will stay high until the reset has completed.

Source

pub fn set_reset(&mut self, field_value: bool)

Perform a reset.

If set, this bit will stay high until the reset has completed.

Source§

impl BasicControl

Get the current link configuration.

Set the link configuration to config.

Trait Implementations§

Source§

impl Clone for BasicControl

Source§

fn clone(&self) -> BasicControl

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BasicControl

Source§

impl Debug for BasicControl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BasicControl

Source§

fn default() -> Self

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

impl From<BasicControl> for u16

Source§

fn from(value: BasicControl) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for BasicControl

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for BasicControl

Source§

fn eq(&self, other: &BasicControl) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Register for BasicControl

Source§

const ADDRESS: RegisterAddress

The MIIM address of the register.
Source§

impl StructuralPartialEq for BasicControl

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.