#[doc = r" Value read from the register"]
pub struct R {
bits: u8,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u8,
}
impl super::PE5 {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
let mut w = W::reset_value();
f(&mut w);
self.register.set(w.bits);
}
#[doc = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = "Possible values of the field `WUPE16`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WUPE16R {
#[doc = "External input pin disabled as wakeup input"]
_00,
#[doc = "External input pin enabled with rising edge detection"]
_01,
#[doc = "External input pin enabled with falling edge detection"]
_10,
#[doc = "External input pin enabled with any change detection"]
_11,
}
impl WUPE16R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
WUPE16R::_00 => 0,
WUPE16R::_01 => 1,
WUPE16R::_10 => 2,
WUPE16R::_11 => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> WUPE16R {
match value {
0 => WUPE16R::_00,
1 => WUPE16R::_01,
2 => WUPE16R::_10,
3 => WUPE16R::_11,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `_00`"]
#[inline]
pub fn is_00(&self) -> bool {
*self == WUPE16R::_00
}
#[doc = "Checks if the value of the field is `_01`"]
#[inline]
pub fn is_01(&self) -> bool {
*self == WUPE16R::_01
}
#[doc = "Checks if the value of the field is `_10`"]
#[inline]
pub fn is_10(&self) -> bool {
*self == WUPE16R::_10
}
#[doc = "Checks if the value of the field is `_11`"]
#[inline]
pub fn is_11(&self) -> bool {
*self == WUPE16R::_11
}
}
#[doc = "Possible values of the field `WUPE17`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WUPE17R {
#[doc = "External input pin disabled as wakeup input"]
_00,
#[doc = "External input pin enabled with rising edge detection"]
_01,
#[doc = "External input pin enabled with falling edge detection"]
_10,
#[doc = "External input pin enabled with any change detection"]
_11,
}
impl WUPE17R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
WUPE17R::_00 => 0,
WUPE17R::_01 => 1,
WUPE17R::_10 => 2,
WUPE17R::_11 => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> WUPE17R {
match value {
0 => WUPE17R::_00,
1 => WUPE17R::_01,
2 => WUPE17R::_10,
3 => WUPE17R::_11,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `_00`"]
#[inline]
pub fn is_00(&self) -> bool {
*self == WUPE17R::_00
}
#[doc = "Checks if the value of the field is `_01`"]
#[inline]
pub fn is_01(&self) -> bool {
*self == WUPE17R::_01
}
#[doc = "Checks if the value of the field is `_10`"]
#[inline]
pub fn is_10(&self) -> bool {
*self == WUPE17R::_10
}
#[doc = "Checks if the value of the field is `_11`"]
#[inline]
pub fn is_11(&self) -> bool {
*self == WUPE17R::_11
}
}
#[doc = "Possible values of the field `WUPE18`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WUPE18R {
#[doc = "External input pin disabled as wakeup input"]
_00,
#[doc = "External input pin enabled with rising edge detection"]
_01,
#[doc = "External input pin enabled with falling edge detection"]
_10,
#[doc = "External input pin enabled with any change detection"]
_11,
}
impl WUPE18R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
WUPE18R::_00 => 0,
WUPE18R::_01 => 1,
WUPE18R::_10 => 2,
WUPE18R::_11 => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> WUPE18R {
match value {
0 => WUPE18R::_00,
1 => WUPE18R::_01,
2 => WUPE18R::_10,
3 => WUPE18R::_11,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `_00`"]
#[inline]
pub fn is_00(&self) -> bool {
*self == WUPE18R::_00
}
#[doc = "Checks if the value of the field is `_01`"]
#[inline]
pub fn is_01(&self) -> bool {
*self == WUPE18R::_01
}
#[doc = "Checks if the value of the field is `_10`"]
#[inline]
pub fn is_10(&self) -> bool {
*self == WUPE18R::_10
}
#[doc = "Checks if the value of the field is `_11`"]
#[inline]
pub fn is_11(&self) -> bool {
*self == WUPE18R::_11
}
}
#[doc = "Possible values of the field `WUPE19`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WUPE19R {
#[doc = "External input pin disabled as wakeup input"]
_00,
#[doc = "External input pin enabled with rising edge detection"]
_01,
#[doc = "External input pin enabled with falling edge detection"]
_10,
#[doc = "External input pin enabled with any change detection"]
_11,
}
impl WUPE19R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
WUPE19R::_00 => 0,
WUPE19R::_01 => 1,
WUPE19R::_10 => 2,
WUPE19R::_11 => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> WUPE19R {
match value {
0 => WUPE19R::_00,
1 => WUPE19R::_01,
2 => WUPE19R::_10,
3 => WUPE19R::_11,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `_00`"]
#[inline]
pub fn is_00(&self) -> bool {
*self == WUPE19R::_00
}
#[doc = "Checks if the value of the field is `_01`"]
#[inline]
pub fn is_01(&self) -> bool {
*self == WUPE19R::_01
}
#[doc = "Checks if the value of the field is `_10`"]
#[inline]
pub fn is_10(&self) -> bool {
*self == WUPE19R::_10
}
#[doc = "Checks if the value of the field is `_11`"]
#[inline]
pub fn is_11(&self) -> bool {
*self == WUPE19R::_11
}
}
#[doc = "Values that can be written to the field `WUPE16`"]
pub enum WUPE16W {
#[doc = "External input pin disabled as wakeup input"]
_00,
#[doc = "External input pin enabled with rising edge detection"]
_01,
#[doc = "External input pin enabled with falling edge detection"]
_10,
#[doc = "External input pin enabled with any change detection"]
_11,
}
impl WUPE16W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
WUPE16W::_00 => 0,
WUPE16W::_01 => 1,
WUPE16W::_10 => 2,
WUPE16W::_11 => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _WUPE16W<'a> {
w: &'a mut W,
}
impl<'a> _WUPE16W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: WUPE16W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "External input pin disabled as wakeup input"]
#[inline]
pub fn _00(self) -> &'a mut W {
self.variant(WUPE16W::_00)
}
#[doc = "External input pin enabled with rising edge detection"]
#[inline]
pub fn _01(self) -> &'a mut W {
self.variant(WUPE16W::_01)
}
#[doc = "External input pin enabled with falling edge detection"]
#[inline]
pub fn _10(self) -> &'a mut W {
self.variant(WUPE16W::_10)
}
#[doc = "External input pin enabled with any change detection"]
#[inline]
pub fn _11(self) -> &'a mut W {
self.variant(WUPE16W::_11)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 0;
self.w.bits &= !((MASK as u8) << OFFSET);
self.w.bits |= ((value & MASK) as u8) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `WUPE17`"]
pub enum WUPE17W {
#[doc = "External input pin disabled as wakeup input"]
_00,
#[doc = "External input pin enabled with rising edge detection"]
_01,
#[doc = "External input pin enabled with falling edge detection"]
_10,
#[doc = "External input pin enabled with any change detection"]
_11,
}
impl WUPE17W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
WUPE17W::_00 => 0,
WUPE17W::_01 => 1,
WUPE17W::_10 => 2,
WUPE17W::_11 => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _WUPE17W<'a> {
w: &'a mut W,
}
impl<'a> _WUPE17W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: WUPE17W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "External input pin disabled as wakeup input"]
#[inline]
pub fn _00(self) -> &'a mut W {
self.variant(WUPE17W::_00)
}
#[doc = "External input pin enabled with rising edge detection"]
#[inline]
pub fn _01(self) -> &'a mut W {
self.variant(WUPE17W::_01)
}
#[doc = "External input pin enabled with falling edge detection"]
#[inline]
pub fn _10(self) -> &'a mut W {
self.variant(WUPE17W::_10)
}
#[doc = "External input pin enabled with any change detection"]
#[inline]
pub fn _11(self) -> &'a mut W {
self.variant(WUPE17W::_11)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 2;
self.w.bits &= !((MASK as u8) << OFFSET);
self.w.bits |= ((value & MASK) as u8) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `WUPE18`"]
pub enum WUPE18W {
#[doc = "External input pin disabled as wakeup input"]
_00,
#[doc = "External input pin enabled with rising edge detection"]
_01,
#[doc = "External input pin enabled with falling edge detection"]
_10,
#[doc = "External input pin enabled with any change detection"]
_11,
}
impl WUPE18W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
WUPE18W::_00 => 0,
WUPE18W::_01 => 1,
WUPE18W::_10 => 2,
WUPE18W::_11 => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _WUPE18W<'a> {
w: &'a mut W,
}
impl<'a> _WUPE18W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: WUPE18W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "External input pin disabled as wakeup input"]
#[inline]
pub fn _00(self) -> &'a mut W {
self.variant(WUPE18W::_00)
}
#[doc = "External input pin enabled with rising edge detection"]
#[inline]
pub fn _01(self) -> &'a mut W {
self.variant(WUPE18W::_01)
}
#[doc = "External input pin enabled with falling edge detection"]
#[inline]
pub fn _10(self) -> &'a mut W {
self.variant(WUPE18W::_10)
}
#[doc = "External input pin enabled with any change detection"]
#[inline]
pub fn _11(self) -> &'a mut W {
self.variant(WUPE18W::_11)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 4;
self.w.bits &= !((MASK as u8) << OFFSET);
self.w.bits |= ((value & MASK) as u8) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `WUPE19`"]
pub enum WUPE19W {
#[doc = "External input pin disabled as wakeup input"]
_00,
#[doc = "External input pin enabled with rising edge detection"]
_01,
#[doc = "External input pin enabled with falling edge detection"]
_10,
#[doc = "External input pin enabled with any change detection"]
_11,
}
impl WUPE19W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
WUPE19W::_00 => 0,
WUPE19W::_01 => 1,
WUPE19W::_10 => 2,
WUPE19W::_11 => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _WUPE19W<'a> {
w: &'a mut W,
}
impl<'a> _WUPE19W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: WUPE19W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "External input pin disabled as wakeup input"]
#[inline]
pub fn _00(self) -> &'a mut W {
self.variant(WUPE19W::_00)
}
#[doc = "External input pin enabled with rising edge detection"]
#[inline]
pub fn _01(self) -> &'a mut W {
self.variant(WUPE19W::_01)
}
#[doc = "External input pin enabled with falling edge detection"]
#[inline]
pub fn _10(self) -> &'a mut W {
self.variant(WUPE19W::_10)
}
#[doc = "External input pin enabled with any change detection"]
#[inline]
pub fn _11(self) -> &'a mut W {
self.variant(WUPE19W::_11)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 6;
self.w.bits &= !((MASK as u8) << OFFSET);
self.w.bits |= ((value & MASK) as u8) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
#[doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P16"]
#[inline]
pub fn wupe16(&self) -> WUPE16R {
WUPE16R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u8) as u8
})
}
#[doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P17"]
#[inline]
pub fn wupe17(&self) -> WUPE17R {
WUPE17R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u8) as u8
})
}
#[doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P18"]
#[inline]
pub fn wupe18(&self) -> WUPE18R {
WUPE18R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u8) as u8
})
}
#[doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P19"]
#[inline]
pub fn wupe19(&self) -> WUPE19R {
WUPE19R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u8) as u8
})
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 0 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P16"]
#[inline]
pub fn wupe16(&mut self) -> _WUPE16W {
_WUPE16W { w: self }
}
#[doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P17"]
#[inline]
pub fn wupe17(&mut self) -> _WUPE17W {
_WUPE17W { w: self }
}
#[doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P18"]
#[inline]
pub fn wupe18(&mut self) -> _WUPE18W {
_WUPE18W { w: self }
}
#[doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P19"]
#[inline]
pub fn wupe19(&mut self) -> _WUPE19W {
_WUPE19W { w: self }
}
}