#[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::CRH {
#[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 = r" Value of the field"]
pub struct MODE8R {
bits: u8,
}
impl MODE8R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CNF8R {
bits: u8,
}
impl CNF8R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MODE9R {
bits: u8,
}
impl MODE9R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CNF9R {
bits: u8,
}
impl CNF9R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MODE10R {
bits: u8,
}
impl MODE10R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CNF10R {
bits: u8,
}
impl CNF10R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MODE11R {
bits: u8,
}
impl MODE11R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CNF11R {
bits: u8,
}
impl CNF11R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MODE12R {
bits: u8,
}
impl MODE12R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CNF12R {
bits: u8,
}
impl CNF12R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MODE13R {
bits: u8,
}
impl MODE13R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CNF13R {
bits: u8,
}
impl CNF13R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MODE14R {
bits: u8,
}
impl MODE14R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CNF14R {
bits: u8,
}
impl CNF14R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MODE15R {
bits: u8,
}
impl MODE15R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CNF15R {
bits: u8,
}
impl CNF15R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Proxy"]
pub struct _MODE8W<'a> {
w: &'a mut W,
}
impl<'a> _MODE8W<'a> {
#[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
}
}
#[doc = r" Proxy"]
pub struct _CNF8W<'a> {
w: &'a mut W,
}
impl<'a> _CNF8W<'a> {
#[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 = r" Proxy"]
pub struct _MODE9W<'a> {
w: &'a mut W,
}
impl<'a> _MODE9W<'a> {
#[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 = r" Proxy"]
pub struct _CNF9W<'a> {
w: &'a mut W,
}
impl<'a> _CNF9W<'a> {
#[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 = r" Proxy"]
pub struct _MODE10W<'a> {
w: &'a mut W,
}
impl<'a> _MODE10W<'a> {
#[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 = r" Proxy"]
pub struct _CNF10W<'a> {
w: &'a mut W,
}
impl<'a> _CNF10W<'a> {
#[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 = r" Proxy"]
pub struct _MODE11W<'a> {
w: &'a mut W,
}
impl<'a> _MODE11W<'a> {
#[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 = r" Proxy"]
pub struct _CNF11W<'a> {
w: &'a mut W,
}
impl<'a> _CNF11W<'a> {
#[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 = r" Proxy"]
pub struct _MODE12W<'a> {
w: &'a mut W,
}
impl<'a> _MODE12W<'a> {
#[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 = r" Proxy"]
pub struct _CNF12W<'a> {
w: &'a mut W,
}
impl<'a> _CNF12W<'a> {
#[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 = r" Proxy"]
pub struct _MODE13W<'a> {
w: &'a mut W,
}
impl<'a> _MODE13W<'a> {
#[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 = r" Proxy"]
pub struct _CNF13W<'a> {
w: &'a mut W,
}
impl<'a> _CNF13W<'a> {
#[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 = r" Proxy"]
pub struct _MODE14W<'a> {
w: &'a mut W,
}
impl<'a> _MODE14W<'a> {
#[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 = r" Proxy"]
pub struct _CNF14W<'a> {
w: &'a mut W,
}
impl<'a> _CNF14W<'a> {
#[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 = r" Proxy"]
pub struct _MODE15W<'a> {
w: &'a mut W,
}
impl<'a> _MODE15W<'a> {
#[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 = r" Proxy"]
pub struct _CNF15W<'a> {
w: &'a mut W,
}
impl<'a> _CNF15W<'a> {
#[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
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 0:1 - Port n.8 mode bits"]
#[inline]
pub fn mode8(&self) -> MODE8R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
};
MODE8R { bits }
}
#[doc = "Bits 2:3 - Port n.8 configuration bits"]
#[inline]
pub fn cnf8(&self) -> CNF8R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CNF8R { bits }
}
#[doc = "Bits 4:5 - Port n.9 mode bits"]
#[inline]
pub fn mode9(&self) -> MODE9R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
};
MODE9R { bits }
}
#[doc = "Bits 6:7 - Port n.9 configuration bits"]
#[inline]
pub fn cnf9(&self) -> CNF9R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CNF9R { bits }
}
#[doc = "Bits 8:9 - Port n.10 mode bits"]
#[inline]
pub fn mode10(&self) -> MODE10R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
};
MODE10R { bits }
}
#[doc = "Bits 10:11 - Port n.10 configuration bits"]
#[inline]
pub fn cnf10(&self) -> CNF10R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 10;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CNF10R { bits }
}
#[doc = "Bits 12:13 - Port n.11 mode bits"]
#[inline]
pub fn mode11(&self) -> MODE11R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 12;
((self.bits >> OFFSET) & MASK as u32) as u8
};
MODE11R { bits }
}
#[doc = "Bits 14:15 - Port n.11 configuration bits"]
#[inline]
pub fn cnf11(&self) -> CNF11R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 14;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CNF11R { bits }
}
#[doc = "Bits 16:17 - Port n.12 mode bits"]
#[inline]
pub fn mode12(&self) -> MODE12R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
};
MODE12R { bits }
}
#[doc = "Bits 18:19 - Port n.12 configuration bits"]
#[inline]
pub fn cnf12(&self) -> CNF12R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CNF12R { bits }
}
#[doc = "Bits 20:21 - Port n.13 mode bits"]
#[inline]
pub fn mode13(&self) -> MODE13R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) as u8
};
MODE13R { bits }
}
#[doc = "Bits 22:23 - Port n.13 configuration bits"]
#[inline]
pub fn cnf13(&self) -> CNF13R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 22;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CNF13R { bits }
}
#[doc = "Bits 24:25 - Port n.14 mode bits"]
#[inline]
pub fn mode14(&self) -> MODE14R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
};
MODE14R { bits }
}
#[doc = "Bits 26:27 - Port n.14 configuration bits"]
#[inline]
pub fn cnf14(&self) -> CNF14R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 26;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CNF14R { bits }
}
#[doc = "Bits 28:29 - Port n.15 mode bits"]
#[inline]
pub fn mode15(&self) -> MODE15R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 28;
((self.bits >> OFFSET) & MASK as u32) as u8
};
MODE15R { bits }
}
#[doc = "Bits 30:31 - Port n.15 configuration bits"]
#[inline]
pub fn cnf15(&self) -> CNF15R {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 30;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CNF15R { bits }
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 1145324612 }
}
#[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 0:1 - Port n.8 mode bits"]
#[inline]
pub fn mode8(&mut self) -> _MODE8W {
_MODE8W { w: self }
}
#[doc = "Bits 2:3 - Port n.8 configuration bits"]
#[inline]
pub fn cnf8(&mut self) -> _CNF8W {
_CNF8W { w: self }
}
#[doc = "Bits 4:5 - Port n.9 mode bits"]
#[inline]
pub fn mode9(&mut self) -> _MODE9W {
_MODE9W { w: self }
}
#[doc = "Bits 6:7 - Port n.9 configuration bits"]
#[inline]
pub fn cnf9(&mut self) -> _CNF9W {
_CNF9W { w: self }
}
#[doc = "Bits 8:9 - Port n.10 mode bits"]
#[inline]
pub fn mode10(&mut self) -> _MODE10W {
_MODE10W { w: self }
}
#[doc = "Bits 10:11 - Port n.10 configuration bits"]
#[inline]
pub fn cnf10(&mut self) -> _CNF10W {
_CNF10W { w: self }
}
#[doc = "Bits 12:13 - Port n.11 mode bits"]
#[inline]
pub fn mode11(&mut self) -> _MODE11W {
_MODE11W { w: self }
}
#[doc = "Bits 14:15 - Port n.11 configuration bits"]
#[inline]
pub fn cnf11(&mut self) -> _CNF11W {
_CNF11W { w: self }
}
#[doc = "Bits 16:17 - Port n.12 mode bits"]
#[inline]
pub fn mode12(&mut self) -> _MODE12W {
_MODE12W { w: self }
}
#[doc = "Bits 18:19 - Port n.12 configuration bits"]
#[inline]
pub fn cnf12(&mut self) -> _CNF12W {
_CNF12W { w: self }
}
#[doc = "Bits 20:21 - Port n.13 mode bits"]
#[inline]
pub fn mode13(&mut self) -> _MODE13W {
_MODE13W { w: self }
}
#[doc = "Bits 22:23 - Port n.13 configuration bits"]
#[inline]
pub fn cnf13(&mut self) -> _CNF13W {
_CNF13W { w: self }
}
#[doc = "Bits 24:25 - Port n.14 mode bits"]
#[inline]
pub fn mode14(&mut self) -> _MODE14W {
_MODE14W { w: self }
}
#[doc = "Bits 26:27 - Port n.14 configuration bits"]
#[inline]
pub fn cnf14(&mut self) -> _CNF14W {
_CNF14W { w: self }
}
#[doc = "Bits 28:29 - Port n.15 mode bits"]
#[inline]
pub fn mode15(&mut self) -> _MODE15W {
_MODE15W { w: self }
}
#[doc = "Bits 30:31 - Port n.15 configuration bits"]
#[inline]
pub fn cnf15(&mut self) -> _CNF15W {
_CNF15W { w: self }
}
}