1#[doc = "Register `CRCR` reader"]
2pub type R = crate::R<CrcrSpec>;
3#[doc = "Field `TXCRC` reader - Transmitted CRC value"]
4pub type TxcrcR = crate::FieldReader<u16>;
5#[doc = "Field `MBCRC` reader - CRC Message Buffer"]
6pub type MbcrcR = crate::FieldReader;
7impl R {
8 #[doc = "Bits 0:14 - Transmitted CRC value"]
9 #[inline(always)]
10 pub fn txcrc(&self) -> TxcrcR {
11 TxcrcR::new((self.bits & 0x7fff) as u16)
12 }
13 #[doc = "Bits 16:22 - CRC Message Buffer"]
14 #[inline(always)]
15 pub fn mbcrc(&self) -> MbcrcR {
16 MbcrcR::new(((self.bits >> 16) & 0x7f) as u8)
17 }
18}
19#[cfg(feature = "debug")]
20impl core::fmt::Debug for R {
21 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22 f.debug_struct("CRCR")
23 .field("txcrc", &self.txcrc())
24 .field("mbcrc", &self.mbcrc())
25 .finish()
26 }
27}
28#[doc = "Cyclic Redundancy Check\n\nYou can [`read`](crate::Reg::read) this register and get [`crcr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct CrcrSpec;
30impl crate::RegisterSpec for CrcrSpec {
31 type Ux = u32;
32}
33#[doc = "`read()` method returns [`crcr::R`](R) reader structure"]
34impl crate::Readable for CrcrSpec {}
35#[doc = "`reset()` method sets CRCR to value 0"]
36impl crate::Resettable for CrcrSpec {}