stm32: can: fd: Properties: simplify reg accesses

This commit is contained in:
Torin Cooper-Bennun 2024-04-23 12:46:42 +01:00
parent 521c132e34
commit e15fd5895f

View File

@ -851,12 +851,12 @@ impl<T: Instance> Properties<T> {
/// Get the CAN RX error counter
pub fn rx_error_count(&self) -> u8 {
T::registers().regs.ecr().read().rec()
T::regs().ecr().read().rec()
}
/// Get the CAN TX error counter
pub fn tx_error_count(&self) -> u8 {
T::registers().regs.ecr().read().tec()
T::regs().ecr().read().tec()
}
/// Get the current bus error mode