pub type R = crate::R<VMONDVDDCTRLrs>;
pub type W = crate::W<VMONDVDDCTRLrs>;
pub type EnR = crate::BitReader;
pub type EnW<'a, REG> = crate::BitWriter<'a, REG>;
pub type RisewuR = crate::BitReader;
pub type RisewuW<'a, REG> = crate::BitWriter<'a, REG>;
pub type FallwuR = crate::BitReader;
pub type FallwuW<'a, REG> = crate::BitWriter<'a, REG>;
pub type ThresfineR = crate::FieldReader;
pub type ThresfineW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type ThrescoarseR = crate::FieldReader;
pub type ThrescoarseW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
#[inline(always)]
pub fn en(&self) -> EnR {
EnR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn risewu(&self) -> RisewuR {
RisewuR::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn fallwu(&self) -> FallwuR {
FallwuR::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn thresfine(&self) -> ThresfineR {
ThresfineR::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn threscoarse(&self) -> ThrescoarseR {
ThrescoarseR::new(((self.bits >> 12) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("VMONDVDDCTRL")
.field("en", &self.en())
.field("risewu", &self.risewu())
.field("fallwu", &self.fallwu())
.field("thresfine", &self.thresfine())
.field("threscoarse", &self.threscoarse())
.finish()
}
}
impl W {
#[inline(always)]
pub fn en(&mut self) -> EnW<'_, VMONDVDDCTRLrs> {
EnW::new(self, 0)
}
#[inline(always)]
pub fn risewu(&mut self) -> RisewuW<'_, VMONDVDDCTRLrs> {
RisewuW::new(self, 2)
}
#[inline(always)]
pub fn fallwu(&mut self) -> FallwuW<'_, VMONDVDDCTRLrs> {
FallwuW::new(self, 3)
}
#[inline(always)]
pub fn thresfine(&mut self) -> ThresfineW<'_, VMONDVDDCTRLrs> {
ThresfineW::new(self, 8)
}
#[inline(always)]
pub fn threscoarse(&mut self) -> ThrescoarseW<'_, VMONDVDDCTRLrs> {
ThrescoarseW::new(self, 12)
}
}
pub struct VMONDVDDCTRLrs;
impl crate::RegisterSpec for VMONDVDDCTRLrs {
type Ux = u32;
}
impl crate::Readable for VMONDVDDCTRLrs {}
impl crate::Writable for VMONDVDDCTRLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for VMONDVDDCTRLrs {}