efm32pg1b_pac/timer0/cc0_ccv.rs
1///Register `CC0_CCV` reader
2pub type R = crate::R<CC0_CCVrs>;
3///Register `CC0_CCV` writer
4pub type W = crate::W<CC0_CCVrs>;
5///Field `CCV` reader - CC Channel Value
6pub type CcvR = crate::FieldReader<u16>;
7///Field `CCV` writer - CC Channel Value
8pub type CcvW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9impl R {
10 ///Bits 0:15 - CC Channel Value
11 #[inline(always)]
12 pub fn ccv(&self) -> CcvR {
13 CcvR::new((self.bits & 0xffff) as u16)
14 }
15}
16impl core::fmt::Debug for crate::generic::Reg<CC0_CCVrs> {
17 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18 write!(f, "(not readable)")
19 }
20}
21impl W {
22 ///Bits 0:15 - CC Channel Value
23 #[inline(always)]
24 pub fn ccv(&mut self) -> CcvW<CC0_CCVrs> {
25 CcvW::new(self, 0)
26 }
27}
28///CC Channel Value Register
29///
30///You can [`read`](crate::Reg::read) this register and get [`cc0_ccv::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cc0_ccv::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
31///
32///<div class="warning">One or more dependent resources other than the current register are immediately affected by a read operation.</div>
33pub struct CC0_CCVrs;
34impl crate::RegisterSpec for CC0_CCVrs {
35 type Ux = u32;
36}
37///`read()` method returns [`cc0_ccv::R`](R) reader structure
38impl crate::Readable for CC0_CCVrs {}
39///`write(|w| ..)` method takes [`cc0_ccv::W`](W) writer structure
40impl crate::Writable for CC0_CCVrs {
41 type Safety = crate::Unsafe;
42 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
43 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
44}
45///`reset()` method sets CC0_CCV to value 0
46impl crate::Resettable for CC0_CCVrs {
47 const RESET_VALUE: u32 = 0;
48}