#[doc = "Reader of register USBHS_HSTPIP"]
pub type R = crate::R<u32, super::USBHS_HSTPIP>;
#[doc = "Writer for register USBHS_HSTPIP"]
pub type W = crate::W<u32, super::USBHS_HSTPIP>;
#[doc = "Register USBHS_HSTPIP `reset()`'s with value 0"]
impl crate::ResetValue for super::USBHS_HSTPIP {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `PEN0`"]
pub type PEN0_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN0`"]
pub struct PEN0_W<'a> {
w: &'a mut W,
}
impl<'a> PEN0_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 = "Reader of field `PEN1`"]
pub type PEN1_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN1`"]
pub struct PEN1_W<'a> {
w: &'a mut W,
}
impl<'a> PEN1_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 = "Reader of field `PEN2`"]
pub type PEN2_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN2`"]
pub struct PEN2_W<'a> {
w: &'a mut W,
}
impl<'a> PEN2_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 = "Reader of field `PEN3`"]
pub type PEN3_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN3`"]
pub struct PEN3_W<'a> {
w: &'a mut W,
}
impl<'a> PEN3_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 = "Reader of field `PEN4`"]
pub type PEN4_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN4`"]
pub struct PEN4_W<'a> {
w: &'a mut W,
}
impl<'a> PEN4_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 = "Reader of field `PEN5`"]
pub type PEN5_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN5`"]
pub struct PEN5_W<'a> {
w: &'a mut W,
}
impl<'a> PEN5_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 = "Reader of field `PEN6`"]
pub type PEN6_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN6`"]
pub struct PEN6_W<'a> {
w: &'a mut W,
}
impl<'a> PEN6_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 = "Reader of field `PEN7`"]
pub type PEN7_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN7`"]
pub struct PEN7_W<'a> {
w: &'a mut W,
}
impl<'a> PEN7_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
}
}
#[doc = "Reader of field `PEN8`"]
pub type PEN8_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PEN8`"]
pub struct PEN8_W<'a> {
w: &'a mut W,
}
impl<'a> PEN8_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 << 8)) | (((value as u32) & 0x01) << 8);
self.w
}
}
#[doc = "Reader of field `PRST0`"]
pub type PRST0_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST0`"]
pub struct PRST0_W<'a> {
w: &'a mut W,
}
impl<'a> PRST0_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 << 16)) | (((value as u32) & 0x01) << 16);
self.w
}
}
#[doc = "Reader of field `PRST1`"]
pub type PRST1_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST1`"]
pub struct PRST1_W<'a> {
w: &'a mut W,
}
impl<'a> PRST1_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 << 17)) | (((value as u32) & 0x01) << 17);
self.w
}
}
#[doc = "Reader of field `PRST2`"]
pub type PRST2_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST2`"]
pub struct PRST2_W<'a> {
w: &'a mut W,
}
impl<'a> PRST2_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 << 18)) | (((value as u32) & 0x01) << 18);
self.w
}
}
#[doc = "Reader of field `PRST3`"]
pub type PRST3_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST3`"]
pub struct PRST3_W<'a> {
w: &'a mut W,
}
impl<'a> PRST3_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 << 19)) | (((value as u32) & 0x01) << 19);
self.w
}
}
#[doc = "Reader of field `PRST4`"]
pub type PRST4_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST4`"]
pub struct PRST4_W<'a> {
w: &'a mut W,
}
impl<'a> PRST4_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 << 20)) | (((value as u32) & 0x01) << 20);
self.w
}
}
#[doc = "Reader of field `PRST5`"]
pub type PRST5_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST5`"]
pub struct PRST5_W<'a> {
w: &'a mut W,
}
impl<'a> PRST5_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 << 21)) | (((value as u32) & 0x01) << 21);
self.w
}
}
#[doc = "Reader of field `PRST6`"]
pub type PRST6_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST6`"]
pub struct PRST6_W<'a> {
w: &'a mut W,
}
impl<'a> PRST6_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 << 22)) | (((value as u32) & 0x01) << 22);
self.w
}
}
#[doc = "Reader of field `PRST7`"]
pub type PRST7_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST7`"]
pub struct PRST7_W<'a> {
w: &'a mut W,
}
impl<'a> PRST7_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 << 23)) | (((value as u32) & 0x01) << 23);
self.w
}
}
#[doc = "Reader of field `PRST8`"]
pub type PRST8_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PRST8`"]
pub struct PRST8_W<'a> {
w: &'a mut W,
}
impl<'a> PRST8_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 << 24)) | (((value as u32) & 0x01) << 24);
self.w
}
}
impl R {
#[doc = "Bit 0 - Pipe 0 Enable"]
#[inline(always)]
pub fn pen0(&self) -> PEN0_R {
PEN0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Pipe 1 Enable"]
#[inline(always)]
pub fn pen1(&self) -> PEN1_R {
PEN1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Pipe 2 Enable"]
#[inline(always)]
pub fn pen2(&self) -> PEN2_R {
PEN2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Pipe 3 Enable"]
#[inline(always)]
pub fn pen3(&self) -> PEN3_R {
PEN3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Pipe 4 Enable"]
#[inline(always)]
pub fn pen4(&self) -> PEN4_R {
PEN4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Pipe 5 Enable"]
#[inline(always)]
pub fn pen5(&self) -> PEN5_R {
PEN5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Pipe 6 Enable"]
#[inline(always)]
pub fn pen6(&self) -> PEN6_R {
PEN6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Pipe 7 Enable"]
#[inline(always)]
pub fn pen7(&self) -> PEN7_R {
PEN7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Pipe 8 Enable"]
#[inline(always)]
pub fn pen8(&self) -> PEN8_R {
PEN8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 16 - Pipe 0 Reset"]
#[inline(always)]
pub fn prst0(&self) -> PRST0_R {
PRST0_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17 - Pipe 1 Reset"]
#[inline(always)]
pub fn prst1(&self) -> PRST1_R {
PRST1_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18 - Pipe 2 Reset"]
#[inline(always)]
pub fn prst2(&self) -> PRST2_R {
PRST2_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19 - Pipe 3 Reset"]
#[inline(always)]
pub fn prst3(&self) -> PRST3_R {
PRST3_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 20 - Pipe 4 Reset"]
#[inline(always)]
pub fn prst4(&self) -> PRST4_R {
PRST4_R::new(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 21 - Pipe 5 Reset"]
#[inline(always)]
pub fn prst5(&self) -> PRST5_R {
PRST5_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22 - Pipe 6 Reset"]
#[inline(always)]
pub fn prst6(&self) -> PRST6_R {
PRST6_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 23 - Pipe 7 Reset"]
#[inline(always)]
pub fn prst7(&self) -> PRST7_R {
PRST7_R::new(((self.bits >> 23) & 0x01) != 0)
}
#[doc = "Bit 24 - Pipe 8 Reset"]
#[inline(always)]
pub fn prst8(&self) -> PRST8_R {
PRST8_R::new(((self.bits >> 24) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Pipe 0 Enable"]
#[inline(always)]
pub fn pen0(&mut self) -> PEN0_W {
PEN0_W { w: self }
}
#[doc = "Bit 1 - Pipe 1 Enable"]
#[inline(always)]
pub fn pen1(&mut self) -> PEN1_W {
PEN1_W { w: self }
}
#[doc = "Bit 2 - Pipe 2 Enable"]
#[inline(always)]
pub fn pen2(&mut self) -> PEN2_W {
PEN2_W { w: self }
}
#[doc = "Bit 3 - Pipe 3 Enable"]
#[inline(always)]
pub fn pen3(&mut self) -> PEN3_W {
PEN3_W { w: self }
}
#[doc = "Bit 4 - Pipe 4 Enable"]
#[inline(always)]
pub fn pen4(&mut self) -> PEN4_W {
PEN4_W { w: self }
}
#[doc = "Bit 5 - Pipe 5 Enable"]
#[inline(always)]
pub fn pen5(&mut self) -> PEN5_W {
PEN5_W { w: self }
}
#[doc = "Bit 6 - Pipe 6 Enable"]
#[inline(always)]
pub fn pen6(&mut self) -> PEN6_W {
PEN6_W { w: self }
}
#[doc = "Bit 7 - Pipe 7 Enable"]
#[inline(always)]
pub fn pen7(&mut self) -> PEN7_W {
PEN7_W { w: self }
}
#[doc = "Bit 8 - Pipe 8 Enable"]
#[inline(always)]
pub fn pen8(&mut self) -> PEN8_W {
PEN8_W { w: self }
}
#[doc = "Bit 16 - Pipe 0 Reset"]
#[inline(always)]
pub fn prst0(&mut self) -> PRST0_W {
PRST0_W { w: self }
}
#[doc = "Bit 17 - Pipe 1 Reset"]
#[inline(always)]
pub fn prst1(&mut self) -> PRST1_W {
PRST1_W { w: self }
}
#[doc = "Bit 18 - Pipe 2 Reset"]
#[inline(always)]
pub fn prst2(&mut self) -> PRST2_W {
PRST2_W { w: self }
}
#[doc = "Bit 19 - Pipe 3 Reset"]
#[inline(always)]
pub fn prst3(&mut self) -> PRST3_W {
PRST3_W { w: self }
}
#[doc = "Bit 20 - Pipe 4 Reset"]
#[inline(always)]
pub fn prst4(&mut self) -> PRST4_W {
PRST4_W { w: self }
}
#[doc = "Bit 21 - Pipe 5 Reset"]
#[inline(always)]
pub fn prst5(&mut self) -> PRST5_W {
PRST5_W { w: self }
}
#[doc = "Bit 22 - Pipe 6 Reset"]
#[inline(always)]
pub fn prst6(&mut self) -> PRST6_W {
PRST6_W { w: self }
}
#[doc = "Bit 23 - Pipe 7 Reset"]
#[inline(always)]
pub fn prst7(&mut self) -> PRST7_W {
PRST7_W { w: self }
}
#[doc = "Bit 24 - Pipe 8 Reset"]
#[inline(always)]
pub fn prst8(&mut self) -> PRST8_W {
PRST8_W { w: self }
}
}