|
ChibiOS/HAL 9.0.0
|
CAN Driver macros and structures. More...
#include "hal_can_lld.h"Go to the source code of this file.
Macros | |
| #define | CAN_ANY_MAILBOX 0U |
| Special mailbox identifier. | |
CAN status flags | |
| #define | CAN_LIMIT_WARNING 1U |
| Errors rate warning. | |
| #define | CAN_LIMIT_ERROR 2U |
| Errors rate error. | |
| #define | CAN_BUS_OFF_ERROR 4U |
| Bus off condition reached. | |
| #define | CAN_FRAMING_ERROR 8U |
| Framing error of some kind on the CAN bus. | |
| #define | CAN_OVERFLOW_ERROR 16U |
| Overflow in receive queue. | |
CAN configuration options | |
| #define | CAN_USE_SLEEP_MODE TRUE |
| Sleep mode related APIs inclusion switch. | |
| #define | CAN_ENFORCE_USE_CALLBACKS FALSE |
| Enforces the driver to use direct callbacks rather than OSAL events. | |
Macro Functions | |
| #define | CAN_MAILBOX_TO_MASK(mbx) |
| Converts a mailbox index to a bit mask. | |
| #define | canTransmit(canp, mailbox, ctfp, timeout) |
Legacy name for canTransmitTimeout(). | |
| #define | canReceive(canp, mailbox, crfp, timeout) |
Legacy name for canReceiveTimeout(). | |
Low level driver helper macros | |
| #define | _can_tx_empty_isr(canp, flags) |
| TX mailbox empty event. | |
| #define | _can_rx_full_isr(canp, flags) |
| RX mailbox empty full event. | |
| #define | _can_wakeup_isr(canp) |
| Wakeup event. | |
| #define | _can_error_isr(canp, flags) |
| Error event. | |
Enumerations | |
| enum | canstate_t { CAN_UNINIT = 0 , CAN_STOP = 1 , CAN_STARTING = 2 , CAN_STOPPING = 3 , CAN_READY = 4 , CAN_SLEEP = 5 } |
| Driver state machine possible states. More... | |
Functions | |
| void | canInit (void) |
| CAN Driver initialization. | |
| void | canObjectInit (CANDriver *canp) |
Initializes the standard part of a CANDriver structure. | |
| msg_t | canStart (CANDriver *canp, const CANConfig *config) |
| Configures and activates the CAN peripheral. | |
| void | canStop (CANDriver *canp) |
| Deactivates the CAN peripheral. | |
| bool | canTryTransmitI (CANDriver *canp, canmbx_t mailbox, const CANTxFrame *ctfp) |
| Can frame transmission attempt. | |
| bool | canTryReceiveI (CANDriver *canp, canmbx_t mailbox, CANRxFrame *crfp) |
| Can frame receive attempt. | |
| void | canTryAbortX (CANDriver *canp, canmbx_t mailbox) |
| Tries to abort an ongoing transmission. | |
| msg_t | canTransmitTimeout (CANDriver *canp, canmbx_t mailbox, const CANTxFrame *ctfp, sysinterval_t timeout) |
| Can frame transmission. | |
| msg_t | canReceiveTimeout (CANDriver *canp, canmbx_t mailbox, CANRxFrame *crfp, sysinterval_t timeout) |
| Can frame receive. | |
CAN Driver macros and structures.
Definition in file hal_can.h.