efm32gg11b/rtcc/
cc0_ccv.rs

1#[doc = "Reader of register CC0_CCV"]
2pub type R = crate::R<u32, super::CC0_CCV>;
3#[doc = "Writer for register CC0_CCV"]
4pub type W = crate::W<u32, super::CC0_CCV>;
5#[doc = "Register CC0_CCV `reset()`'s with value 0"]
6impl crate::ResetValue for super::CC0_CCV {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type { 0 }
10}
11#[doc = "Reader of field `CCV`"]
12pub type CCV_R = crate::R<u32, u32>;
13#[doc = "Write proxy for field `CCV`"]
14pub struct CCV_W<'a> {
15    w: &'a mut W,
16}
17impl<'a> CCV_W<'a> {
18    #[doc = r"Writes raw bits to the field"]
19    #[inline(always)]
20    pub unsafe fn bits(self, value: u32) -> &'a mut W {
21        self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff);
22        self.w
23    }
24}
25impl R {
26    #[doc = "Bits 0:31 - Capture/Compare Value"]
27    #[inline(always)]
28    pub fn ccv(&self) -> CCV_R { CCV_R::new((self.bits & 0xffff_ffff) as u32) }
29}
30impl W {
31    #[doc = "Bits 0:31 - Capture/Compare Value"]
32    #[inline(always)]
33    pub fn ccv(&mut self) -> CCV_W { CCV_W { w: self } }
34}