#[doc = "Reader of register STARTERP1"]
pub type R = crate::R<u32, super::STARTERP1>;
#[doc = "Writer for register STARTERP1"]
pub type W = crate::W<u32, super::STARTERP1>;
#[doc = "Register STARTERP1 `reset()`'s with value 0"]
impl crate::ResetValue for super::STARTERP1 {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "SPI0 interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SPI0_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<SPI0_A> for bool {
#[inline(always)]
fn from(variant: SPI0_A) -> Self {
match variant {
SPI0_A::DISABLED => false,
SPI0_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `SPI0`"]
pub type SPI0_R = crate::R<bool, SPI0_A>;
impl SPI0_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SPI0_A {
match self.bits {
false => SPI0_A::DISABLED,
true => SPI0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SPI0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SPI0_A::ENABLED
}
}
#[doc = "Write proxy for field `SPI0`"]
pub struct SPI0_W<'a> {
w: &'a mut W,
}
impl<'a> SPI0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SPI0_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(SPI0_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(SPI0_A::ENABLED)
}
#[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 = "SPI1 interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SPI1_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<SPI1_A> for bool {
#[inline(always)]
fn from(variant: SPI1_A) -> Self {
match variant {
SPI1_A::DISABLED => false,
SPI1_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `SPI1`"]
pub type SPI1_R = crate::R<bool, SPI1_A>;
impl SPI1_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SPI1_A {
match self.bits {
false => SPI1_A::DISABLED,
true => SPI1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SPI1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SPI1_A::ENABLED
}
}
#[doc = "Write proxy for field `SPI1`"]
pub struct SPI1_W<'a> {
w: &'a mut W,
}
impl<'a> SPI1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SPI1_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(SPI1_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(SPI1_A::ENABLED)
}
#[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 = "USART0 interrupt wake-up. Configure USART in synchronous slave mode.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART0_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<USART0_A> for bool {
#[inline(always)]
fn from(variant: USART0_A) -> Self {
match variant {
USART0_A::DISABLED => false,
USART0_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `USART0`"]
pub type USART0_R = crate::R<bool, USART0_A>;
impl USART0_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> USART0_A {
match self.bits {
false => USART0_A::DISABLED,
true => USART0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == USART0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == USART0_A::ENABLED
}
}
#[doc = "Write proxy for field `USART0`"]
pub struct USART0_W<'a> {
w: &'a mut W,
}
impl<'a> USART0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: USART0_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(USART0_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(USART0_A::ENABLED)
}
#[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 = "USART1 interrupt wake-up. Configure USART in synchronous slave mode.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART1_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<USART1_A> for bool {
#[inline(always)]
fn from(variant: USART1_A) -> Self {
match variant {
USART1_A::DISABLED => false,
USART1_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `USART1`"]
pub type USART1_R = crate::R<bool, USART1_A>;
impl USART1_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> USART1_A {
match self.bits {
false => USART1_A::DISABLED,
true => USART1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == USART1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == USART1_A::ENABLED
}
}
#[doc = "Write proxy for field `USART1`"]
pub struct USART1_W<'a> {
w: &'a mut W,
}
impl<'a> USART1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: USART1_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(USART1_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(USART1_A::ENABLED)
}
#[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 = "USART2 interrupt wake-up. Configure USART in synchronous slave mode.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum USART2_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<USART2_A> for bool {
#[inline(always)]
fn from(variant: USART2_A) -> Self {
match variant {
USART2_A::DISABLED => false,
USART2_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `USART2`"]
pub type USART2_R = crate::R<bool, USART2_A>;
impl USART2_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> USART2_A {
match self.bits {
false => USART2_A::DISABLED,
true => USART2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == USART2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == USART2_A::ENABLED
}
}
#[doc = "Write proxy for field `USART2`"]
pub struct USART2_W<'a> {
w: &'a mut W,
}
impl<'a> USART2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: USART2_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(USART2_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(USART2_A::ENABLED)
}
#[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 = "I2C1 interrupt wake-up.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C1_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<I2C1_A> for bool {
#[inline(always)]
fn from(variant: I2C1_A) -> Self {
match variant {
I2C1_A::DISABLED => false,
I2C1_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `I2C1`"]
pub type I2C1_R = crate::R<bool, I2C1_A>;
impl I2C1_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> I2C1_A {
match self.bits {
false => I2C1_A::DISABLED,
true => I2C1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == I2C1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == I2C1_A::ENABLED
}
}
#[doc = "Write proxy for field `I2C1`"]
pub struct I2C1_W<'a> {
w: &'a mut W,
}
impl<'a> I2C1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C1_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(I2C1_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(I2C1_A::ENABLED)
}
#[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 = "I2C0 interrupt wake-up.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C0_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<I2C0_A> for bool {
#[inline(always)]
fn from(variant: I2C0_A) -> Self {
match variant {
I2C0_A::DISABLED => false,
I2C0_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `I2C0`"]
pub type I2C0_R = crate::R<bool, I2C0_A>;
impl I2C0_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> I2C0_A {
match self.bits {
false => I2C0_A::DISABLED,
true => I2C0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == I2C0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == I2C0_A::ENABLED
}
}
#[doc = "Write proxy for field `I2C0`"]
pub struct I2C0_W<'a> {
w: &'a mut W,
}
impl<'a> I2C0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C0_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(I2C0_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(I2C0_A::ENABLED)
}
#[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 = "Cap Touch interrupt wake-up.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CAP_TOUCH_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<CAP_TOUCH_A> for bool {
#[inline(always)]
fn from(variant: CAP_TOUCH_A) -> Self {
match variant {
CAP_TOUCH_A::DISABLED => false,
CAP_TOUCH_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `Cap_Touch`"]
pub type CAP_TOUCH_R = crate::R<bool, CAP_TOUCH_A>;
impl CAP_TOUCH_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CAP_TOUCH_A {
match self.bits {
false => CAP_TOUCH_A::DISABLED,
true => CAP_TOUCH_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CAP_TOUCH_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CAP_TOUCH_A::ENABLED
}
}
#[doc = "Write proxy for field `Cap_Touch`"]
pub struct CAP_TOUCH_W<'a> {
w: &'a mut W,
}
impl<'a> CAP_TOUCH_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CAP_TOUCH_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CAP_TOUCH_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CAP_TOUCH_A::ENABLED)
}
#[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 = "WWDT interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WWDT_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<WWDT_A> for bool {
#[inline(always)]
fn from(variant: WWDT_A) -> Self {
match variant {
WWDT_A::DISABLED => false,
WWDT_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `WWDT`"]
pub type WWDT_R = crate::R<bool, WWDT_A>;
impl WWDT_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> WWDT_A {
match self.bits {
false => WWDT_A::DISABLED,
true => WWDT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == WWDT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == WWDT_A::ENABLED
}
}
#[doc = "Write proxy for field `WWDT`"]
pub struct WWDT_W<'a> {
w: &'a mut W,
}
impl<'a> WWDT_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: WWDT_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(WWDT_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(WWDT_A::ENABLED)
}
#[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 = "BOD interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BOD_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<BOD_A> for bool {
#[inline(always)]
fn from(variant: BOD_A) -> Self {
match variant {
BOD_A::DISABLED => false,
BOD_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `BOD`"]
pub type BOD_R = crate::R<bool, BOD_A>;
impl BOD_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> BOD_A {
match self.bits {
false => BOD_A::DISABLED,
true => BOD_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == BOD_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == BOD_A::ENABLED
}
}
#[doc = "Write proxy for field `BOD`"]
pub struct BOD_W<'a> {
w: &'a mut W,
}
impl<'a> BOD_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BOD_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(BOD_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(BOD_A::ENABLED)
}
#[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 = "Self-wake-up timer interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WKT_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<WKT_A> for bool {
#[inline(always)]
fn from(variant: WKT_A) -> Self {
match variant {
WKT_A::DISABLED => false,
WKT_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `WKT`"]
pub type WKT_R = crate::R<bool, WKT_A>;
impl WKT_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> WKT_A {
match self.bits {
false => WKT_A::DISABLED,
true => WKT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == WKT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == WKT_A::ENABLED
}
}
#[doc = "Write proxy for field `WKT`"]
pub struct WKT_W<'a> {
w: &'a mut W,
}
impl<'a> WKT_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: WKT_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(WKT_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(WKT_A::ENABLED)
}
#[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
}
}
#[doc = "I2C2 interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C2_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<I2C2_A> for bool {
#[inline(always)]
fn from(variant: I2C2_A) -> Self {
match variant {
I2C2_A::DISABLED => false,
I2C2_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `I2C2`"]
pub type I2C2_R = crate::R<bool, I2C2_A>;
impl I2C2_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> I2C2_A {
match self.bits {
false => I2C2_A::DISABLED,
true => I2C2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == I2C2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == I2C2_A::ENABLED
}
}
#[doc = "Write proxy for field `I2C2`"]
pub struct I2C2_W<'a> {
w: &'a mut W,
}
impl<'a> I2C2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C2_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(I2C2_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(I2C2_A::ENABLED)
}
#[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 = "I2C3 interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum I2C3_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<I2C3_A> for bool {
#[inline(always)]
fn from(variant: I2C3_A) -> Self {
match variant {
I2C3_A::DISABLED => false,
I2C3_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `I2C3`"]
pub type I2C3_R = crate::R<bool, I2C3_A>;
impl I2C3_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> I2C3_A {
match self.bits {
false => I2C3_A::DISABLED,
true => I2C3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == I2C3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == I2C3_A::ENABLED
}
}
#[doc = "Write proxy for field `I2C3`"]
pub struct I2C3_W<'a> {
w: &'a mut W,
}
impl<'a> I2C3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: I2C3_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(I2C3_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(I2C3_A::ENABLED)
}
#[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 = "UART3 interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UART3_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<UART3_A> for bool {
#[inline(always)]
fn from(variant: UART3_A) -> Self {
match variant {
UART3_A::DISABLED => false,
UART3_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `UART3`"]
pub type UART3_R = crate::R<bool, UART3_A>;
impl UART3_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UART3_A {
match self.bits {
false => UART3_A::DISABLED,
true => UART3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == UART3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == UART3_A::ENABLED
}
}
#[doc = "Write proxy for field `UART3`"]
pub struct UART3_W<'a> {
w: &'a mut W,
}
impl<'a> UART3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: UART3_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(UART3_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(UART3_A::ENABLED)
}
#[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 << 30)) | (((value as u32) & 0x01) << 30);
self.w
}
}
#[doc = "UART4 interrupt wake-up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UART4_A {
#[doc = "0: Disabled"]
DISABLED,
#[doc = "1: Enabled"]
ENABLED,
}
impl From<UART4_A> for bool {
#[inline(always)]
fn from(variant: UART4_A) -> Self {
match variant {
UART4_A::DISABLED => false,
UART4_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `UART4`"]
pub type UART4_R = crate::R<bool, UART4_A>;
impl UART4_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UART4_A {
match self.bits {
false => UART4_A::DISABLED,
true => UART4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == UART4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == UART4_A::ENABLED
}
}
#[doc = "Write proxy for field `UART4`"]
pub struct UART4_W<'a> {
w: &'a mut W,
}
impl<'a> UART4_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: UART4_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(UART4_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(UART4_A::ENABLED)
}
#[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 << 31)) | (((value as u32) & 0x01) << 31);
self.w
}
}
impl R {
#[doc = "Bit 0 - SPI0 interrupt wake-up"]
#[inline(always)]
pub fn spi0(&self) -> SPI0_R {
SPI0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - SPI1 interrupt wake-up"]
#[inline(always)]
pub fn spi1(&self) -> SPI1_R {
SPI1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 3 - USART0 interrupt wake-up. Configure USART in synchronous slave mode."]
#[inline(always)]
pub fn usart0(&self) -> USART0_R {
USART0_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - USART1 interrupt wake-up. Configure USART in synchronous slave mode."]
#[inline(always)]
pub fn usart1(&self) -> USART1_R {
USART1_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - USART2 interrupt wake-up. Configure USART in synchronous slave mode."]
#[inline(always)]
pub fn usart2(&self) -> USART2_R {
USART2_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 7 - I2C1 interrupt wake-up."]
#[inline(always)]
pub fn i2c1(&self) -> I2C1_R {
I2C1_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - I2C0 interrupt wake-up."]
#[inline(always)]
pub fn i2c0(&self) -> I2C0_R {
I2C0_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 11 - Cap Touch interrupt wake-up."]
#[inline(always)]
pub fn cap_touch(&self) -> CAP_TOUCH_R {
CAP_TOUCH_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - WWDT interrupt wake-up"]
#[inline(always)]
pub fn wwdt(&self) -> WWDT_R {
WWDT_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - BOD interrupt wake-up"]
#[inline(always)]
pub fn bod(&self) -> BOD_R {
BOD_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 15 - Self-wake-up timer interrupt wake-up"]
#[inline(always)]
pub fn wkt(&self) -> WKT_R {
WKT_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 21 - I2C2 interrupt wake-up"]
#[inline(always)]
pub fn i2c2(&self) -> I2C2_R {
I2C2_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22 - I2C3 interrupt wake-up"]
#[inline(always)]
pub fn i2c3(&self) -> I2C3_R {
I2C3_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 30 - UART3 interrupt wake-up"]
#[inline(always)]
pub fn uart3(&self) -> UART3_R {
UART3_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 31 - UART4 interrupt wake-up"]
#[inline(always)]
pub fn uart4(&self) -> UART4_R {
UART4_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - SPI0 interrupt wake-up"]
#[inline(always)]
pub fn spi0(&mut self) -> SPI0_W {
SPI0_W { w: self }
}
#[doc = "Bit 1 - SPI1 interrupt wake-up"]
#[inline(always)]
pub fn spi1(&mut self) -> SPI1_W {
SPI1_W { w: self }
}
#[doc = "Bit 3 - USART0 interrupt wake-up. Configure USART in synchronous slave mode."]
#[inline(always)]
pub fn usart0(&mut self) -> USART0_W {
USART0_W { w: self }
}
#[doc = "Bit 4 - USART1 interrupt wake-up. Configure USART in synchronous slave mode."]
#[inline(always)]
pub fn usart1(&mut self) -> USART1_W {
USART1_W { w: self }
}
#[doc = "Bit 5 - USART2 interrupt wake-up. Configure USART in synchronous slave mode."]
#[inline(always)]
pub fn usart2(&mut self) -> USART2_W {
USART2_W { w: self }
}
#[doc = "Bit 7 - I2C1 interrupt wake-up."]
#[inline(always)]
pub fn i2c1(&mut self) -> I2C1_W {
I2C1_W { w: self }
}
#[doc = "Bit 8 - I2C0 interrupt wake-up."]
#[inline(always)]
pub fn i2c0(&mut self) -> I2C0_W {
I2C0_W { w: self }
}
#[doc = "Bit 11 - Cap Touch interrupt wake-up."]
#[inline(always)]
pub fn cap_touch(&mut self) -> CAP_TOUCH_W {
CAP_TOUCH_W { w: self }
}
#[doc = "Bit 12 - WWDT interrupt wake-up"]
#[inline(always)]
pub fn wwdt(&mut self) -> WWDT_W {
WWDT_W { w: self }
}
#[doc = "Bit 13 - BOD interrupt wake-up"]
#[inline(always)]
pub fn bod(&mut self) -> BOD_W {
BOD_W { w: self }
}
#[doc = "Bit 15 - Self-wake-up timer interrupt wake-up"]
#[inline(always)]
pub fn wkt(&mut self) -> WKT_W {
WKT_W { w: self }
}
#[doc = "Bit 21 - I2C2 interrupt wake-up"]
#[inline(always)]
pub fn i2c2(&mut self) -> I2C2_W {
I2C2_W { w: self }
}
#[doc = "Bit 22 - I2C3 interrupt wake-up"]
#[inline(always)]
pub fn i2c3(&mut self) -> I2C3_W {
I2C3_W { w: self }
}
#[doc = "Bit 30 - UART3 interrupt wake-up"]
#[inline(always)]
pub fn uart3(&mut self) -> UART3_W {
UART3_W { w: self }
}
#[doc = "Bit 31 - UART4 interrupt wake-up"]
#[inline(always)]
pub fn uart4(&mut self) -> UART4_W {
UART4_W { w: self }
}
}