Struct d1_pac::usb1::ehci_operational::usbcmd::W

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

Register usbcmd writer

Implementations§

source§

impl W

source

pub fn run_stop(&mut self) -> RUN_STOP_W<'_, 0>

Bit 0 - Run/Stop

When set to a 1, the Host Controller proceeds with execution of the schedule. When set to 0, the Host Controller completes the current and any actively pipelined transactions on the USB and then halts. The Host Controller must halt within 16 micro-frames after software clears this bit. The HC Halted bit indicates when the Host Controller has finished its pending pipelined transactions and has entered the stopped state.

Software must not write a one to this field unless the Host Controller is in the Halt State. The default value is 0x0.

source

pub fn host_controller_reset(&mut self) -> HOST_CONTROLLER_RESET_W<'_, 1>

Bit 1 - Host Controller Reset

This control bit is used by software to reset the host controller. The effects of this on Root Hub registers are similar to a Chip Hardware Reset.

When software writes a one to this bit, the Host Controller resets its internal pipelines, timers, counters, state machines, etc. to their initial value. Any transaction currently in progress on USB is immediately terminated. A USB reset is not driven on downstream ports.

All operational registers, including port registers and port state machines are set to their initial values. Port ownership reverts to the companion host controller(s). Software must reinitialize the host controller as described in Section 4.1 of the CHEI Specification in order to return the host controller to an operational state. This bit is set to zero by the Host Controller when the reset process is complete. Software cannot terminate the reset process early by writing a zero to this register.

Software should not set this bit to a one when the HC Halted bit in the USBSTS register is a zero. Attempting to reset an actively running host controller will result in undefined behavior.

source

pub fn frame_list_size(&mut self) -> FRAME_LIST_SIZE_W<'_, 2>

Bits 2:3 - This field is R/W only if Programmable Frame List Flag in the HCCPARAMS register is set to one. This field specifies the size of the Frame list.

source

pub fn periodic_schedule_enable(&mut self) -> PERIODIC_SCHEDULE_ENABLE_W<'_, 4>

Bit 4 - Periodic Schedule Enable

This bit controls whether the host controller skips processing the Periodic Schedule.

source

pub fn asynchronous_schedule_enable( &mut self, ) -> ASYNCHRONOUS_SCHEDULE_ENABLE_W<'_, 5>

Bit 5 - Asynchronous Schedule Enable

This bit controls whether the host controller skips processing the Asynchronous Schedule.

source

pub fn interrupt_on_async_advance_doorbell( &mut self, ) -> INTERRUPT_ON_ASYNC_ADVANCE_DOORBELL_W<'_, 6>

Bit 6 - Interrupt on Async Advance Doorbell

This bit is used as a doorbell by software to tell the host controller to issue an interrupt the next time it advances asynchronous schedule. Software must write a 1 to this bit to ring the doorbell. When the host controller has evicted all appropriate cached schedule state, it sets the Interrupt on Async Advance status bit in the USBSTS. if the Interrupt on Async Advance Enable bit in the USBINTR register is a one then the host controller will assert an interrupt at the next interrupt threshold.

The host controller sets this bit to a zero after it has set the Interrupt on Async Advance status bit in the USBSTS register to a one.

Software should not write a one to this bit when the asynchronous schedule is disabled. Doing so will yield undefined results.

source

pub fn light_host_controller_reset( &mut self, ) -> LIGHT_HOST_CONTROLLER_RESET_W<'_, 7>

Bit 7 - Light Host Controller Reset (OPTIONAL)

This control bit is not required. If implemented, it allows the driver to reset the EHCI controller without affecting the state of the ports or relationship to the companion host controllers. For example, the PORSTC registers should not be reset to their default values and the CF bit setting should not go to zero (retaining port ownership relationships). A host software read of this bit as zero indicates the Light Host Controller Reset has completed and it si safe for software to re- initialize the host controller. A host software read of this bit as a one indicates the Light Host

source

pub fn interrupt_threshold_control( &mut self, ) -> INTERRUPT_THRESHOLD_CONTROL_W<'_, 16>

Bits 16:23 - Interrupt Threshold Control

The value in this field is used by system software to select the maximum rate at which the host controller will issue interrupts.

source

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

Writes raw bits to the register.

Methods from Deref<Target = W<USBCMD_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<USBCMD_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<USBCMD_SPEC>> for W

source§

fn from(writer: W<USBCMD_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.