pub struct W(_);
Expand description
Register CR
writer
Implementations
sourceimpl W
impl W
sourcepub fn txmode(&mut self) -> TXMODE_W<'_, 0>
pub fn txmode(&mut self) -> TXMODE_W<'_, 0>
Bits 0:1 - Type of Tx packet Writing the bitfield triggers the action as follows, depending on the value: Others: invalid From V1.1 of the USB PD specification, there is a counter defined for the duration of the BIST Carrier Mode 2. To quit this mode correctly (after the “tBISTContMode” delay), disable the peripheral (UCPDEN = 0).
sourcepub fn txsend(&mut self) -> TXSEND_W<'_, 2>
pub fn txsend(&mut self) -> TXSEND_W<'_, 2>
Bit 2 - Command to send a Tx packet The bit is cleared by hardware as soon as the packet transmission begins or is discarded.
sourcepub fn txhrst(&mut self) -> TXHRST_W<'_, 3>
pub fn txhrst(&mut self) -> TXHRST_W<'_, 3>
Bit 3 - Command to send a Tx Hard Reset The bit is cleared by hardware as soon as the message transmission begins or is discarded.
sourcepub fn rxmode(&mut self) -> RXMODE_W<'_, 4>
pub fn rxmode(&mut self) -> RXMODE_W<'_, 4>
Bit 4 - Receiver mode Determines the mode of the receiver. When the bit is set, RXORDSET behaves normally, RXDR no longer receives bytes yet the CRC checking still proceeds as for a normal message.
sourcepub fn phyrxen(&mut self) -> PHYRXEN_W<'_, 5>
pub fn phyrxen(&mut self) -> PHYRXEN_W<'_, 5>
Bit 5 - USB Power Delivery receiver enable Both CC1 and CC2 receivers are disabled when the bit is cleared. Only the CC receiver selected via the PHYCCSEL bit is enabled when the bit is set.
sourcepub fn phyccsel(&mut self) -> PHYCCSEL_W<'_, 6>
pub fn phyccsel(&mut self) -> PHYCCSEL_W<'_, 6>
Bit 6 - CC1/CC2 line selector for USB Power Delivery signaling The selection depends on the cable orientation as discovered at attach.
sourcepub fn anasubmode(&mut self) -> ANASUBMODE_W<'_, 7>
pub fn anasubmode(&mut self) -> ANASUBMODE_W<'_, 7>
Bits 7:8 - Analog PHY sub-mode Refer to TYPEC_VSTATE_CCx for the effect of this bitfield.
sourcepub fn anamode(&mut self) -> ANAMODE_W<'_, 9>
pub fn anamode(&mut self) -> ANAMODE_W<'_, 9>
Bit 9 - Analog PHY operating mode The bit takes effect upon setting the UCPDx_STROBE bit of the SYS_CONFIG register. The use of CC1 and CC2 depends on CCENABLE. Refer to ANAMODE, ANASUBMODE and link with TYPEC_VSTATE_CCx for the effect of this bitfield in conjunction with ANASUBMODE[1:0].
sourcepub fn ccenable(&mut self) -> CCENABLE_W<'_, 10>
pub fn ccenable(&mut self) -> CCENABLE_W<'_, 10>
Bits 10:11 - CC line enable This bitfield enables CC1 and CC2 line analog PHYs (pull-ups and pull-downs) according to ANAMODE and ANASUBMODE[1:0] setting. A single line PHY can be enabled when, for example, the other line is driven by VCONN via an external VCONN switch. Enabling both PHYs is the normal usage for sink/source.
sourcepub fn cc1vconnen(&mut self) -> CC1VCONNEN_W<'_, 13>
pub fn cc1vconnen(&mut self) -> CC1VCONNEN_W<'_, 13>
Bit 13 - VCONN switch enable for CC1
sourcepub fn cc2vconnen(&mut self) -> CC2VCONNEN_W<'_, 14>
pub fn cc2vconnen(&mut self) -> CC2VCONNEN_W<'_, 14>
Bit 14 - VCONN switch enable for CC2
sourcepub fn dbatten(&mut self) -> DBATTEN_W<'_, 15>
pub fn dbatten(&mut self) -> DBATTEN_W<'_, 15>
Bit 15 - Dead battery function enable The bit takes effect upon setting the USBPDstrobe bit of the SYS_CONFIG register. Dead battery function only operates if the external circuit is appropriately configured.
sourcepub fn frsrxen(&mut self) -> FRSRXEN_W<'_, 16>
pub fn frsrxen(&mut self) -> FRSRXEN_W<'_, 16>
Bit 16 - FRS event detection enable Setting the bit enables FRS Rx event (FRSEVT) detection on the CC line selected through the PHYCCSEL bit. 0: Disable Clear the bit when the device is attached to an FRS-incapable source/sink.
sourcepub fn frstx(&mut self) -> FRSTX_W<'_, 17>
pub fn frstx(&mut self) -> FRSTX_W<'_, 17>
Bit 17 - FRS Tx signaling enable. Setting the bit enables FRS Tx signaling. The bit is cleared by hardware after a delay respecting the USB Power Delivery specification Revision 3.0.
sourcepub fn rdch(&mut self) -> RDCH_W<'_, 18>
pub fn rdch(&mut self) -> RDCH_W<'_, 18>
Bit 18 - Rdch condition drive The bit drives Rdch condition on the CC line selected through the PHYCCSEL bit (thus associated with VCONN), by remaining set during the source-only UnattachedWait.SRC state, to respect the Type-C state. Refer to “USB Type-C ECN for Source VCONN Discharge”. The CCENABLE[1:0] bitfield must be set accordingly, too. Changing the bit value only takes effect upon setting the UCPDx_STROBE bit of the SYSCFG_CFGR1 register.
sourcepub fn cc1tcdis(&mut self) -> CC1TCDIS_W<'_, 20>
pub fn cc1tcdis(&mut self) -> CC1TCDIS_W<'_, 20>
Bit 20 - CC1 Type-C detector disable The bit disables the Type-C detector on the CC1 line. When enabled, the Type-C detector for CC1 is configured through ANAMODE and ANASUBMODE[1:0].
sourcepub fn cc2tcdis(&mut self) -> CC2TCDIS_W<'_, 21>
pub fn cc2tcdis(&mut self) -> CC2TCDIS_W<'_, 21>
Bit 21 - CC2 Type-C detector disable The bit disables the Type-C detector on the CC2 line. When enabled, the Type-C detector for CC2 is configured through ANAMODE and ANASUBMODE[1:0].
Methods from Deref<Target = W<CR_SPEC>>
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more