Type Alias rp2040_pac::usbctrl_regs::addr_endp::W

source ·
pub type W = W<ADDR_ENDP_SPEC>;
Expand description

Register ADDR_ENDP writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn address(&mut self) -> ADDRESS_W<'_, ADDR_ENDP_SPEC>

Bits 0:6 - In device mode, the address that the device should respond to. Set in response to a SET_ADDR setup packet from the host. In host mode set to the address of the device to communicate with.

source

pub fn endpoint(&mut self) -> ENDPOINT_W<'_, ADDR_ENDP_SPEC>

Bits 16:19 - Device endpoint to send data to. Only valid for HOST mode.

source

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

Writes raw bits to the register.

§Safety

Passing incorrect value can cause undefined behaviour. See reference manual