#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::PUPDR {
#[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 `PUPD15`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PUPD15R {
#[doc = "No pull-up, pull-down"]
FLOATING,
#[doc = "Pull-up"]
PULLUP,
#[doc = "Pull-down"]
PULLDOWN,
#[doc = r" Reserved"]
_Reserved(u8),
}
impl PUPD15R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
PUPD15R::FLOATING => 0,
PUPD15R::PULLUP => 1,
PUPD15R::PULLDOWN => 2,
PUPD15R::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> PUPD15R {
match value {
0 => PUPD15R::FLOATING,
1 => PUPD15R::PULLUP,
2 => PUPD15R::PULLDOWN,
i => PUPD15R::_Reserved(i),
}
}
#[doc = "Checks if the value of the field is `FLOATING`"]
#[inline]
pub fn is_floating(&self) -> bool {
*self == PUPD15R::FLOATING
}
#[doc = "Checks if the value of the field is `PULLUP`"]
#[inline]
pub fn is_pull_up(&self) -> bool {
*self == PUPD15R::PULLUP
}
#[doc = "Checks if the value of the field is `PULLDOWN`"]
#[inline]
pub fn is_pull_down(&self) -> bool {
*self == PUPD15R::PULLDOWN
}
}
#[doc = "Possible values of the field `PUPD14`"]
pub type PUPD14R = PUPD15R;
#[doc = "Possible values of the field `PUPD13`"]
pub type PUPD13R = PUPD15R;
#[doc = "Possible values of the field `PUPD12`"]
pub type PUPD12R = PUPD15R;
#[doc = "Possible values of the field `PUPD11`"]
pub type PUPD11R = PUPD15R;
#[doc = "Possible values of the field `PUPD10`"]
pub type PUPD10R = PUPD15R;
#[doc = "Possible values of the field `PUPD9`"]
pub type PUPD9R = PUPD15R;
#[doc = "Possible values of the field `PUPD8`"]
pub type PUPD8R = PUPD15R;
#[doc = "Possible values of the field `PUPD7`"]
pub type PUPD7R = PUPD15R;
#[doc = "Possible values of the field `PUPD6`"]
pub type PUPD6R = PUPD15R;
#[doc = "Possible values of the field `PUPD5`"]
pub type PUPD5R = PUPD15R;
#[doc = "Possible values of the field `PUPD4`"]
pub type PUPD4R = PUPD15R;
#[doc = "Possible values of the field `PUPD3`"]
pub type PUPD3R = PUPD15R;
#[doc = "Possible values of the field `PUPD2`"]
pub type PUPD2R = PUPD15R;
#[doc = "Possible values of the field `PUPD1`"]
pub type PUPD1R = PUPD15R;
#[doc = "Possible values of the field `PUPD0`"]
pub type PUPD0R = PUPD15R;
#[doc = "Values that can be written to the field `PUPD15`"]
pub enum PUPD15W {
#[doc = "No pull-up, pull-down"]
FLOATING,
#[doc = "Pull-up"]
PULLUP,
#[doc = "Pull-down"]
PULLDOWN,
}
impl PUPD15W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
PUPD15W::FLOATING => 0,
PUPD15W::PULLUP => 1,
PUPD15W::PULLDOWN => 2,
}
}
}
#[doc = r" Proxy"]
pub struct _PUPD15W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD15W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD15W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 30;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD14`"]
pub type PUPD14W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD14W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD14W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD14W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 28;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD13`"]
pub type PUPD13W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD13W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD13W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD13W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 26;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD12`"]
pub type PUPD12W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD12W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD12W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD12W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 24;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD11`"]
pub type PUPD11W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD11W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD11W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD11W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 22;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD10`"]
pub type PUPD10W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD10W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD10W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD10W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 20;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD9`"]
pub type PUPD9W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD9W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD9W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD9W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 18;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD8`"]
pub type PUPD8W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD8W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD8W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD8W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 16;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD7`"]
pub type PUPD7W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD7W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD7W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD7W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 14;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD6`"]
pub type PUPD6W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD6W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD6W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD6W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 12;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD5`"]
pub type PUPD5W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD5W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD5W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD5W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 10;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD4`"]
pub type PUPD4W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD4W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD4W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD4W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 8;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD3`"]
pub type PUPD3W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD3W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD3W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD3W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 6;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD2`"]
pub type PUPD2W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD2W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD2W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD2W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 4;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD1`"]
pub type PUPD1W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD1W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD1W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD1W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 2;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `PUPD0`"]
pub type PUPD0W = PUPD15W;
#[doc = r" Proxy"]
pub struct _PUPD0W<'a> {
w: &'a mut W,
}
impl<'a> _PUPD0W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PUPD0W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline]
pub fn floating(self) -> &'a mut W {
self.variant(PUPD15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPD15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPD15W::PULLDOWN)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 0;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 30:31 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd15(&self) -> PUPD15R {
PUPD15R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 30;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 28:29 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd14(&self) -> PUPD14R {
PUPD14R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 28;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 26:27 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd13(&self) -> PUPD13R {
PUPD13R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 26;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 24:25 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd12(&self) -> PUPD12R {
PUPD12R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 22:23 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd11(&self) -> PUPD11R {
PUPD11R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 20:21 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd10(&self) -> PUPD10R {
PUPD10R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 18:19 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd9(&self) -> PUPD9R {
PUPD9R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 16:17 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd8(&self) -> PUPD8R {
PUPD8R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 14:15 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd7(&self) -> PUPD7R {
PUPD7R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 14;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 12:13 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd6(&self) -> PUPD6R {
PUPD6R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 12;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 10:11 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd5(&self) -> PUPD5R {
PUPD5R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 10;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 8:9 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd4(&self) -> PUPD4R {
PUPD4R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 6:7 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd3(&self) -> PUPD3R {
PUPD3R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 4:5 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd2(&self) -> PUPD2R {
PUPD2R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 2:3 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd1(&self) -> PUPD1R {
PUPD1R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 0:1 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd0(&self) -> PUPD0R {
PUPD0R::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 603979776 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bits 30:31 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd15(&mut self) -> _PUPD15W {
_PUPD15W { w: self }
}
#[doc = "Bits 28:29 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd14(&mut self) -> _PUPD14W {
_PUPD14W { w: self }
}
#[doc = "Bits 26:27 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd13(&mut self) -> _PUPD13W {
_PUPD13W { w: self }
}
#[doc = "Bits 24:25 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd12(&mut self) -> _PUPD12W {
_PUPD12W { w: self }
}
#[doc = "Bits 22:23 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd11(&mut self) -> _PUPD11W {
_PUPD11W { w: self }
}
#[doc = "Bits 20:21 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd10(&mut self) -> _PUPD10W {
_PUPD10W { w: self }
}
#[doc = "Bits 18:19 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd9(&mut self) -> _PUPD9W {
_PUPD9W { w: self }
}
#[doc = "Bits 16:17 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd8(&mut self) -> _PUPD8W {
_PUPD8W { w: self }
}
#[doc = "Bits 14:15 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd7(&mut self) -> _PUPD7W {
_PUPD7W { w: self }
}
#[doc = "Bits 12:13 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd6(&mut self) -> _PUPD6W {
_PUPD6W { w: self }
}
#[doc = "Bits 10:11 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd5(&mut self) -> _PUPD5W {
_PUPD5W { w: self }
}
#[doc = "Bits 8:9 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd4(&mut self) -> _PUPD4W {
_PUPD4W { w: self }
}
#[doc = "Bits 6:7 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd3(&mut self) -> _PUPD3W {
_PUPD3W { w: self }
}
#[doc = "Bits 4:5 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd2(&mut self) -> _PUPD2W {
_PUPD2W { w: self }
}
#[doc = "Bits 2:3 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd1(&mut self) -> _PUPD1W {
_PUPD1W { w: self }
}
#[doc = "Bits 0:1 - Port x configuration bits (y = 0..15)"]
#[inline]
pub fn pupd0(&mut self) -> _PUPD0W {
_PUPD0W { w: self }
}
}