pub type R = crate::R<PATTrs>;
pub type W = crate::W<PATTrs>;
pub type ATTSET_R = crate::FieldReader;
pub type ATTSET_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type ATTWAIT_R = crate::FieldReader;
pub type ATTWAIT_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type ATTHOLD_R = crate::FieldReader;
pub type ATTHOLD_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type ATTHIZ_R = crate::FieldReader;
pub type ATTHIZ_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn attset(&self) -> ATTSET_R {
ATTSET_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn attwait(&self) -> ATTWAIT_R {
ATTWAIT_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn atthold(&self) -> ATTHOLD_R {
ATTHOLD_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn atthiz(&self) -> ATTHIZ_R {
ATTHIZ_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PATT")
.field("atthiz", &self.atthiz())
.field("atthold", &self.atthold())
.field("attwait", &self.attwait())
.field("attset", &self.attset())
.finish()
}
}
impl W {
#[inline(always)]
pub fn attset(&mut self) -> ATTSET_W<PATTrs> {
ATTSET_W::new(self, 0)
}
#[inline(always)]
pub fn attwait(&mut self) -> ATTWAIT_W<PATTrs> {
ATTWAIT_W::new(self, 8)
}
#[inline(always)]
pub fn atthold(&mut self) -> ATTHOLD_W<PATTrs> {
ATTHOLD_W::new(self, 16)
}
#[inline(always)]
pub fn atthiz(&mut self) -> ATTHIZ_W<PATTrs> {
ATTHIZ_W::new(self, 24)
}
}
pub struct PATTrs;
impl crate::RegisterSpec for PATTrs {
type Ux = u32;
}
impl crate::Readable for PATTrs {}
impl crate::Writable for PATTrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PATTrs {
const RESET_VALUE: u32 = 0xfcfc_fcfc;
}