mcxa_pac/scg0/
spllsscgstat.rs1#[doc = "Register `SPLLSSCGSTAT` reader"]
2pub type R = crate::R<SpllsscgstatSpec>;
3#[doc = "SS_MDIV change acknowledge\n\nValue on reset: 0"]
4#[cfg_attr(feature = "defmt", derive(defmt::Format))]
5#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6pub enum SsMdivAck {
7 #[doc = "0: The SS_MDIV, MF, MR, MC ratio change is not accepted by the analog PLL"]
8 Disabled = 0,
9 #[doc = "1: The SS_MDIV, MF, MR, MC ratio change is accepted by the analog PLL"]
10 Enabled = 1,
11}
12impl From<SsMdivAck> for bool {
13 #[inline(always)]
14 fn from(variant: SsMdivAck) -> Self {
15 variant as u8 != 0
16 }
17}
18#[doc = "Field `SS_MDIV_ACK` reader - SS_MDIV change acknowledge"]
19pub type SsMdivAckR = crate::BitReader<SsMdivAck>;
20impl SsMdivAckR {
21 #[doc = "Get enumerated values variant"]
22 #[inline(always)]
23 pub const fn variant(&self) -> SsMdivAck {
24 match self.bits {
25 false => SsMdivAck::Disabled,
26 true => SsMdivAck::Enabled,
27 }
28 }
29 #[doc = "The SS_MDIV, MF, MR, MC ratio change is not accepted by the analog PLL"]
30 #[inline(always)]
31 pub fn is_disabled(&self) -> bool {
32 *self == SsMdivAck::Disabled
33 }
34 #[doc = "The SS_MDIV, MF, MR, MC ratio change is accepted by the analog PLL"]
35 #[inline(always)]
36 pub fn is_enabled(&self) -> bool {
37 *self == SsMdivAck::Enabled
38 }
39}
40impl R {
41 #[doc = "Bit 0 - SS_MDIV change acknowledge"]
42 #[inline(always)]
43 pub fn ss_mdiv_ack(&self) -> SsMdivAckR {
44 SsMdivAckR::new((self.bits & 1) != 0)
45 }
46}
47#[cfg(feature = "debug")]
48impl core::fmt::Debug for R {
49 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
50 f.debug_struct("SPLLSSCGSTAT")
51 .field("ss_mdiv_ack", &self.ss_mdiv_ack())
52 .finish()
53 }
54}
55#[doc = "SPLL SSCG Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`spllsscgstat::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
56pub struct SpllsscgstatSpec;
57impl crate::RegisterSpec for SpllsscgstatSpec {
58 type Ux = u32;
59}
60#[doc = "`read()` method returns [`spllsscgstat::R`](R) reader structure"]
61impl crate::Readable for SpllsscgstatSpec {}
62#[doc = "`reset()` method sets SPLLSSCGSTAT to value 0"]
63impl crate::Resettable for SpllsscgstatSpec {}