#[doc = "Reader of register GPIOD_PUR"]
pub type R = crate::R<u32, super::GPIOD_PUR>;
#[doc = "Writer for register GPIOD_PUR"]
pub type W = crate::W<u32, super::GPIOD_PUR>;
#[doc = "Register GPIOD_PUR `reset()`'s with value 0"]
impl crate::ResetValue for super::GPIOD_PUR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `PU0`"]
pub type PU0_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU0`"]
pub struct PU0_W<'a> {
w: &'a mut W,
}
impl<'a> PU0_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 `PU1`"]
pub type PU1_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU1`"]
pub struct PU1_W<'a> {
w: &'a mut W,
}
impl<'a> PU1_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 `PU2`"]
pub type PU2_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU2`"]
pub struct PU2_W<'a> {
w: &'a mut W,
}
impl<'a> PU2_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 `PU3`"]
pub type PU3_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU3`"]
pub struct PU3_W<'a> {
w: &'a mut W,
}
impl<'a> PU3_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 `PU4`"]
pub type PU4_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU4`"]
pub struct PU4_W<'a> {
w: &'a mut W,
}
impl<'a> PU4_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 `PU5`"]
pub type PU5_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU5`"]
pub struct PU5_W<'a> {
w: &'a mut W,
}
impl<'a> PU5_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 `PU6`"]
pub type PU6_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU6`"]
pub struct PU6_W<'a> {
w: &'a mut W,
}
impl<'a> PU6_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 `PU7`"]
pub type PU7_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU7`"]
pub struct PU7_W<'a> {
w: &'a mut W,
}
impl<'a> PU7_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 `PU8`"]
pub type PU8_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU8`"]
pub struct PU8_W<'a> {
w: &'a mut W,
}
impl<'a> PU8_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 `PU9`"]
pub type PU9_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU9`"]
pub struct PU9_W<'a> {
w: &'a mut W,
}
impl<'a> PU9_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 << 9)) | (((value as u32) & 0x01) << 9);
self.w
}
}
#[doc = "Reader of field `PU10`"]
pub type PU10_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU10`"]
pub struct PU10_W<'a> {
w: &'a mut W,
}
impl<'a> PU10_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 << 10)) | (((value as u32) & 0x01) << 10);
self.w
}
}
#[doc = "Reader of field `PU11`"]
pub type PU11_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU11`"]
pub struct PU11_W<'a> {
w: &'a mut W,
}
impl<'a> PU11_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 << 11)) | (((value as u32) & 0x01) << 11);
self.w
}
}
#[doc = "Reader of field `PU12`"]
pub type PU12_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU12`"]
pub struct PU12_W<'a> {
w: &'a mut W,
}
impl<'a> PU12_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 << 12)) | (((value as u32) & 0x01) << 12);
self.w
}
}
#[doc = "Reader of field `PU13`"]
pub type PU13_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU13`"]
pub struct PU13_W<'a> {
w: &'a mut W,
}
impl<'a> PU13_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 << 13)) | (((value as u32) & 0x01) << 13);
self.w
}
}
#[doc = "Reader of field `PU14`"]
pub type PU14_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU14`"]
pub struct PU14_W<'a> {
w: &'a mut W,
}
impl<'a> PU14_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 << 14)) | (((value as u32) & 0x01) << 14);
self.w
}
}
#[doc = "Reader of field `PU15`"]
pub type PU15_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PU15`"]
pub struct PU15_W<'a> {
w: &'a mut W,
}
impl<'a> PU15_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 << 15)) | (((value as u32) & 0x01) << 15);
self.w
}
}
impl R {
#[doc = "Bit 0 - PU0"]
#[inline(always)]
pub fn pu0(&self) -> PU0_R {
PU0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - PU1"]
#[inline(always)]
pub fn pu1(&self) -> PU1_R {
PU1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - PU2"]
#[inline(always)]
pub fn pu2(&self) -> PU2_R {
PU2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - PU3"]
#[inline(always)]
pub fn pu3(&self) -> PU3_R {
PU3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - PU4"]
#[inline(always)]
pub fn pu4(&self) -> PU4_R {
PU4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - PU5"]
#[inline(always)]
pub fn pu5(&self) -> PU5_R {
PU5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - PU6"]
#[inline(always)]
pub fn pu6(&self) -> PU6_R {
PU6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - PU7"]
#[inline(always)]
pub fn pu7(&self) -> PU7_R {
PU7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - PU8"]
#[inline(always)]
pub fn pu8(&self) -> PU8_R {
PU8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - PU9"]
#[inline(always)]
pub fn pu9(&self) -> PU9_R {
PU9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - PU10"]
#[inline(always)]
pub fn pu10(&self) -> PU10_R {
PU10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - PU11"]
#[inline(always)]
pub fn pu11(&self) -> PU11_R {
PU11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - PU12"]
#[inline(always)]
pub fn pu12(&self) -> PU12_R {
PU12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - PU13"]
#[inline(always)]
pub fn pu13(&self) -> PU13_R {
PU13_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - PU14"]
#[inline(always)]
pub fn pu14(&self) -> PU14_R {
PU14_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15 - PU15"]
#[inline(always)]
pub fn pu15(&self) -> PU15_R {
PU15_R::new(((self.bits >> 15) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - PU0"]
#[inline(always)]
pub fn pu0(&mut self) -> PU0_W {
PU0_W { w: self }
}
#[doc = "Bit 1 - PU1"]
#[inline(always)]
pub fn pu1(&mut self) -> PU1_W {
PU1_W { w: self }
}
#[doc = "Bit 2 - PU2"]
#[inline(always)]
pub fn pu2(&mut self) -> PU2_W {
PU2_W { w: self }
}
#[doc = "Bit 3 - PU3"]
#[inline(always)]
pub fn pu3(&mut self) -> PU3_W {
PU3_W { w: self }
}
#[doc = "Bit 4 - PU4"]
#[inline(always)]
pub fn pu4(&mut self) -> PU4_W {
PU4_W { w: self }
}
#[doc = "Bit 5 - PU5"]
#[inline(always)]
pub fn pu5(&mut self) -> PU5_W {
PU5_W { w: self }
}
#[doc = "Bit 6 - PU6"]
#[inline(always)]
pub fn pu6(&mut self) -> PU6_W {
PU6_W { w: self }
}
#[doc = "Bit 7 - PU7"]
#[inline(always)]
pub fn pu7(&mut self) -> PU7_W {
PU7_W { w: self }
}
#[doc = "Bit 8 - PU8"]
#[inline(always)]
pub fn pu8(&mut self) -> PU8_W {
PU8_W { w: self }
}
#[doc = "Bit 9 - PU9"]
#[inline(always)]
pub fn pu9(&mut self) -> PU9_W {
PU9_W { w: self }
}
#[doc = "Bit 10 - PU10"]
#[inline(always)]
pub fn pu10(&mut self) -> PU10_W {
PU10_W { w: self }
}
#[doc = "Bit 11 - PU11"]
#[inline(always)]
pub fn pu11(&mut self) -> PU11_W {
PU11_W { w: self }
}
#[doc = "Bit 12 - PU12"]
#[inline(always)]
pub fn pu12(&mut self) -> PU12_W {
PU12_W { w: self }
}
#[doc = "Bit 13 - PU13"]
#[inline(always)]
pub fn pu13(&mut self) -> PU13_W {
PU13_W { w: self }
}
#[doc = "Bit 14 - PU14"]
#[inline(always)]
pub fn pu14(&mut self) -> PU14_W {
PU14_W { w: self }
}
#[doc = "Bit 15 - PU15"]
#[inline(always)]
pub fn pu15(&mut self) -> PU15_W {
PU15_W { w: self }
}
}