pub type R = crate::R<CMPTHRrs>;
pub type W = crate::W<CMPTHRrs>;
pub type AdltR = crate::FieldReader<u16>;
pub type AdltW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
pub type AdgtR = crate::FieldReader<u16>;
pub type AdgtW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
impl R {
#[inline(always)]
pub fn adlt(&self) -> AdltR {
AdltR::new((self.bits & 0xffff) as u16)
}
#[inline(always)]
pub fn adgt(&self) -> AdgtR {
AdgtR::new(((self.bits >> 16) & 0xffff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CMPTHR")
.field("adlt", &self.adlt())
.field("adgt", &self.adgt())
.finish()
}
}
impl W {
#[inline(always)]
pub fn adlt(&mut self) -> AdltW<'_, CMPTHRrs> {
AdltW::new(self, 0)
}
#[inline(always)]
pub fn adgt(&mut self) -> AdgtW<'_, CMPTHRrs> {
AdgtW::new(self, 16)
}
}
pub struct CMPTHRrs;
impl crate::RegisterSpec for CMPTHRrs {
type Ux = u32;
}
impl crate::Readable for CMPTHRrs {}
impl crate::Writable for CMPTHRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CMPTHRrs {}