Struct rp_pac::usb_dpram::regs::EpBufferControl
source · #[repr(transparent)]pub struct EpBufferControl(pub u32);
Expand description
Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode.
Tuple Fields§
§0: u32
Implementations§
source§impl EpBufferControl
impl EpBufferControl
sourcepub fn set_length(&mut self, n: usize, val: u16)
pub fn set_length(&mut self, n: usize, val: u16)
The length of the data in buffer 0.
sourcepub const fn available(&self, n: usize) -> bool
pub const fn available(&self, n: usize) -> bool
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.
sourcepub fn set_available(&mut self, n: usize, val: bool)
pub fn set_available(&mut self, n: usize, val: bool)
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.
sourcepub const fn full(&self, n: usize) -> bool
pub const fn full(&self, n: usize) -> bool
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.
sourcepub fn set_full(&mut self, n: usize, val: bool)
pub fn set_full(&mut self, n: usize, val: bool)
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.
sourcepub const fn double_buffer_iso_offset(
&self,
) -> EpBufferControlDoubleBufferIsoOffset
pub const fn double_buffer_iso_offset( &self, ) -> EpBufferControlDoubleBufferIsoOffset
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.
sourcepub fn set_double_buffer_iso_offset(
&mut self,
val: EpBufferControlDoubleBufferIsoOffset,
)
pub fn set_double_buffer_iso_offset( &mut self, val: EpBufferControlDoubleBufferIsoOffset, )
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.
Trait Implementations§
source§impl Clone for EpBufferControl
impl Clone for EpBufferControl
source§fn clone(&self) -> EpBufferControl
fn clone(&self) -> EpBufferControl
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for EpBufferControl
impl Default for EpBufferControl
source§fn default() -> EpBufferControl
fn default() -> EpBufferControl
source§impl PartialEq for EpBufferControl
impl PartialEq for EpBufferControl
impl Copy for EpBufferControl
impl Eq for EpBufferControl
impl StructuralPartialEq for EpBufferControl
Auto Trait Implementations§
impl Freeze for EpBufferControl
impl RefUnwindSafe for EpBufferControl
impl Send for EpBufferControl
impl Sync for EpBufferControl
impl Unpin for EpBufferControl
impl UnwindSafe for EpBufferControl
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)