#[repr(u8)]
pub enum DRDSTATE_A {
Show 16 variants A_IDLESTATE, A_WAIT_VRISE, A_WAIT_BCON, A_HOST, A_SUSPEND, A_PERIPHERAL, A_WAIT_VFALL, A_VBUS_ERR, A_WAIT_DISCHARGE, B_IDLE, B_PERIPHERAL, B_WAIT_BEGIN_HNP, B_WAIT_DISCHARGE, B_WAIT_ACON, B_HOST, B_SRP_INIT,
}
Expand description

Dual Role Device State

Value on reset: 0

Variants

A_IDLESTATE

0: This is the start state for A-devices (when the ID pin is 0)

A_WAIT_VRISE

1: In this state, the A-device waits for the voltage on VBus to rise above the A-device VBus Valid threshold (4.4 V).

A_WAIT_BCON

2: In this state, the A-device waits for the B-device to signal a connection.

A_HOST

3: In this state, the A-device that operates in Host mode is operational.

A_SUSPEND

4: The A-device operating as a host is in the Suspend mode.

A_PERIPHERAL

5: The A-device operates as a peripheral.

A_WAIT_VFALL

6: In this state, the A-device waits for the voltage on VBus to drop below the A-device Session Valid threshold (1.4 V).

A_VBUS_ERR

7: In this state, the A-device waits for recovery of the over-current condition that caused it to enter this state.

A_WAIT_DISCHARGE

8: In this state, the A-device waits for the data USB line to discharge (100 us).

B_IDLE

9: This is the start state for B-device (when the ID pin is 1).

B_PERIPHERAL

10: In this state, the B-device acts as the peripheral.

B_WAIT_BEGIN_HNP

11: In this state, the B-device is in Suspend mode and waits until 3 ms before initiating the HNP protocol if requested.

B_WAIT_DISCHARGE

12: In this state, the B-device waits for the data USB line to discharge (100 us)) before becoming Host.

B_WAIT_ACON

13: In this state, the B-device waits for the A-device to signal a connect before becoming B-Host.

B_HOST

14: In this state, the B-device acts as the Host.

B_SRP_INIT

15: In this state, the B-device attempts to start a session using the SRP protocol.

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

Performs the conversion.

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

Returns the argument unchanged.

Calls U::from(self).

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

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.