#[doc = "Writer for register USBHS_HSTPIPICR_INTRPT_MODE[%s]"]
pub type W = crate::W<u32, super::USBHS_HSTPIPICR_INTRPT_MODE>;
#[doc = "Register USBHS_HSTPIPICR_INTRPT_MODE[%s]
`reset()`'s with value 0"]
impl crate::ResetValue for super::USBHS_HSTPIPICR_INTRPT_MODE {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Write proxy for field `RXINIC`"]
pub struct RXINIC_W<'a> {
w: &'a mut W,
}
impl<'a> RXINIC_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 `TXOUTIC`"]
pub struct TXOUTIC_W<'a> {
w: &'a mut W,
}
impl<'a> TXOUTIC_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 `UNDERFIC`"]
pub struct UNDERFIC_W<'a> {
w: &'a mut W,
}
impl<'a> UNDERFIC_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 `NAKEDIC`"]
pub struct NAKEDIC_W<'a> {
w: &'a mut W,
}
impl<'a> NAKEDIC_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 `RXSTALLDIC`"]
pub struct RXSTALLDIC_W<'a> {
w: &'a mut W,
}
impl<'a> RXSTALLDIC_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 `SHORTPACKETIC`"]
pub struct SHORTPACKETIC_W<'a> {
w: &'a mut W,
}
impl<'a> SHORTPACKETIC_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 - Received IN Data Interrupt Clear"]
#[inline(always)]
pub fn rxinic(&mut self) -> RXINIC_W {
RXINIC_W { w: self }
}
#[doc = "Bit 1 - Transmitted OUT Data Interrupt Clear"]
#[inline(always)]
pub fn txoutic(&mut self) -> TXOUTIC_W {
TXOUTIC_W { w: self }
}
#[doc = "Bit 2 - Underflow Interrupt Clear"]
#[inline(always)]
pub fn underfic(&mut self) -> UNDERFIC_W {
UNDERFIC_W { w: self }
}
#[doc = "Bit 4 - NAKed Interrupt Clear"]
#[inline(always)]
pub fn nakedic(&mut self) -> NAKEDIC_W {
NAKEDIC_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 - Received STALLed Interrupt Clear"]
#[inline(always)]
pub fn rxstalldic(&mut self) -> RXSTALLDIC_W {
RXSTALLDIC_W { w: self }
}
#[doc = "Bit 7 - Short Packet Interrupt Clear"]
#[inline(always)]
pub fn shortpacketic(&mut self) -> SHORTPACKETIC_W {
SHORTPACKETIC_W { w: self }
}
}