Struct d1_pac::usb1::ohci_root_hub_partition::hc_rh_status::W

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

Register hc_rh_status writer

Implementations§

source§

impl W

source

pub fn r_local_power_status_w_clear_global_power( &mut self, ) -> R_LOCAL_POWER_STATUS_W_CLEAR_GLOBAL_POWER_W<'_, 0>

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(&mut self) -> OVER_CURRENT_INDICATOR_W<'_, 1>

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( &mut self, ) -> R_DEVICE_REMOTE_WAKEUP_ENABLE_W_SET_REMOTE_WAKEUP_ENABLE_W<'_, 15>

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( &mut self, ) -> R_LOCAL_POWER_STATUS_W_SET_GLOBAL_POWER_W<'_, 16>

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( &mut self, ) -> OVER_CURRENT_INDICATOR_CHANGE_W<'_, 17>

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( &mut self, ) -> CLEAR_REMOTE_EAKEUP_ENABLE_W<'_, 31>

Bit 31 - (write)ClearRemoteWakeupEnable

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

source

pub unsafe fn bits(&mut self, bits: u32) -> &mut Self

Writes raw bits to the register.

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

source

pub unsafe fn bits(&mut self, bits: REG::Ux) -> &mut Self

Writes raw bits to the register.

§Safety

Read datasheet or reference manual to find what values are allowed to pass.

Trait Implementations§

source§

impl Deref for W

§

type Target = W<HC_RH_STATUS_SPEC>

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl DerefMut for W

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl From<W<HC_RH_STATUS_SPEC>> for W

source§

fn from(writer: W<HC_RH_STATUS_SPEC>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for W

§

impl RefUnwindSafe for W

§

impl Send for W

§

impl Sync for W

§

impl Unpin for W

§

impl UnwindSafe for W

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.