1#[doc = "Register `CMPV0` reader"]
2pub type R = crate::R<Cmpv0Spec>;
3#[doc = "Register `CMPV0` writer"]
4pub type W = crate::W<Cmpv0Spec>;
5#[doc = "Field `CV` reader - Comparison x Value"]
6pub type CvR = crate::FieldReader<u32>;
7#[doc = "Field `CV` writer - Comparison x Value"]
8pub type CvW<'a, REG> = crate::FieldWriter<'a, REG, 24, u32>;
9#[doc = "Field `CVM` reader - Comparison x Value Mode"]
10pub type CvmR = crate::BitReader;
11#[doc = "Field `CVM` writer - Comparison x Value Mode"]
12pub type CvmW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bits 0:23 - Comparison x Value"]
15 #[inline(always)]
16 pub fn cv(&self) -> CvR {
17 CvR::new(self.bits & 0x00ff_ffff)
18 }
19 #[doc = "Bit 24 - Comparison x Value Mode"]
20 #[inline(always)]
21 pub fn cvm(&self) -> CvmR {
22 CvmR::new(((self.bits >> 24) & 1) != 0)
23 }
24}
25impl W {
26 #[doc = "Bits 0:23 - Comparison x Value"]
27 #[inline(always)]
28 #[must_use]
29 pub fn cv(&mut self) -> CvW<Cmpv0Spec> {
30 CvW::new(self, 0)
31 }
32 #[doc = "Bit 24 - Comparison x Value Mode"]
33 #[inline(always)]
34 #[must_use]
35 pub fn cvm(&mut self) -> CvmW<Cmpv0Spec> {
36 CvmW::new(self, 24)
37 }
38}
39#[doc = "PWM Comparison 0 Value Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cmpv0::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cmpv0::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct Cmpv0Spec;
41impl crate::RegisterSpec for Cmpv0Spec {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`cmpv0::R`](R) reader structure"]
45impl crate::Readable for Cmpv0Spec {}
46#[doc = "`write(|w| ..)` method takes [`cmpv0::W`](W) writer structure"]
47impl crate::Writable for Cmpv0Spec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets CMPV0 to value 0"]
53impl crate::Resettable for Cmpv0Spec {
54 const RESET_VALUE: u32 = 0;
55}