mcxa_pac/spc0/
sramretldo_reftrim.rs1#[doc = "Register `SRAMRETLDO_REFTRIM` reader"]
2pub type R = crate::R<SramretldoReftrimSpec>;
3#[doc = "Register `SRAMRETLDO_REFTRIM` writer"]
4pub type W = crate::W<SramretldoReftrimSpec>;
5#[doc = "Field `REFTRIM` reader - Reference Trim. Voltage range is around 0.48V - 0.85V. Trim step is 12 mV."]
6pub type ReftrimR = crate::FieldReader;
7#[doc = "Field `REFTRIM` writer - Reference Trim. Voltage range is around 0.48V - 0.85V. Trim step is 12 mV."]
8pub type ReftrimW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
9impl R {
10 #[doc = "Bits 0:4 - Reference Trim. Voltage range is around 0.48V - 0.85V. Trim step is 12 mV."]
11 #[inline(always)]
12 pub fn reftrim(&self) -> ReftrimR {
13 ReftrimR::new((self.bits & 0x1f) as u8)
14 }
15}
16#[cfg(feature = "debug")]
17impl core::fmt::Debug for R {
18 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19 f.debug_struct("SRAMRETLDO_REFTRIM")
20 .field("reftrim", &self.reftrim())
21 .finish()
22 }
23}
24impl W {
25 #[doc = "Bits 0:4 - Reference Trim. Voltage range is around 0.48V - 0.85V. Trim step is 12 mV."]
26 #[inline(always)]
27 pub fn reftrim(&mut self) -> ReftrimW<'_, SramretldoReftrimSpec> {
28 ReftrimW::new(self, 0)
29 }
30}
31#[doc = "SRAM Retention Reference Trim\n\nYou can [`read`](crate::Reg::read) this register and get [`sramretldo_reftrim::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sramretldo_reftrim::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
32pub struct SramretldoReftrimSpec;
33impl crate::RegisterSpec for SramretldoReftrimSpec {
34 type Ux = u32;
35}
36#[doc = "`read()` method returns [`sramretldo_reftrim::R`](R) reader structure"]
37impl crate::Readable for SramretldoReftrimSpec {}
38#[doc = "`write(|w| ..)` method takes [`sramretldo_reftrim::W`](W) writer structure"]
39impl crate::Writable for SramretldoReftrimSpec {
40 type Safety = crate::Unsafe;
41}
42#[doc = "`reset()` method sets SRAMRETLDO_REFTRIM to value 0x17"]
43impl crate::Resettable for SramretldoReftrimSpec {
44 const RESET_VALUE: u32 = 0x17;
45}