pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type MSION_R = crate::BitReader;
pub type MSION_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MSIRDY_R = crate::BitReader;
pub type MSIPLLEN_R = crate::BitReader;
pub type MSIPLLEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MSIRGSEL_W<'a, REG> = crate::BitWriter<'a, REG>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum MSIRANGE {
Range100k = 0,
Range200k = 1,
Range400k = 2,
Range800k = 3,
Range1m = 4,
Range2m = 5,
Range4m = 6,
Range8m = 7,
Range16m = 8,
Range24m = 9,
Range32m = 10,
Range48m = 11,
}
impl From<MSIRANGE> for u8 {
#[inline(always)]
fn from(variant: MSIRANGE) -> Self {
variant as _
}
}
impl crate::FieldSpec for MSIRANGE {
type Ux = u8;
}
impl crate::IsEnum for MSIRANGE {}
pub type MSIRANGE_R = crate::FieldReader<MSIRANGE>;
impl MSIRANGE_R {
#[inline(always)]
pub const fn variant(&self) -> Option<MSIRANGE> {
match self.bits {
0 => Some(MSIRANGE::Range100k),
1 => Some(MSIRANGE::Range200k),
2 => Some(MSIRANGE::Range400k),
3 => Some(MSIRANGE::Range800k),
4 => Some(MSIRANGE::Range1m),
5 => Some(MSIRANGE::Range2m),
6 => Some(MSIRANGE::Range4m),
7 => Some(MSIRANGE::Range8m),
8 => Some(MSIRANGE::Range16m),
9 => Some(MSIRANGE::Range24m),
10 => Some(MSIRANGE::Range32m),
11 => Some(MSIRANGE::Range48m),
_ => None,
}
}
#[inline(always)]
pub fn is_range100k(&self) -> bool {
*self == MSIRANGE::Range100k
}
#[inline(always)]
pub fn is_range200k(&self) -> bool {
*self == MSIRANGE::Range200k
}
#[inline(always)]
pub fn is_range400k(&self) -> bool {
*self == MSIRANGE::Range400k
}
#[inline(always)]
pub fn is_range800k(&self) -> bool {
*self == MSIRANGE::Range800k
}
#[inline(always)]
pub fn is_range1m(&self) -> bool {
*self == MSIRANGE::Range1m
}
#[inline(always)]
pub fn is_range2m(&self) -> bool {
*self == MSIRANGE::Range2m
}
#[inline(always)]
pub fn is_range4m(&self) -> bool {
*self == MSIRANGE::Range4m
}
#[inline(always)]
pub fn is_range8m(&self) -> bool {
*self == MSIRANGE::Range8m
}
#[inline(always)]
pub fn is_range16m(&self) -> bool {
*self == MSIRANGE::Range16m
}
#[inline(always)]
pub fn is_range24m(&self) -> bool {
*self == MSIRANGE::Range24m
}
#[inline(always)]
pub fn is_range32m(&self) -> bool {
*self == MSIRANGE::Range32m
}
#[inline(always)]
pub fn is_range48m(&self) -> bool {
*self == MSIRANGE::Range48m
}
}
pub type MSIRANGE_W<'a, REG> = crate::FieldWriter<'a, REG, 4, MSIRANGE>;
impl<'a, REG> MSIRANGE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn range100k(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range100k)
}
#[inline(always)]
pub fn range200k(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range200k)
}
#[inline(always)]
pub fn range400k(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range400k)
}
#[inline(always)]
pub fn range800k(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range800k)
}
#[inline(always)]
pub fn range1m(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range1m)
}
#[inline(always)]
pub fn range2m(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range2m)
}
#[inline(always)]
pub fn range4m(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range4m)
}
#[inline(always)]
pub fn range8m(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range8m)
}
#[inline(always)]
pub fn range16m(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range16m)
}
#[inline(always)]
pub fn range24m(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range24m)
}
#[inline(always)]
pub fn range32m(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range32m)
}
#[inline(always)]
pub fn range48m(self) -> &'a mut crate::W<REG> {
self.variant(MSIRANGE::Range48m)
}
}
pub type HSION_R = crate::BitReader;
pub type HSION_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSIKERON_R = crate::BitReader;
pub type HSIKERON_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSIRDY_R = crate::BitReader;
pub type HSIASFS_R = crate::BitReader;
pub type HSIASFS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSEON_R = crate::BitReader;
pub type HSEON_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSERDY_R = crate::BitReader;
pub type HSEBYP_R = crate::BitReader;
pub type HSEBYP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CSSON_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLON_R = crate::BitReader;
pub type PLLON_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLRDY_R = crate::BitReader;
pub type PLLSAI1ON_R = crate::BitReader;
pub type PLLSAI1ON_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLLSAI1RDY_R = crate::BitReader;
impl R {
#[inline(always)]
pub fn msion(&self) -> MSION_R {
MSION_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn msirdy(&self) -> MSIRDY_R {
MSIRDY_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn msipllen(&self) -> MSIPLLEN_R {
MSIPLLEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn msirange(&self) -> MSIRANGE_R {
MSIRANGE_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[inline(always)]
pub fn hsion(&self) -> HSION_R {
HSION_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn hsikeron(&self) -> HSIKERON_R {
HSIKERON_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn hsirdy(&self) -> HSIRDY_R {
HSIRDY_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn hsiasfs(&self) -> HSIASFS_R {
HSIASFS_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn hseon(&self) -> HSEON_R {
HSEON_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn hserdy(&self) -> HSERDY_R {
HSERDY_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn hsebyp(&self) -> HSEBYP_R {
HSEBYP_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn pllon(&self) -> PLLON_R {
PLLON_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn pllrdy(&self) -> PLLRDY_R {
PLLRDY_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn pllsai1on(&self) -> PLLSAI1ON_R {
PLLSAI1ON_R::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn pllsai1rdy(&self) -> PLLSAI1RDY_R {
PLLSAI1RDY_R::new(((self.bits >> 27) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("pllsai1rdy", &self.pllsai1rdy())
.field("pllsai1on", &self.pllsai1on())
.field("pllrdy", &self.pllrdy())
.field("pllon", &self.pllon())
.field("hsebyp", &self.hsebyp())
.field("hserdy", &self.hserdy())
.field("hseon", &self.hseon())
.field("hsiasfs", &self.hsiasfs())
.field("hsirdy", &self.hsirdy())
.field("hsikeron", &self.hsikeron())
.field("hsion", &self.hsion())
.field("msirange", &self.msirange())
.field("msipllen", &self.msipllen())
.field("msirdy", &self.msirdy())
.field("msion", &self.msion())
.finish()
}
}
impl W {
#[inline(always)]
pub fn msion(&mut self) -> MSION_W<CRrs> {
MSION_W::new(self, 0)
}
#[inline(always)]
pub fn msipllen(&mut self) -> MSIPLLEN_W<CRrs> {
MSIPLLEN_W::new(self, 2)
}
#[inline(always)]
pub fn msirgsel(&mut self) -> MSIRGSEL_W<CRrs> {
MSIRGSEL_W::new(self, 3)
}
#[inline(always)]
pub fn msirange(&mut self) -> MSIRANGE_W<CRrs> {
MSIRANGE_W::new(self, 4)
}
#[inline(always)]
pub fn hsion(&mut self) -> HSION_W<CRrs> {
HSION_W::new(self, 8)
}
#[inline(always)]
pub fn hsikeron(&mut self) -> HSIKERON_W<CRrs> {
HSIKERON_W::new(self, 9)
}
#[inline(always)]
pub fn hsiasfs(&mut self) -> HSIASFS_W<CRrs> {
HSIASFS_W::new(self, 11)
}
#[inline(always)]
pub fn hseon(&mut self) -> HSEON_W<CRrs> {
HSEON_W::new(self, 16)
}
#[inline(always)]
pub fn hsebyp(&mut self) -> HSEBYP_W<CRrs> {
HSEBYP_W::new(self, 18)
}
#[inline(always)]
pub fn csson(&mut self) -> CSSON_W<CRrs> {
CSSON_W::new(self, 19)
}
#[inline(always)]
pub fn pllon(&mut self) -> PLLON_W<CRrs> {
PLLON_W::new(self, 24)
}
#[inline(always)]
pub fn pllsai1on(&mut self) -> PLLSAI1ON_W<CRrs> {
PLLSAI1ON_W::new(self, 26)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {
const RESET_VALUE: u32 = 0x63;
}