1#[doc = "Register `CLC` reader"]
2pub type R = crate::R<CLC_SPEC>;
3#[doc = "Register `CLC` writer"]
4pub type W = crate::W<CLC_SPEC>;
5#[doc = "Field `DISR` reader - Module Disable Request Bit"]
6pub type DISR_R = crate::BitReader;
7#[doc = "Field `DISR` writer - Module Disable Request Bit"]
8pub type DISR_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `DISS` reader - Module Disable Status Bit"]
10pub type DISS_R = crate::BitReader;
11#[doc = "Field `EDIS` reader - Sleep Mode Enable Control"]
12pub type EDIS_R = crate::BitReader;
13#[doc = "Field `EDIS` writer - Sleep Mode Enable Control"]
14pub type EDIS_W<'a, REG> = crate::BitWriter<'a, REG>;
15impl R {
16 #[doc = "Bit 0 - Module Disable Request Bit"]
17 #[inline(always)]
18 pub fn disr(&self) -> DISR_R {
19 DISR_R::new((self.bits & 1) != 0)
20 }
21 #[doc = "Bit 1 - Module Disable Status Bit"]
22 #[inline(always)]
23 pub fn diss(&self) -> DISS_R {
24 DISS_R::new(((self.bits >> 1) & 1) != 0)
25 }
26 #[doc = "Bit 3 - Sleep Mode Enable Control"]
27 #[inline(always)]
28 pub fn edis(&self) -> EDIS_R {
29 EDIS_R::new(((self.bits >> 3) & 1) != 0)
30 }
31}
32impl W {
33 #[doc = "Bit 0 - Module Disable Request Bit"]
34 #[inline(always)]
35 pub fn disr(&mut self) -> DISR_W<CLC_SPEC> {
36 DISR_W::new(self, 0)
37 }
38 #[doc = "Bit 3 - Sleep Mode Enable Control"]
39 #[inline(always)]
40 pub fn edis(&mut self) -> EDIS_W<CLC_SPEC> {
41 EDIS_W::new(self, 3)
42 }
43}
44#[doc = "CAN Clock Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`clc::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`clc::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct CLC_SPEC;
46impl crate::RegisterSpec for CLC_SPEC {
47 type Ux = u32;
48}
49#[doc = "`read()` method returns [`clc::R`](R) reader structure"]
50impl crate::Readable for CLC_SPEC {}
51#[doc = "`write(|w| ..)` method takes [`clc::W`](W) writer structure"]
52impl crate::Writable for CLC_SPEC {
53 type Safety = crate::Unsafe;
54 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
55 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
56}
57#[doc = "`reset()` method sets CLC to value 0x03"]
58impl crate::Resettable for CLC_SPEC {
59 const RESET_VALUE: u32 = 0x03;
60}