mcxa_pac/tdet0/
tsr.rs

1#[doc = "Register `TSR` reader"]
2pub type R = crate::R<TsrSpec>;
3#[doc = "Register `TSR` writer"]
4pub type W = crate::W<TsrSpec>;
5#[doc = "Field `TTS` reader - Tamper Time Seconds"]
6pub type TtsR = crate::FieldReader<u32>;
7#[doc = "Field `TTS` writer - Tamper Time Seconds"]
8pub type TtsW<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
9impl R {
10    #[doc = "Bits 0:31 - Tamper Time Seconds"]
11    #[inline(always)]
12    pub fn tts(&self) -> TtsR {
13        TtsR::new(self.bits)
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("TSR").field("tts", &self.tts()).finish()
20    }
21}
22impl W {
23    #[doc = "Bits 0:31 - Tamper Time Seconds"]
24    #[inline(always)]
25    pub fn tts(&mut self) -> TtsW<'_, TsrSpec> {
26        TtsW::new(self, 0)
27    }
28}
29#[doc = "Tamper Seconds\n\nYou can [`read`](crate::Reg::read) this register and get [`tsr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tsr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
30pub struct TsrSpec;
31impl crate::RegisterSpec for TsrSpec {
32    type Ux = u32;
33}
34#[doc = "`read()` method returns [`tsr::R`](R) reader structure"]
35impl crate::Readable for TsrSpec {}
36#[doc = "`write(|w| ..)` method takes [`tsr::W`](W) writer structure"]
37impl crate::Writable for TsrSpec {
38    type Safety = crate::Unsafe;
39}
40#[doc = "`reset()` method sets TSR to value 0"]
41impl crate::Resettable for TsrSpec {}