pub type R = crate::R<STARTUPrs>;
pub type W = crate::W<STARTUPrs>;
pub type Stdly0R = crate::FieldReader<u16>;
pub type Stdly0W<'a, REG> = crate::FieldWriter<'a, REG, 10, u16>;
pub type Stdly1R = crate::FieldReader<u16>;
pub type Stdly1W<'a, REG> = crate::FieldWriter<'a, REG, 10, u16>;
pub type AstwaitR = crate::BitReader;
pub type AstwaitW<'a, REG> = crate::BitWriter<'a, REG>;
pub type StwsenR = crate::BitReader;
pub type StwsenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type StwsaenR = crate::BitReader;
pub type StwsaenW<'a, REG> = crate::BitWriter<'a, REG>;
pub type StwsR = crate::FieldReader;
pub type StwsW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
impl R {
#[inline(always)]
pub fn stdly0(&self) -> Stdly0R {
Stdly0R::new((self.bits & 0x03ff) as u16)
}
#[inline(always)]
pub fn stdly1(&self) -> Stdly1R {
Stdly1R::new(((self.bits >> 12) & 0x03ff) as u16)
}
#[inline(always)]
pub fn astwait(&self) -> AstwaitR {
AstwaitR::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn stwsen(&self) -> StwsenR {
StwsenR::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn stwsaen(&self) -> StwsaenR {
StwsaenR::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn stws(&self) -> StwsR {
StwsR::new(((self.bits >> 28) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("STARTUP")
.field("stdly0", &self.stdly0())
.field("stdly1", &self.stdly1())
.field("astwait", &self.astwait())
.field("stwsen", &self.stwsen())
.field("stwsaen", &self.stwsaen())
.field("stws", &self.stws())
.finish()
}
}
impl W {
#[inline(always)]
pub fn stdly0(&mut self) -> Stdly0W<'_, STARTUPrs> {
Stdly0W::new(self, 0)
}
#[inline(always)]
pub fn stdly1(&mut self) -> Stdly1W<'_, STARTUPrs> {
Stdly1W::new(self, 12)
}
#[inline(always)]
pub fn astwait(&mut self) -> AstwaitW<'_, STARTUPrs> {
AstwaitW::new(self, 24)
}
#[inline(always)]
pub fn stwsen(&mut self) -> StwsenW<'_, STARTUPrs> {
StwsenW::new(self, 25)
}
#[inline(always)]
pub fn stwsaen(&mut self) -> StwsaenW<'_, STARTUPrs> {
StwsaenW::new(self, 26)
}
#[inline(always)]
pub fn stws(&mut self) -> StwsW<'_, STARTUPrs> {
StwsW::new(self, 28)
}
}
pub struct STARTUPrs;
impl crate::RegisterSpec for STARTUPrs {
type Ux = u32;
}
impl crate::Readable for STARTUPrs {}
impl crate::Writable for STARTUPrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for STARTUPrs {
const RESET_VALUE: u32 = 0x1300_104d;
}