Struct d1_pac::usb1::ohci_root_hub_partition::hc_rh_status::R

source ·
pub struct R(/* private fields */);
Expand description

Register hc_rh_status reader

Implementations§

source§

impl R

source

pub fn r_local_power_status_w_clear_global_power( &self, ) -> R_LOCAL_POWER_STATUS_W_CLEAR_GLOBAL_POWER_R

Bit 0 - (Read)LocalPowerStatus

When read, this bit returns the LocalPowerStatus of the Root Hub. The Root Hub does not support the local power status feature; thus, this bit is always read as ‘0’.

(Write)ClearGlobalPower

When write, this bit is operated as the ClearGlobalPower. In global power mode ( PowerSwitchingMode =0), This bit is written to ‘1’ to turn off power to all ports (clear PortPowerStatus ). In per-port power mode, it clears PortPowerStatus only on ports whose PortPowerControlMask bit is not set. Writing a ‘0’ has no effect.

source

pub fn over_current_indicator(&self) -> OVER_CURRENT_INDICATOR_R

Bit 1 - This bit reports overcurrent conditions when the global reporting is implemented. When set, an overcurrent condition exists. When cleared, all power operations are normal. If per-port overcurrent protection is implemented this bit is always ‘0’

source

pub fn r_device_remote_wakeup_enable_w_set_remote_wakeup_enable( &self, ) -> R_DEVICE_REMOTE_WAKEUP_ENABLE_W_SET_REMOTE_WAKEUP_ENABLE_R

Bit 15 - (read)DeviceRemoteWakeupEnable

This bit enables a ConnectStatusChange bit as a resume event, causing a USBSUSPEND to USBRESUME state transition and setting the ResumeDetected interrupt.

0 ConnectStatusChange is not a remote wakeup event.

1 ConnectStatusChange is a remote wakeup event.

(write)SetRemoteWakeupEnable

Writing a ‘1’ sets DeviceRemoveWakeupEnable. Writing a ‘0’ has no effect.

source

pub fn r_local_power_status_w_set_global_power( &self, ) -> R_LOCAL_POWER_STATUS_W_SET_GLOBAL_POWER_R

Bit 16 - (read)LocalPowerStatusChange

The Root Hub does not support the local power status features, thus, this bit is always read as ‘0’.

(write)SetGlobalPower

In global power mode ( PowerSwitchingMode =0), This bit is written to ‘1’ to turn on power to all ports (clear PortPowerStatus ). In per-port power mode, it sets PortPowerStatus only on ports whose PortPowerControlMask bit is not set. Writing a ‘0’ has no effect.

source

pub fn over_current_indicator_change(&self) -> OVER_CURRENT_INDICATOR_CHANGE_R

Bit 17 - This bit is set by hardware when a change has occurred to the OverCurrentIndicator field of this register. The HCD clears this bit by writing a ‘1’. Writing a ‘0’ has no effect.

source

pub fn clear_remote_eakeup_enable(&self) -> CLEAR_REMOTE_EAKEUP_ENABLE_R

Bit 31 - (write)ClearRemoteWakeupEnable

Write a ‘1’ clears DeviceRemoteWakeupEnable. Writing a ‘0’ has no effect.

Methods from Deref<Target = R<HC_RH_STATUS_SPEC>>§

source

pub fn bits(&self) -> REG::Ux

Reads raw bits from register.

Trait Implementations§

source§

impl Deref for R

§

type Target = R<HC_RH_STATUS_SPEC>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl From<R<HC_RH_STATUS_SPEC>> for R

source§

fn from(reader: R<HC_RH_STATUS_SPEC>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for R

§

impl RefUnwindSafe for R

§

impl Send for R

§

impl Sync for R

§

impl Unpin for R

§

impl UnwindSafe for R

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> 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>,

§

type Error = Infallible

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>,

§

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.