#[doc = "Writer for register USBHS_DEVEPTICR_CTRL_MODE[%s]"]
pub type W = crate::W<u32, super::USBHS_DEVEPTICR_CTRL_MODE>;
#[doc = "Register USBHS_DEVEPTICR_CTRL_MODE[%s]
`reset()`'s with value 0"]
impl crate::ResetValue for super::USBHS_DEVEPTICR_CTRL_MODE {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Write proxy for field `TXINIC`"]
pub struct TXINIC_W<'a> {
w: &'a mut W,
}
impl<'a> TXINIC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
#[doc = "Write proxy for field `RXOUTIC`"]
pub struct RXOUTIC_W<'a> {
w: &'a mut W,
}
impl<'a> RXOUTIC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
self.w
}
}
#[doc = "Write proxy for field `RXSTPIC`"]
pub struct RXSTPIC_W<'a> {
w: &'a mut W,
}
impl<'a> RXSTPIC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
self.w
}
}
#[doc = "Write proxy for field `NAKOUTIC`"]
pub struct NAKOUTIC_W<'a> {
w: &'a mut W,
}
impl<'a> NAKOUTIC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
self.w
}
}
#[doc = "Write proxy for field `NAKINIC`"]
pub struct NAKINIC_W<'a> {
w: &'a mut W,
}
impl<'a> NAKINIC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
self.w
}
}
#[doc = "Write proxy for field `OVERFIC`"]
pub struct OVERFIC_W<'a> {
w: &'a mut W,
}
impl<'a> OVERFIC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
self.w
}
}
#[doc = "Write proxy for field `STALLEDIC`"]
pub struct STALLEDIC_W<'a> {
w: &'a mut W,
}
impl<'a> STALLEDIC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
self.w
}
}
#[doc = "Write proxy for field `SHORTPACKETC`"]
pub struct SHORTPACKETC_W<'a> {
w: &'a mut W,
}
impl<'a> SHORTPACKETC_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
self.w
}
}
impl W {
#[doc = "Bit 0 - Transmitted IN Data Interrupt Clear"]
#[inline(always)]
pub fn txinic(&mut self) -> TXINIC_W {
TXINIC_W { w: self }
}
#[doc = "Bit 1 - Received OUT Data Interrupt Clear"]
#[inline(always)]
pub fn rxoutic(&mut self) -> RXOUTIC_W {
RXOUTIC_W { w: self }
}
#[doc = "Bit 2 - Received SETUP Interrupt Clear"]
#[inline(always)]
pub fn rxstpic(&mut self) -> RXSTPIC_W {
RXSTPIC_W { w: self }
}
#[doc = "Bit 3 - NAKed OUT Interrupt Clear"]
#[inline(always)]
pub fn nakoutic(&mut self) -> NAKOUTIC_W {
NAKOUTIC_W { w: self }
}
#[doc = "Bit 4 - NAKed IN Interrupt Clear"]
#[inline(always)]
pub fn nakinic(&mut self) -> NAKINIC_W {
NAKINIC_W { w: self }
}
#[doc = "Bit 5 - Overflow Interrupt Clear"]
#[inline(always)]
pub fn overfic(&mut self) -> OVERFIC_W {
OVERFIC_W { w: self }
}
#[doc = "Bit 6 - STALLed Interrupt Clear"]
#[inline(always)]
pub fn stalledic(&mut self) -> STALLEDIC_W {
STALLEDIC_W { w: self }
}
#[doc = "Bit 7 - Short Packet Interrupt Clear"]
#[inline(always)]
pub fn shortpacketc(&mut self) -> SHORTPACKETC_W {
SHORTPACKETC_W { w: self }
}
}