Struct ch32v3::ch32v30x::usb_otg_fs::usbhd_base_ctrl::W
source · pub struct W(_);
Expand description
Register USBHD_BASE_CTRL
writer
Implementations§
source§impl W
impl W
sourcepub fn usbhd_uc_dma_en(&mut self) -> USBHD_UC_DMA_EN_W<'_, 0>
pub fn usbhd_uc_dma_en(&mut self) -> USBHD_UC_DMA_EN_W<'_, 0>
Bit 0 - DMA enable and DMA interrupt enable for USB
sourcepub fn usbhd_uc_clr_all(&mut self) -> USBHD_UC_CLR_ALL_W<'_, 1>
pub fn usbhd_uc_clr_all(&mut self) -> USBHD_UC_CLR_ALL_W<'_, 1>
Bit 1 - force clear FIFO and count of USB
sourcepub fn usbhd_uc_reset_sie(&mut self) -> USBHD_UC_RESET_SIE_W<'_, 2>
pub fn usbhd_uc_reset_sie(&mut self) -> USBHD_UC_RESET_SIE_W<'_, 2>
Bit 2 - force reset USB SIE, need software clear
sourcepub fn usbhd_uc_int_busy(&mut self) -> USBHD_UC_INT_BUSY_W<'_, 3>
pub fn usbhd_uc_int_busy(&mut self) -> USBHD_UC_INT_BUSY_W<'_, 3>
Bit 3 - enable automatic responding busy for device mode or automatic pause for host mode during interrupt flag UIF_TRANSFER valid
sourcepub fn usbhd_uc_sys_ctrl_mask(&mut self) -> USBHD_UC_SYS_CTRL_MASK_W<'_, 4>
pub fn usbhd_uc_sys_ctrl_mask(&mut self) -> USBHD_UC_SYS_CTRL_MASK_W<'_, 4>
Bits 4:5 - USB device enable and internal pullup resistance enable
sourcepub fn usbhd_uc_low_speed(&mut self) -> USBHD_UC_LOW_SPEED_W<'_, 6>
pub fn usbhd_uc_low_speed(&mut self) -> USBHD_UC_LOW_SPEED_W<'_, 6>
Bit 6 - enable USB low speed: 0=12Mbps, 1=1.5Mbps
sourcepub fn uc_host_mode(&mut self) -> UC_HOST_MODE_W<'_, 7>
pub fn uc_host_mode(&mut self) -> UC_HOST_MODE_W<'_, 7>
Bit 7 - enable USB host mode: 0=device mode, 1=host mode