stm32: can: fd: Properties: simplify reg accesses
This commit is contained in:
parent
521c132e34
commit
e15fd5895f
1 changed files with 2 additions and 2 deletions
|
@ -851,12 +851,12 @@ impl<T: Instance> Properties<T> {
|
||||||
|
|
||||||
/// Get the CAN RX error counter
|
/// Get the CAN RX error counter
|
||||||
pub fn rx_error_count(&self) -> u8 {
|
pub fn rx_error_count(&self) -> u8 {
|
||||||
T::registers().regs.ecr().read().rec()
|
T::regs().ecr().read().rec()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the CAN TX error counter
|
/// Get the CAN TX error counter
|
||||||
pub fn tx_error_count(&self) -> u8 {
|
pub fn tx_error_count(&self) -> u8 {
|
||||||
T::registers().regs.ecr().read().tec()
|
T::regs().ecr().read().tec()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the current bus error mode
|
/// Get the current bus error mode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue