#[doc = "Reader of register PCGPIO"]
pub type R = crate::R<u32, super::PCGPIO>;
#[doc = "Writer for register PCGPIO"]
pub type W = crate::W<u32, super::PCGPIO>;
#[doc = "Register PCGPIO `reset()`'s with value 0"]
impl crate::ResetValue for super::PCGPIO {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `P0`"]
pub type P0_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P0`"]
pub struct P0_W<'a> {
w: &'a mut W,
}
impl<'a> P0_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 `P1`"]
pub type P1_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P1`"]
pub struct P1_W<'a> {
w: &'a mut W,
}
impl<'a> P1_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 `P2`"]
pub type P2_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P2`"]
pub struct P2_W<'a> {
w: &'a mut W,
}
impl<'a> P2_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 `P3`"]
pub type P3_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P3`"]
pub struct P3_W<'a> {
w: &'a mut W,
}
impl<'a> P3_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 `P4`"]
pub type P4_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P4`"]
pub struct P4_W<'a> {
w: &'a mut W,
}
impl<'a> P4_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 `P5`"]
pub type P5_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P5`"]
pub struct P5_W<'a> {
w: &'a mut W,
}
impl<'a> P5_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 `P6`"]
pub type P6_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P6`"]
pub struct P6_W<'a> {
w: &'a mut W,
}
impl<'a> P6_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 `P7`"]
pub type P7_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P7`"]
pub struct P7_W<'a> {
w: &'a mut W,
}
impl<'a> P7_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 `P8`"]
pub type P8_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P8`"]
pub struct P8_W<'a> {
w: &'a mut W,
}
impl<'a> P8_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 `P9`"]
pub type P9_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P9`"]
pub struct P9_W<'a> {
w: &'a mut W,
}
impl<'a> P9_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 `P10`"]
pub type P10_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P10`"]
pub struct P10_W<'a> {
w: &'a mut W,
}
impl<'a> P10_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 `P11`"]
pub type P11_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P11`"]
pub struct P11_W<'a> {
w: &'a mut W,
}
impl<'a> P11_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 `P12`"]
pub type P12_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P12`"]
pub struct P12_W<'a> {
w: &'a mut W,
}
impl<'a> P12_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 `P13`"]
pub type P13_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P13`"]
pub struct P13_W<'a> {
w: &'a mut W,
}
impl<'a> P13_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 `P14`"]
pub type P14_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `P14`"]
pub struct P14_W<'a> {
w: &'a mut W,
}
impl<'a> P14_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
}
}
impl R {
#[doc = "Bit 0 - GPIO Port A Power Control"]
#[inline(always)]
pub fn p0(&self) -> P0_R {
P0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - GPIO Port B Power Control"]
#[inline(always)]
pub fn p1(&self) -> P1_R {
P1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - GPIO Port C Power Control"]
#[inline(always)]
pub fn p2(&self) -> P2_R {
P2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - GPIO Port D Power Control"]
#[inline(always)]
pub fn p3(&self) -> P3_R {
P3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - GPIO Port E Power Control"]
#[inline(always)]
pub fn p4(&self) -> P4_R {
P4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - GPIO Port F Power Control"]
#[inline(always)]
pub fn p5(&self) -> P5_R {
P5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - GPIO Port G Power Control"]
#[inline(always)]
pub fn p6(&self) -> P6_R {
P6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - GPIO Port H Power Control"]
#[inline(always)]
pub fn p7(&self) -> P7_R {
P7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - GPIO Port J Power Control"]
#[inline(always)]
pub fn p8(&self) -> P8_R {
P8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - GPIO Port K Power Control"]
#[inline(always)]
pub fn p9(&self) -> P9_R {
P9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - GPIO Port L Power Control"]
#[inline(always)]
pub fn p10(&self) -> P10_R {
P10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - GPIO Port M Power Control"]
#[inline(always)]
pub fn p11(&self) -> P11_R {
P11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - GPIO Port N Power Control"]
#[inline(always)]
pub fn p12(&self) -> P12_R {
P12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - GPIO Port P Power Control"]
#[inline(always)]
pub fn p13(&self) -> P13_R {
P13_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - GPIO Port Q Power Control"]
#[inline(always)]
pub fn p14(&self) -> P14_R {
P14_R::new(((self.bits >> 14) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - GPIO Port A Power Control"]
#[inline(always)]
pub fn p0(&mut self) -> P0_W {
P0_W { w: self }
}
#[doc = "Bit 1 - GPIO Port B Power Control"]
#[inline(always)]
pub fn p1(&mut self) -> P1_W {
P1_W { w: self }
}
#[doc = "Bit 2 - GPIO Port C Power Control"]
#[inline(always)]
pub fn p2(&mut self) -> P2_W {
P2_W { w: self }
}
#[doc = "Bit 3 - GPIO Port D Power Control"]
#[inline(always)]
pub fn p3(&mut self) -> P3_W {
P3_W { w: self }
}
#[doc = "Bit 4 - GPIO Port E Power Control"]
#[inline(always)]
pub fn p4(&mut self) -> P4_W {
P4_W { w: self }
}
#[doc = "Bit 5 - GPIO Port F Power Control"]
#[inline(always)]
pub fn p5(&mut self) -> P5_W {
P5_W { w: self }
}
#[doc = "Bit 6 - GPIO Port G Power Control"]
#[inline(always)]
pub fn p6(&mut self) -> P6_W {
P6_W { w: self }
}
#[doc = "Bit 7 - GPIO Port H Power Control"]
#[inline(always)]
pub fn p7(&mut self) -> P7_W {
P7_W { w: self }
}
#[doc = "Bit 8 - GPIO Port J Power Control"]
#[inline(always)]
pub fn p8(&mut self) -> P8_W {
P8_W { w: self }
}
#[doc = "Bit 9 - GPIO Port K Power Control"]
#[inline(always)]
pub fn p9(&mut self) -> P9_W {
P9_W { w: self }
}
#[doc = "Bit 10 - GPIO Port L Power Control"]
#[inline(always)]
pub fn p10(&mut self) -> P10_W {
P10_W { w: self }
}
#[doc = "Bit 11 - GPIO Port M Power Control"]
#[inline(always)]
pub fn p11(&mut self) -> P11_W {
P11_W { w: self }
}
#[doc = "Bit 12 - GPIO Port N Power Control"]
#[inline(always)]
pub fn p12(&mut self) -> P12_W {
P12_W { w: self }
}
#[doc = "Bit 13 - GPIO Port P Power Control"]
#[inline(always)]
pub fn p13(&mut self) -> P13_W {
P13_W { w: self }
}
#[doc = "Bit 14 - GPIO Port Q Power Control"]
#[inline(always)]
pub fn p14(&mut self) -> P14_W {
P14_W { w: self }
}
}