Skip to main content

efm32pg1b_pac/letimer0/
comp0.rs

1///Register `COMP0` reader
2pub type R = crate::R<COMP0rs>;
3///Register `COMP0` writer
4pub type W = crate::W<COMP0rs>;
5///Field `COMP0` reader - Compare Value 0
6pub type Comp0R = crate::FieldReader<u16>;
7///Field `COMP0` writer - Compare Value 0
8pub type Comp0W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9impl R {
10    ///Bits 0:15 - Compare Value 0
11    #[inline(always)]
12    pub fn comp0(&self) -> Comp0R {
13        Comp0R::new((self.bits & 0xffff) as u16)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("COMP0")
19            .field("comp0", &self.comp0())
20            .finish()
21    }
22}
23impl W {
24    ///Bits 0:15 - Compare Value 0
25    #[inline(always)]
26    pub fn comp0(&mut self) -> Comp0W<'_, COMP0rs> {
27        Comp0W::new(self, 0)
28    }
29}
30///Compare Value Register 0
31///
32///You can [`read`](crate::Reg::read) this register and get [`comp0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`comp0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
33pub struct COMP0rs;
34impl crate::RegisterSpec for COMP0rs {
35    type Ux = u32;
36}
37///`read()` method returns [`comp0::R`](R) reader structure
38impl crate::Readable for COMP0rs {}
39///`write(|w| ..)` method takes [`comp0::W`](W) writer structure
40impl crate::Writable for COMP0rs {
41    type Safety = crate::Unsafe;
42}
43///`reset()` method sets COMP0 to value 0
44impl crate::Resettable for COMP0rs {}