#[doc = "Reader of register PDISC"]
pub type R = crate::R<u32, super::PDISC>;
#[doc = "Pad Disable for Port 1 Pin 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PDIS0_A {
#[doc = "0: Pad P1.x is enabled."]
VALUE1,
#[doc = "1: Pad P1.x is disabled."]
VALUE2,
}
impl From<PDIS0_A> for bool {
#[inline(always)]
fn from(variant: PDIS0_A) -> Self {
match variant {
PDIS0_A::VALUE1 => false,
PDIS0_A::VALUE2 => true,
}
}
}
#[doc = "Reader of field `PDIS0`"]
pub type PDIS0_R = crate::R<bool, PDIS0_A>;
impl PDIS0_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PDIS0_A {
match self.bits {
false => PDIS0_A::VALUE1,
true => PDIS0_A::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline(always)]
pub fn is_value1(&self) -> bool {
*self == PDIS0_A::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline(always)]
pub fn is_value2(&self) -> bool {
*self == PDIS0_A::VALUE2
}
}
#[doc = "Pad Disable for Port 1 Pin 1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PDIS1_A {
#[doc = "0: Pad P1.x is enabled."]
VALUE1,
#[doc = "1: Pad P1.x is disabled."]
VALUE2,
}
impl From<PDIS1_A> for bool {
#[inline(always)]
fn from(variant: PDIS1_A) -> Self {
match variant {
PDIS1_A::VALUE1 => false,
PDIS1_A::VALUE2 => true,
}
}
}
#[doc = "Reader of field `PDIS1`"]
pub type PDIS1_R = crate::R<bool, PDIS1_A>;
impl PDIS1_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PDIS1_A {
match self.bits {
false => PDIS1_A::VALUE1,
true => PDIS1_A::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline(always)]
pub fn is_value1(&self) -> bool {
*self == PDIS1_A::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline(always)]
pub fn is_value2(&self) -> bool {
*self == PDIS1_A::VALUE2
}
}
#[doc = "Pad Disable for Port 1 Pin 2\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PDIS2_A {
#[doc = "0: Pad P1.x is enabled."]
VALUE1,
#[doc = "1: Pad P1.x is disabled."]
VALUE2,
}
impl From<PDIS2_A> for bool {
#[inline(always)]
fn from(variant: PDIS2_A) -> Self {
match variant {
PDIS2_A::VALUE1 => false,
PDIS2_A::VALUE2 => true,
}
}
}
#[doc = "Reader of field `PDIS2`"]
pub type PDIS2_R = crate::R<bool, PDIS2_A>;
impl PDIS2_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PDIS2_A {
match self.bits {
false => PDIS2_A::VALUE1,
true => PDIS2_A::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline(always)]
pub fn is_value1(&self) -> bool {
*self == PDIS2_A::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline(always)]
pub fn is_value2(&self) -> bool {
*self == PDIS2_A::VALUE2
}
}
#[doc = "Pad Disable for Port 1 Pin 3\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PDIS3_A {
#[doc = "0: Pad P1.x is enabled."]
VALUE1,
#[doc = "1: Pad P1.x is disabled."]
VALUE2,
}
impl From<PDIS3_A> for bool {
#[inline(always)]
fn from(variant: PDIS3_A) -> Self {
match variant {
PDIS3_A::VALUE1 => false,
PDIS3_A::VALUE2 => true,
}
}
}
#[doc = "Reader of field `PDIS3`"]
pub type PDIS3_R = crate::R<bool, PDIS3_A>;
impl PDIS3_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PDIS3_A {
match self.bits {
false => PDIS3_A::VALUE1,
true => PDIS3_A::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline(always)]
pub fn is_value1(&self) -> bool {
*self == PDIS3_A::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline(always)]
pub fn is_value2(&self) -> bool {
*self == PDIS3_A::VALUE2
}
}
#[doc = "Pad Disable for Port 1 Pin 4\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PDIS4_A {
#[doc = "0: Pad P1.x is enabled."]
VALUE1,
#[doc = "1: Pad P1.x is disabled."]
VALUE2,
}
impl From<PDIS4_A> for bool {
#[inline(always)]
fn from(variant: PDIS4_A) -> Self {
match variant {
PDIS4_A::VALUE1 => false,
PDIS4_A::VALUE2 => true,
}
}
}
#[doc = "Reader of field `PDIS4`"]
pub type PDIS4_R = crate::R<bool, PDIS4_A>;
impl PDIS4_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PDIS4_A {
match self.bits {
false => PDIS4_A::VALUE1,
true => PDIS4_A::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline(always)]
pub fn is_value1(&self) -> bool {
*self == PDIS4_A::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline(always)]
pub fn is_value2(&self) -> bool {
*self == PDIS4_A::VALUE2
}
}
#[doc = "Pad Disable for Port 1 Pin 5\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PDIS5_A {
#[doc = "0: Pad P1.x is enabled."]
VALUE1,
#[doc = "1: Pad P1.x is disabled."]
VALUE2,
}
impl From<PDIS5_A> for bool {
#[inline(always)]
fn from(variant: PDIS5_A) -> Self {
match variant {
PDIS5_A::VALUE1 => false,
PDIS5_A::VALUE2 => true,
}
}
}
#[doc = "Reader of field `PDIS5`"]
pub type PDIS5_R = crate::R<bool, PDIS5_A>;
impl PDIS5_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PDIS5_A {
match self.bits {
false => PDIS5_A::VALUE1,
true => PDIS5_A::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline(always)]
pub fn is_value1(&self) -> bool {
*self == PDIS5_A::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline(always)]
pub fn is_value2(&self) -> bool {
*self == PDIS5_A::VALUE2
}
}
#[doc = "Pad Disable for Port 1 Pin 6\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PDIS6_A {
#[doc = "0: Pad P1.x is enabled."]
VALUE1,
#[doc = "1: Pad P1.x is disabled."]
VALUE2,
}
impl From<PDIS6_A> for bool {
#[inline(always)]
fn from(variant: PDIS6_A) -> Self {
match variant {
PDIS6_A::VALUE1 => false,
PDIS6_A::VALUE2 => true,
}
}
}
#[doc = "Reader of field `PDIS6`"]
pub type PDIS6_R = crate::R<bool, PDIS6_A>;
impl PDIS6_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PDIS6_A {
match self.bits {
false => PDIS6_A::VALUE1,
true => PDIS6_A::VALUE2,
}
}
#[doc = "Checks if the value of the field is `VALUE1`"]
#[inline(always)]
pub fn is_value1(&self) -> bool {
*self == PDIS6_A::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline(always)]
pub fn is_value2(&self) -> bool {
*self == PDIS6_A::VALUE2
}
}
impl R {
#[doc = "Bit 0 - Pad Disable for Port 1 Pin 0"]
#[inline(always)]
pub fn pdis0(&self) -> PDIS0_R {
PDIS0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Pad Disable for Port 1 Pin 1"]
#[inline(always)]
pub fn pdis1(&self) -> PDIS1_R {
PDIS1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Pad Disable for Port 1 Pin 2"]
#[inline(always)]
pub fn pdis2(&self) -> PDIS2_R {
PDIS2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Pad Disable for Port 1 Pin 3"]
#[inline(always)]
pub fn pdis3(&self) -> PDIS3_R {
PDIS3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Pad Disable for Port 1 Pin 4"]
#[inline(always)]
pub fn pdis4(&self) -> PDIS4_R {
PDIS4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Pad Disable for Port 1 Pin 5"]
#[inline(always)]
pub fn pdis5(&self) -> PDIS5_R {
PDIS5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Pad Disable for Port 1 Pin 6"]
#[inline(always)]
pub fn pdis6(&self) -> PDIS6_R {
PDIS6_R::new(((self.bits >> 6) & 0x01) != 0)
}
}