1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#[doc = "Reader of register ECR"] pub type R = crate::R<u32, super::ECR>; #[doc = "Reader of field `TEC`"] pub type TEC_R = crate::R<u8, u8>; #[doc = "Reader of field `REC`"] pub type REC_R = crate::R<u8, u8>; #[doc = "Reader of field `RP`"] pub type RP_R = crate::R<bool, bool>; #[doc = "Reader of field `CEL`"] pub type CEL_R = crate::R<u8, u8>; impl R { #[doc = "Bits 0:7 - Transmit Error Counter"] #[inline(always)] pub fn tec(&self) -> TEC_R { TEC_R::new((self.bits & 0xff) as u8) } #[doc = "Bits 8:14 - Receive Error Counter"] #[inline(always)] pub fn rec(&self) -> REC_R { REC_R::new(((self.bits >> 8) & 0x7f) as u8) } #[doc = "Bit 15 - Receive Error Passive"] #[inline(always)] pub fn rp(&self) -> RP_R { RP_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 16:23 - CAN Error Logging"] #[inline(always)] pub fn cel(&self) -> CEL_R { CEL_R::new(((self.bits >> 16) & 0xff) as u8) } }