Expand description
Interface for CAN peripherals.
Defines multiple traits for different purposes.
The Configure
trait is used to configure the communication
mode and bit timing parameters of the CAN peripheral. The
ConfigureFd
trait is an advanced feature that can be implemented
for peripherals that support flexible data messages. These
2 traits represent synchronous actions and do not need a client
in order to confirm to the capsule that the action is finished.
The Controller
trait is used to enable and disable the device.
In order to be able to enable the device, the bit timing parameters
and the communication mode must be previously set, and in order
to disable the device, it must be enabled. This trait defines
asynchronous behaviours and because of that, the ControllerClient
trait is used to confirm to the capsule that the action is finished.
The Filter
trait is used to configure filter banks for receiving
messages. The action is synchronous.
The Transmit
trait is used to asynchronously send a message on
the CAN bus. The device must be previously enabled. The
TransmitClient
trait is used to notify the capsule when the
transmission is done or when there was en error captured during
the transmission.
The Receive
trait is used to asynchronously receive messages on
the CAN bus. The ReceiveClient
trait is used to notify the capsule
when a message was received, when the receiving process was aborted
and anytime an error occurs.
Structs
Enums
Constants
Traits
Configure
trait is used to configure the CAN peripheral and to prepare it for
transmission and reception of data. The peripheral cannot transmit or receive frames if
it is not previously configured and enabled.ConfigureFd
trait is used to configure the CAN peripheral for CanFD and to prepare it for
transmission and reception of data. The peripheral cannot transmit or receive frames if
it is not previously configured and enabled.Controller
trait is used to enable and disable the CAN peripheral.
The enable process applies the settings that were previously provided
to the driver using the Configure
trait.Controller
trait.Filter
trait is used to enable and disable a filter bank.Receive
trait is used to interact with the CAN driver through receive
requests only.Receive
trait.StandardBitTiming
trait is used to calculate the optimum timing parameters
for a given bitrate and the clock’s frequency.Transmit
trait is used to interact with the CAN driver through transmission
requests only.Transmit
trait.