mcxa_pac/scg0/
sircstat.rs1#[doc = "Register `SIRCSTAT` reader"]
2pub type R = crate::R<SircstatSpec>;
3#[doc = "Register `SIRCSTAT` writer"]
4pub type W = crate::W<SircstatSpec>;
5#[doc = "Field `CCOTRIM` reader - CCO Trim"]
6pub type CcotrimR = crate::FieldReader;
7#[doc = "Field `CCOTRIM` writer - CCO Trim"]
8pub type CcotrimW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
9#[doc = "Field `CLTRIM` reader - CL Trim"]
10pub type CltrimR = crate::FieldReader;
11#[doc = "Field `CLTRIM` writer - CL Trim"]
12pub type CltrimW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
13impl R {
14 #[doc = "Bits 0:5 - CCO Trim"]
15 #[inline(always)]
16 pub fn ccotrim(&self) -> CcotrimR {
17 CcotrimR::new((self.bits & 0x3f) as u8)
18 }
19 #[doc = "Bits 8:13 - CL Trim"]
20 #[inline(always)]
21 pub fn cltrim(&self) -> CltrimR {
22 CltrimR::new(((self.bits >> 8) & 0x3f) as u8)
23 }
24}
25#[cfg(feature = "debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("SIRCSTAT")
29 .field("ccotrim", &self.ccotrim())
30 .field("cltrim", &self.cltrim())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:5 - CCO Trim"]
36 #[inline(always)]
37 pub fn ccotrim(&mut self) -> CcotrimW<'_, SircstatSpec> {
38 CcotrimW::new(self, 0)
39 }
40 #[doc = "Bits 8:13 - CL Trim"]
41 #[inline(always)]
42 pub fn cltrim(&mut self) -> CltrimW<'_, SircstatSpec> {
43 CltrimW::new(self, 8)
44 }
45}
46#[doc = "SIRC Auto-trimming Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`sircstat::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sircstat::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct SircstatSpec;
48impl crate::RegisterSpec for SircstatSpec {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`sircstat::R`](R) reader structure"]
52impl crate::Readable for SircstatSpec {}
53#[doc = "`write(|w| ..)` method takes [`sircstat::W`](W) writer structure"]
54impl crate::Writable for SircstatSpec {
55 type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets SIRCSTAT to value 0"]
58impl crate::Resettable for SircstatSpec {}