Type Alias rp2040_pac::usbctrl_dpram::ep_buffer_control::W

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

Register EP_BUFFER_CONTROL%s writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn length_0(&mut self) -> LENGTH_0_W<'_, EP_BUFFER_CONTROL_SPEC>

Bits 0:9 - The length of the data in buffer 0.

source

pub fn available_0(&mut self) -> AVAILABLE_0_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 10 - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back.

source

pub fn stall(&mut self) -> STALL_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 11 - Reply with a stall (valid for both buffers).

source

pub fn reset(&mut self) -> RESET_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 12 - Reset the buffer selector to buffer 0.

source

pub fn pid_0(&mut self) -> PID_0_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 13 - The data pid of buffer 0.

source

pub fn last_0(&mut self) -> LAST_0_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 14 - Buffer 0 is the last buffer of the transfer.

source

pub fn full_0(&mut self) -> FULL_0_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 15 - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data.

source

pub fn length_1(&mut self) -> LENGTH_1_W<'_, EP_BUFFER_CONTROL_SPEC>

Bits 16:25 - The length of the data in buffer 1.

source

pub fn available_1(&mut self) -> AVAILABLE_1_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 26 - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back.

source

pub fn double_buffer_iso_offset( &mut self, ) -> DOUBLE_BUFFER_ISO_OFFSET_W<'_, EP_BUFFER_CONTROL_SPEC>

Bits 27:28 - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.
For a non Isochronous endpoint the offset is always 64 bytes.

source

pub fn pid_1(&mut self) -> PID_1_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 29 - The data pid of buffer 1.

source

pub fn last_1(&mut self) -> LAST_1_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 30 - Buffer 1 is the last buffer of the transfer.

source

pub fn full_1(&mut self) -> FULL_1_W<'_, EP_BUFFER_CONTROL_SPEC>

Bit 31 - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data.

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