#[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(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
self.register.set(f(&R { bits }, &mut W { bits }).bits);
}
#[doc = r"Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = "Possible values of the field `PUPDR15`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PUPDR15R {
#[doc = "No pull-up, pull-down"]
FLOATING,
#[doc = "Pull-up"]
PULLUP,
#[doc = "Pull-down"]
PULLDOWN,
#[doc = r"Reserved"]
_Reserved(u8),
}
impl PUPDR15R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u8 {
match *self {
PUPDR15R::FLOATING => 0,
PUPDR15R::PULLUP => 0x01,
PUPDR15R::PULLDOWN => 0x02,
PUPDR15R::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: u8) -> PUPDR15R {
match value {
0 => PUPDR15R::FLOATING,
1 => PUPDR15R::PULLUP,
2 => PUPDR15R::PULLDOWN,
i => PUPDR15R::_Reserved(i),
}
}
#[doc = "Checks if the value of the field is `FLOATING`"]
#[inline(always)]
pub fn is_floating(&self) -> bool {
*self == PUPDR15R::FLOATING
}
#[doc = "Checks if the value of the field is `PULLUP`"]
#[inline(always)]
pub fn is_pull_up(&self) -> bool {
*self == PUPDR15R::PULLUP
}
#[doc = "Checks if the value of the field is `PULLDOWN`"]
#[inline(always)]
pub fn is_pull_down(&self) -> bool {
*self == PUPDR15R::PULLDOWN
}
}
#[doc = "Values that can be written to the field `PUPDR15`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PUPDR15W {
#[doc = "No pull-up, pull-down"]
FLOATING,
#[doc = "Pull-up"]
PULLUP,
#[doc = "Pull-down"]
PULLDOWN,
}
impl PUPDR15W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> u8 {
match *self {
PUPDR15W::FLOATING => 0,
PUPDR15W::PULLUP => 1,
PUPDR15W::PULLDOWN => 2,
}
}
}
#[doc = r"Proxy"]
pub struct _PUPDR15W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR15W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR15W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 30);
self.w.bits |= ((value as u32) & 0x03) << 30;
self.w
}
}
#[doc = "Possible values of the field `PUPDR14`"]
pub type PUPDR14R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR14`"]
pub type PUPDR14W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR14W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR14W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR14W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 28);
self.w.bits |= ((value as u32) & 0x03) << 28;
self.w
}
}
#[doc = "Possible values of the field `PUPDR13`"]
pub type PUPDR13R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR13`"]
pub type PUPDR13W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR13W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR13W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR13W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 26);
self.w.bits |= ((value as u32) & 0x03) << 26;
self.w
}
}
#[doc = "Possible values of the field `PUPDR12`"]
pub type PUPDR12R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR12`"]
pub type PUPDR12W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR12W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR12W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR12W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 24);
self.w.bits |= ((value as u32) & 0x03) << 24;
self.w
}
}
#[doc = "Possible values of the field `PUPDR11`"]
pub type PUPDR11R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR11`"]
pub type PUPDR11W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR11W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR11W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR11W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 22);
self.w.bits |= ((value as u32) & 0x03) << 22;
self.w
}
}
#[doc = "Possible values of the field `PUPDR10`"]
pub type PUPDR10R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR10`"]
pub type PUPDR10W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR10W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR10W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR10W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 20);
self.w.bits |= ((value as u32) & 0x03) << 20;
self.w
}
}
#[doc = "Possible values of the field `PUPDR9`"]
pub type PUPDR9R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR9`"]
pub type PUPDR9W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR9W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR9W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR9W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 18);
self.w.bits |= ((value as u32) & 0x03) << 18;
self.w
}
}
#[doc = "Possible values of the field `PUPDR8`"]
pub type PUPDR8R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR8`"]
pub type PUPDR8W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR8W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR8W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR8W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 16);
self.w.bits |= ((value as u32) & 0x03) << 16;
self.w
}
}
#[doc = "Possible values of the field `PUPDR7`"]
pub type PUPDR7R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR7`"]
pub type PUPDR7W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR7W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR7W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR7W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 14);
self.w.bits |= ((value as u32) & 0x03) << 14;
self.w
}
}
#[doc = "Possible values of the field `PUPDR6`"]
pub type PUPDR6R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR6`"]
pub type PUPDR6W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR6W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR6W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR6W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 12);
self.w.bits |= ((value as u32) & 0x03) << 12;
self.w
}
}
#[doc = "Possible values of the field `PUPDR5`"]
pub type PUPDR5R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR5`"]
pub type PUPDR5W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR5W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR5W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR5W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 10);
self.w.bits |= ((value as u32) & 0x03) << 10;
self.w
}
}
#[doc = "Possible values of the field `PUPDR4`"]
pub type PUPDR4R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR4`"]
pub type PUPDR4W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR4W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR4W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR4W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 8);
self.w.bits |= ((value as u32) & 0x03) << 8;
self.w
}
}
#[doc = "Possible values of the field `PUPDR3`"]
pub type PUPDR3R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR3`"]
pub type PUPDR3W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR3W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR3W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR3W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 6);
self.w.bits |= ((value as u32) & 0x03) << 6;
self.w
}
}
#[doc = "Possible values of the field `PUPDR2`"]
pub type PUPDR2R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR2`"]
pub type PUPDR2W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR2W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR2W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR2W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 4);
self.w.bits |= ((value as u32) & 0x03) << 4;
self.w
}
}
#[doc = "Possible values of the field `PUPDR1`"]
pub type PUPDR1R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR1`"]
pub type PUPDR1W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR1W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR1W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR1W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 2);
self.w.bits |= ((value as u32) & 0x03) << 2;
self.w
}
}
#[doc = "Possible values of the field `PUPDR0`"]
pub type PUPDR0R = PUPDR15R;
#[doc = "Values that can be written to the field `PUPDR0`"]
pub type PUPDR0W = PUPDR15W;
#[doc = r"Proxy"]
pub struct _PUPDR0W<'a> {
w: &'a mut W,
}
impl<'a> _PUPDR0W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PUPDR0W) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "No pull-up, pull-down"]
#[inline(always)]
pub fn floating(self) -> &'a mut W {
self.variant(PUPDR15W::FLOATING)
}
#[doc = "Pull-up"]
#[inline(always)]
pub fn pull_up(self) -> &'a mut W {
self.variant(PUPDR15W::PULLUP)
}
#[doc = "Pull-down"]
#[inline(always)]
pub fn pull_down(self) -> &'a mut W {
self.variant(PUPDR15W::PULLDOWN)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x03 << 0);
self.w.bits |= ((value as u32) & 0x03) << 0;
self.w
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 30:31 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr15(&self) -> PUPDR15R {
PUPDR15R::_from(((self.bits >> 30) & 0x03) as u8)
}
#[doc = "Bits 28:29 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr14(&self) -> PUPDR14R {
PUPDR14R::_from(((self.bits >> 28) & 0x03) as u8)
}
#[doc = "Bits 26:27 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr13(&self) -> PUPDR13R {
PUPDR13R::_from(((self.bits >> 26) & 0x03) as u8)
}
#[doc = "Bits 24:25 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr12(&self) -> PUPDR12R {
PUPDR12R::_from(((self.bits >> 24) & 0x03) as u8)
}
#[doc = "Bits 22:23 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr11(&self) -> PUPDR11R {
PUPDR11R::_from(((self.bits >> 22) & 0x03) as u8)
}
#[doc = "Bits 20:21 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr10(&self) -> PUPDR10R {
PUPDR10R::_from(((self.bits >> 20) & 0x03) as u8)
}
#[doc = "Bits 18:19 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr9(&self) -> PUPDR9R {
PUPDR9R::_from(((self.bits >> 18) & 0x03) as u8)
}
#[doc = "Bits 16:17 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr8(&self) -> PUPDR8R {
PUPDR8R::_from(((self.bits >> 16) & 0x03) as u8)
}
#[doc = "Bits 14:15 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr7(&self) -> PUPDR7R {
PUPDR7R::_from(((self.bits >> 14) & 0x03) as u8)
}
#[doc = "Bits 12:13 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr6(&self) -> PUPDR6R {
PUPDR6R::_from(((self.bits >> 12) & 0x03) as u8)
}
#[doc = "Bits 10:11 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr5(&self) -> PUPDR5R {
PUPDR5R::_from(((self.bits >> 10) & 0x03) as u8)
}
#[doc = "Bits 8:9 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr4(&self) -> PUPDR4R {
PUPDR4R::_from(((self.bits >> 8) & 0x03) as u8)
}
#[doc = "Bits 6:7 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr3(&self) -> PUPDR3R {
PUPDR3R::_from(((self.bits >> 6) & 0x03) as u8)
}
#[doc = "Bits 4:5 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr2(&self) -> PUPDR2R {
PUPDR2R::_from(((self.bits >> 4) & 0x03) as u8)
}
#[doc = "Bits 2:3 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr1(&self) -> PUPDR1R {
PUPDR1R::_from(((self.bits >> 2) & 0x03) as u8)
}
#[doc = "Bits 0:1 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr0(&self) -> PUPDR0R {
PUPDR0R::_from(((self.bits >> 0) & 0x03) as u8)
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
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(always)]
pub fn pupdr15(&mut self) -> _PUPDR15W {
_PUPDR15W { w: self }
}
#[doc = "Bits 28:29 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr14(&mut self) -> _PUPDR14W {
_PUPDR14W { w: self }
}
#[doc = "Bits 26:27 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr13(&mut self) -> _PUPDR13W {
_PUPDR13W { w: self }
}
#[doc = "Bits 24:25 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr12(&mut self) -> _PUPDR12W {
_PUPDR12W { w: self }
}
#[doc = "Bits 22:23 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr11(&mut self) -> _PUPDR11W {
_PUPDR11W { w: self }
}
#[doc = "Bits 20:21 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr10(&mut self) -> _PUPDR10W {
_PUPDR10W { w: self }
}
#[doc = "Bits 18:19 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr9(&mut self) -> _PUPDR9W {
_PUPDR9W { w: self }
}
#[doc = "Bits 16:17 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr8(&mut self) -> _PUPDR8W {
_PUPDR8W { w: self }
}
#[doc = "Bits 14:15 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr7(&mut self) -> _PUPDR7W {
_PUPDR7W { w: self }
}
#[doc = "Bits 12:13 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr6(&mut self) -> _PUPDR6W {
_PUPDR6W { w: self }
}
#[doc = "Bits 10:11 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr5(&mut self) -> _PUPDR5W {
_PUPDR5W { w: self }
}
#[doc = "Bits 8:9 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr4(&mut self) -> _PUPDR4W {
_PUPDR4W { w: self }
}
#[doc = "Bits 6:7 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr3(&mut self) -> _PUPDR3W {
_PUPDR3W { w: self }
}
#[doc = "Bits 4:5 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr2(&mut self) -> _PUPDR2W {
_PUPDR2W { w: self }
}
#[doc = "Bits 2:3 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr1(&mut self) -> _PUPDR1W {
_PUPDR1W { w: self }
}
#[doc = "Bits 0:1 - Port x configuration bits (y = 0..15)"]
#[inline(always)]
pub fn pupdr0(&mut self) -> _PUPDR0W {
_PUPDR0W { w: self }
}
}