1#[doc = "Register `CR` reader"]
2pub type R = crate::R<CrSpec>;
3#[doc = "Register `CR` writer"]
4pub type W = crate::W<CrSpec>;
5#[doc = "Field `RESET` writer - RESET bit"]
6pub type ResetW<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `POLYSIZE` reader - Polynomial size"]
8pub type PolysizeR = crate::FieldReader;
9#[doc = "Field `POLYSIZE` writer - Polynomial size"]
10pub type PolysizeW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
11#[doc = "Field `REV_IN` reader - Reverse input data"]
12pub type RevInR = crate::FieldReader;
13#[doc = "Field `REV_IN` writer - Reverse input data"]
14pub type RevInW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
15#[doc = "Field `REV_OUT` reader - Reverse output data"]
16pub type RevOutR = crate::BitReader;
17#[doc = "Field `REV_OUT` writer - Reverse output data"]
18pub type RevOutW<'a, REG> = crate::BitWriter<'a, REG>;
19impl R {
20 #[doc = "Bits 3:4 - Polynomial size"]
21 #[inline(always)]
22 pub fn polysize(&self) -> PolysizeR {
23 PolysizeR::new(((self.bits >> 3) & 3) as u8)
24 }
25 #[doc = "Bits 5:6 - Reverse input data"]
26 #[inline(always)]
27 pub fn rev_in(&self) -> RevInR {
28 RevInR::new(((self.bits >> 5) & 3) as u8)
29 }
30 #[doc = "Bit 7 - Reverse output data"]
31 #[inline(always)]
32 pub fn rev_out(&self) -> RevOutR {
33 RevOutR::new(((self.bits >> 7) & 1) != 0)
34 }
35}
36impl W {
37 #[doc = "Bit 0 - RESET bit"]
38 #[inline(always)]
39 pub fn reset(&mut self) -> ResetW<CrSpec> {
40 ResetW::new(self, 0)
41 }
42 #[doc = "Bits 3:4 - Polynomial size"]
43 #[inline(always)]
44 pub fn polysize(&mut self) -> PolysizeW<CrSpec> {
45 PolysizeW::new(self, 3)
46 }
47 #[doc = "Bits 5:6 - Reverse input data"]
48 #[inline(always)]
49 pub fn rev_in(&mut self) -> RevInW<CrSpec> {
50 RevInW::new(self, 5)
51 }
52 #[doc = "Bit 7 - Reverse output data"]
53 #[inline(always)]
54 pub fn rev_out(&mut self) -> RevOutW<CrSpec> {
55 RevOutW::new(self, 7)
56 }
57}
58#[doc = "Control register\n\nYou can [`read`](crate::Reg::read) this register and get [`cr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
59pub struct CrSpec;
60impl crate::RegisterSpec for CrSpec {
61 type Ux = u32;
62}
63#[doc = "`read()` method returns [`cr::R`](R) reader structure"]
64impl crate::Readable for CrSpec {}
65#[doc = "`write(|w| ..)` method takes [`cr::W`](W) writer structure"]
66impl crate::Writable for CrSpec {
67 type Safety = crate::Unsafe;
68}
69#[doc = "`reset()` method sets CR to value 0"]
70impl crate::Resettable for CrSpec {}