stm32-metapac

Crates

git

Versions

stm32h523ze

Flavors

Struct stm32_metapac::can::regs::Cccr

#[repr(transparent)]
pub struct Cccr(pub u32);
Expand description

FDCAN CC control register

Tuple Fields§

§0: u32

Implementations§

§

impl Cccr

pub const fn init(&self) -> bool

Initialization

pub fn set_init(&mut self, val: bool)

Initialization

pub const fn cce(&self) -> bool

Configuration change enable

pub fn set_cce(&mut self, val: bool)

Configuration change enable

pub const fn asm(&self) -> bool

ASM restricted operation mode. The restricted operation mode is intended for applications that adapt themselves to different CAN bit rates. The application tests different bit rates and leaves the Restricted operation Mode after it has received a valid frame. In the optional Restricted operation Mode the node is able to transmit and receive data and remote frames and it gives acknowledge to valid frames, but it does not send active error frames or overload frames. In case of an error condition or overload condition, it does not send dominant bits, instead it waits for the occurrence of bus idle condition to resynchronize itself to the CAN communication. The error counters are not incremented. Bit ASM can only be set by software when both CCE and INIT are set to 1. The bit can be reset by the software at any time

pub fn set_asm(&mut self, val: bool)

ASM restricted operation mode. The restricted operation mode is intended for applications that adapt themselves to different CAN bit rates. The application tests different bit rates and leaves the Restricted operation Mode after it has received a valid frame. In the optional Restricted operation Mode the node is able to transmit and receive data and remote frames and it gives acknowledge to valid frames, but it does not send active error frames or overload frames. In case of an error condition or overload condition, it does not send dominant bits, instead it waits for the occurrence of bus idle condition to resynchronize itself to the CAN communication. The error counters are not incremented. Bit ASM can only be set by software when both CCE and INIT are set to 1. The bit can be reset by the software at any time

pub const fn csa(&self) -> bool

Clock stop acknowledge

pub fn set_csa(&mut self, val: bool)

Clock stop acknowledge

pub const fn csr(&self) -> bool

Clock stop request

pub fn set_csr(&mut self, val: bool)

Clock stop request

pub const fn mon(&self) -> bool

Bus monitoring mode. Bit MON can only be set by software when both CCE and INIT are set to 1. The bit can be reset by the Host at any time

pub fn set_mon(&mut self, val: bool)

Bus monitoring mode. Bit MON can only be set by software when both CCE and INIT are set to 1. The bit can be reset by the Host at any time

pub const fn dar(&self) -> bool

Disable automatic retransmission

pub fn set_dar(&mut self, val: bool)

Disable automatic retransmission

pub const fn test(&self) -> bool

Test mode enable

pub fn set_test(&mut self, val: bool)

Test mode enable

pub const fn fdoe(&self) -> bool

FD operation enable

pub fn set_fdoe(&mut self, val: bool)

FD operation enable

pub const fn brse(&self) -> bool

FDCAN bit rate switching

pub fn set_brse(&mut self, val: bool)

FDCAN bit rate switching

pub const fn pxhd(&self) -> bool

Protocol exception handling disable

pub fn set_pxhd(&mut self, val: bool)

Protocol exception handling disable

pub const fn efbi(&self) -> bool

Edge filtering during bus integration

pub fn set_efbi(&mut self, val: bool)

Edge filtering during bus integration

pub const fn txp(&self) -> bool

If this bit is set, the FDCAN pauses for two CAN bit times before starting the next transmission after successfully transmitting a frame

pub fn set_txp(&mut self, val: bool)

If this bit is set, the FDCAN pauses for two CAN bit times before starting the next transmission after successfully transmitting a frame

pub const fn niso(&self) -> bool

Non ISO operation. If this bit is set, the FDCAN uses the CAN FD frame format as specified by the Bosch CAN FD Specification V1.0

pub fn set_niso(&mut self, val: bool)

Non ISO operation. If this bit is set, the FDCAN uses the CAN FD frame format as specified by the Bosch CAN FD Specification V1.0

Trait Implementations§

§

impl Clone for Cccr

§

fn clone(&self) -> Cccr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Default for Cccr

§

fn default() -> Cccr

Returns the “default value” for a type. Read more
§

impl PartialEq for Cccr

§

fn eq(&self, other: &Cccr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for Cccr

§

impl Eq for Cccr

§

impl StructuralPartialEq for Cccr

Auto Trait Implementations§

§

impl Freeze for Cccr

§

impl RefUnwindSafe for Cccr

§

impl Send for Cccr

§

impl Sync for Cccr

§

impl Unpin for Cccr

§

impl UnwindSafe for Cccr

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.