mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
stm32: can: fd: Properties: simplify reg accesses
This commit is contained in:
parent
521c132e34
commit
e15fd5895f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user