27 #if (HAL_USE_CAN == TRUE) || defined(__DOXYGEN__) 74 #if CAN_ENFORCE_USE_CALLBACKS == FALSE 78 #if CAN_USE_SLEEP_MODE == TRUE 83 canp->rxfull_cb = NULL;
84 canp->txempty_cb = NULL;
85 canp->error_cb = NULL;
86 #if CAN_USE_SLEEP_MODE == TRUE 87 canp->wakeup_cb = NULL;
316 #if (CAN_USE_SLEEP_MODE == TRUE) || defined(__DOXYGEN__) 339 #if CAN_ENFORCE_USE_CALLBACKS == FALSE 364 #if CAN_ENFORCE_USE_CALLBACKS == FALSE event_source_t wakeup_event
Exiting sleep state event.
uint32_t canmbx_t
Type of a transmission mailbox index.
void can_lld_transmit(CANDriver *canp, canmbx_t mailbox, const CANTxFrame *ctfp)
Inserts a frame into the transmit queue.
uint32_t eventflags_t
Type of an event flags mask.
void osalThreadDequeueAllI(threads_queue_t *tqp, msg_t msg)
Dequeues and wakes up all threads from the queue.
void canStart(CANDriver *canp, const CANConfig *config)
Configures and activates the CAN peripheral.
event_source_t txempty_event
One or more transmission mailbox become available.
#define CAN_TX_MAILBOXES
Number of transmit mailboxes.
event_source_t error_event
A CAN bus error happened.
#define osalDbgCheckClassI()
I-Class state check.
void can_lld_stop(CANDriver *canp)
Deactivates the CAN peripheral.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
canstate_t state
Driver state.
Structure representing an CAN driver.
void osalOsRescheduleS(void)
Checks if a reschedule is required and performs it.
static void osalEventObjectInit(event_source_t *esp)
Initializes an event source object.
void can_lld_wakeup(CANDriver *canp)
Enforces leaving the sleep mode.
msg_t canTransmitTimeout(CANDriver *canp, canmbx_t mailbox, const CANTxFrame *ctfp, sysinterval_t timeout)
Can frame transmission.
int32_t msg_t
Type of a message.
void osalEventBroadcastFlagsI(event_source_t *esp, eventflags_t flags)
Add flags to an event source object.
void can_lld_receive(CANDriver *canp, canmbx_t mailbox, CANRxFrame *crfp)
Receives a frame from the input queue.
const CANConfig * config
Current configuration data.
void canObjectInit(CANDriver *canp)
Initializes the standard part of a CANDriver structure.
bool canTryReceiveI(CANDriver *canp, canmbx_t mailbox, CANRxFrame *crfp)
Can frame receive attempt.
#define osalDbgCheck(c)
Function parameters check.
void can_lld_sleep(CANDriver *canp)
Enters the sleep mode.
void canSleep(CANDriver *canp)
Enters the sleep mode.
void canInit(void)
CAN Driver initialization.
void canWakeup(CANDriver *canp)
Enforces leaving the sleep mode.
uint32_t sysinterval_t
Type of system time interval.
bool can_lld_is_rx_nonempty(CANDriver *canp, canmbx_t mailbox)
Determines whether a frame has been received.
void can_lld_start(CANDriver *canp)
Configures and activates the CAN peripheral.
msg_t osalThreadEnqueueTimeoutS(threads_queue_t *tqp, sysinterval_t timeout)
Enqueues the caller thread.
void canStop(CANDriver *canp)
Deactivates the CAN peripheral.
bool can_lld_is_tx_empty(CANDriver *canp, canmbx_t mailbox)
Determines whether a frame can be transmitted.
void can_lld_init(void)
Low level CAN driver initialization.
static void osalSysLock(void)
Enters a critical zone from thread context.
Driver configuration structure.
threads_queue_t rxqueue
Receive threads queue.
#define osalDbgAssert(c, remark)
Condition assertion.
msg_t canReceiveTimeout(CANDriver *canp, canmbx_t mailbox, CANRxFrame *crfp, sysinterval_t timeout)
Can frame receive.
bool canTryTransmitI(CANDriver *canp, canmbx_t mailbox, const CANTxFrame *ctfp)
Can frame transmission attempt.
#define CAN_RX_MAILBOXES
Number of receive mailboxes.
static void osalThreadQueueObjectInit(threads_queue_t *tqp)
Initializes a threads queue object.
event_source_t rxfull_event
One or more frames become available.
threads_queue_t txqueue
Transmission threads queue.
event_source_t sleep_event
Entering sleep state event.