Skip to content

Commit

Permalink
Update src/fdcan.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Zgarbul Andrey <[email protected]>
  • Loading branch information
usbalbin and burrbull committed Nov 8, 2024
1 parent bfc82e2 commit de17e3e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/fdcan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1159,10 +1159,11 @@ where
#[inline]
pub fn error_counters(&self) -> ErrorCounters {
let can = self.registers();
let cel: u8 = can.ecr().read().cel().bits();
let rp: bool = can.ecr().read().rp().bit();
let rec: u8 = can.ecr().read().rec().bits();
let tec: u8 = can.ecr().read().tec().bits();
let ecr = can.ecr().read();
let cel: u8 = ecr.cel().bits();
let rp: bool = ecr.rp().bit();
let rec: u8 = ecr.rec().bits();
let tec: u8 = ecr.tec().bits();

ErrorCounters {
can_errors: cel,
Expand Down

0 comments on commit de17e3e

Please sign in to comment.