ChibiOS/HAL 9.0.0
CAN Driver

Generic CAN Driver. More...

Detailed Description

Generic CAN Driver.

This module implements a generic CAN (Controller Area Network) driver allowing the exchange of information at frame level.

Precondition
In order to use the CAN driver the HAL_USE_CAN option must be enabled in halconf.h.

Driver State Machine

The driver implements a state machine internally, not all the driver functionalities can be used in any moment, any transition not explicitly shown in the following diagram has to be considered an error and shall be captured by an assertion (if enabled).

dot_inline_dotgraph_2.png
Collaboration diagram for CAN Driver:

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.

PLATFORM configuration options

#define PLATFORM_CAN_USE_CAN1   FALSE
 CAN1 driver enable switch.

Data Structures

struct  CANTxFrame
 CAN transmission frame. More...
struct  CANRxFrame
 CAN received frame. More...
struct  hal_can_config
 Type of a CAN configuration structure. More...
struct  hal_can_driver
 Structure representing an CAN driver. More...

Macros

#define CAN_ANY_MAILBOX   0U
 Special mailbox identifier.
#define CAN_TX_MAILBOXES   1
 Number of transmit mailboxes.
#define CAN_RX_MAILBOXES   1
 Number of receive mailboxes.

Typedefs

typedef struct hal_can_driver CANDriver
 Type of a structure representing an CAN driver.
typedef uint32_t canmbx_t
 Type of a transmission mailbox index.
typedef void(* can_callback_t) (CANDriver *canp, uint32_t flags)
 Type of a CAN notification callback.
typedef struct hal_can_config CANConfig
 Type of a CAN configuration structure.

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.
void canSleep (CANDriver *canp)
 Enters the sleep mode.
void canWakeup (CANDriver *canp)
 Enforces leaving the sleep mode.
void can_lld_init (void)
 Low level CAN driver initialization.
void can_lld_start (CANDriver *canp)
 Configures and activates the CAN peripheral.
void can_lld_stop (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_transmit (CANDriver *canp, canmbx_t mailbox, const CANTxFrame *ctfp)
 Inserts a frame into the transmit queue.
bool can_lld_is_rx_nonempty (CANDriver *canp, canmbx_t mailbox)
 Determines whether a frame has been received.
void can_lld_receive (CANDriver *canp, canmbx_t mailbox, CANRxFrame *crfp)
 Receives a frame from the input queue.
void can_lld_abort (CANDriver *canp, canmbx_t mailbox)
 Tries to abort an ongoing transmission.
void can_lld_sleep (CANDriver *canp)
 Enters the sleep mode.
void can_lld_wakeup (CANDriver *canp)
 Enforces leaving the sleep mode.

Variables

CANDriver CAND1
 CAN1 driver identifier.

Macro Definition Documentation

◆ CAN_LIMIT_WARNING

#define CAN_LIMIT_WARNING   1U

Errors rate warning.

Definition at line 41 of file hal_can.h.

◆ CAN_LIMIT_ERROR

#define CAN_LIMIT_ERROR   2U

Errors rate error.

Definition at line 45 of file hal_can.h.

◆ CAN_BUS_OFF_ERROR

#define CAN_BUS_OFF_ERROR   4U

Bus off condition reached.

Definition at line 49 of file hal_can.h.

◆ CAN_FRAMING_ERROR

#define CAN_FRAMING_ERROR   8U

Framing error of some kind on the CAN bus.

Definition at line 53 of file hal_can.h.

◆ CAN_OVERFLOW_ERROR

#define CAN_OVERFLOW_ERROR   16U

Overflow in receive queue.

Definition at line 57 of file hal_can.h.

◆ CAN_ANY_MAILBOX

#define CAN_ANY_MAILBOX   0U

Special mailbox identifier.

Definition at line 63 of file hal_can.h.

Referenced by can_lld_is_rx_nonempty(), can_lld_is_tx_empty(), and canTryAbortX().

◆ CAN_USE_SLEEP_MODE

#define CAN_USE_SLEEP_MODE   TRUE

Sleep mode related APIs inclusion switch.

This option can only be enabled if the CAN implementation supports the sleep mode, see the macro CAN_SUPPORTS_SLEEP exported by the underlying implementation.

Definition at line 80 of file hal_can.h.

◆ CAN_ENFORCE_USE_CALLBACKS

#define CAN_ENFORCE_USE_CALLBACKS   FALSE

Enforces the driver to use direct callbacks rather than OSAL events.

Definition at line 87 of file hal_can.h.

◆ CAN_MAILBOX_TO_MASK

#define CAN_MAILBOX_TO_MASK ( mbx)
Value:
(1U << ((mbx) - 1U))

Converts a mailbox index to a bit mask.

Definition at line 124 of file hal_can.h.

◆ canTransmit

#define canTransmit ( canp,
mailbox,
ctfp,
timeout )
Value:
canTransmitTimeout(canp, mailbox, ctfp, timeout)
msg_t canTransmitTimeout(CANDriver *canp, canmbx_t mailbox, const CANTxFrame *ctfp, sysinterval_t timeout)
Can frame transmission.
Definition hal_can.c:274

Legacy name for canTransmitTimeout().

Deprecated

Definition at line 131 of file hal_can.h.

◆ canReceive

#define canReceive ( canp,
mailbox,
crfp,
timeout )
Value:
canReceiveTimeout(canp, mailbox, crfp, timeout)
msg_t canReceiveTimeout(CANDriver *canp, canmbx_t mailbox, CANRxFrame *crfp, sysinterval_t timeout)
Can frame receive.
Definition hal_can.c:321

Legacy name for canReceiveTimeout().

Deprecated

Definition at line 139 of file hal_can.h.

◆ _can_tx_empty_isr

#define _can_tx_empty_isr ( canp,
flags )
Value:
{ \
osalSysLockFromISR(); \
osalThreadDequeueAllI(&(canp)->txqueue, MSG_OK); \
osalEventBroadcastFlagsI(&(canp)->txempty_event, flags); \
osalSysUnlockFromISR(); \
}
#define MSG_OK
Definition osal.h:56

TX mailbox empty event.

Definition at line 151 of file hal_can.h.

◆ _can_rx_full_isr

#define _can_rx_full_isr ( canp,
flags )
Value:
{ \
osalSysLockFromISR(); \
osalThreadDequeueAllI(&(canp)->rxqueue, MSG_OK); \
osalEventBroadcastFlagsI(&(canp)->rxfull_event, flags); \
osalSysUnlockFromISR(); \
}

RX mailbox empty full event.

Definition at line 161 of file hal_can.h.

◆ _can_wakeup_isr

#define _can_wakeup_isr ( canp)
Value:
{ \
osalSysLockFromISR(); \
osalEventBroadcastFlagsI(&(canp)->wakeup_event, 0U); \
osalSysUnlockFromISR(); \
}

Wakeup event.

Definition at line 171 of file hal_can.h.

◆ _can_error_isr

#define _can_error_isr ( canp,
flags )
Value:
{ \
osalSysLockFromISR(); \
osalEventBroadcastFlagsI(&(canp)->error_event, flags); \
osalSysUnlockFromISR(); \
}

Error event.

Definition at line 180 of file hal_can.h.

◆ CAN_TX_MAILBOXES

#define CAN_TX_MAILBOXES   1

Number of transmit mailboxes.

Definition at line 37 of file hal_can_lld.h.

Referenced by canTransmitTimeout(), canTryAbortX(), and canTryTransmitI().

◆ CAN_RX_MAILBOXES

#define CAN_RX_MAILBOXES   1

Number of receive mailboxes.

Definition at line 42 of file hal_can_lld.h.

Referenced by canReceiveTimeout(), and canTryReceiveI().

◆ PLATFORM_CAN_USE_CAN1

#define PLATFORM_CAN_USE_CAN1   FALSE

CAN1 driver enable switch.

If set to TRUE the support for CAN1 is included.

Note
The default is FALSE.

Definition at line 58 of file hal_can_lld.h.

Typedef Documentation

◆ CANDriver

typedef struct hal_can_driver CANDriver

Type of a structure representing an CAN driver.

Definition at line 73 of file hal_can_lld.h.

◆ canmbx_t

typedef uint32_t canmbx_t

Type of a transmission mailbox index.

Definition at line 78 of file hal_can_lld.h.

◆ can_callback_t

typedef void(* can_callback_t) (CANDriver *canp, uint32_t flags)

Type of a CAN notification callback.

Parameters
[in]canppointer to the CANDriver object triggering the callback
[in]flagsflags associated to the mailbox callback

Definition at line 88 of file hal_can_lld.h.

◆ CANConfig

typedef struct hal_can_config CANConfig

Type of a CAN configuration structure.

Enumeration Type Documentation

◆ canstate_t

enum canstate_t

Driver state machine possible states.

Enumerator
CAN_UNINIT 

Not initialized.

CAN_STOP 

Stopped.

CAN_STARTING 

Starting.

CAN_STOPPING 

Stopping.

CAN_READY 

Ready.

CAN_SLEEP 

Sleep state.

Definition at line 102 of file hal_can.h.

Function Documentation

◆ canInit()

void canInit ( void )

CAN Driver initialization.

Note
This function is implicitly invoked by halInit(), there is no need to explicitly initialize the driver.
Function Class:
Object or module nitializer function.

Definition at line 56 of file hal_can.c.

References can_lld_init().

Referenced by halInit().

Here is the call graph for this function:

◆ canObjectInit()

void canObjectInit ( CANDriver * canp)

Initializes the standard part of a CANDriver structure.

Parameters
[out]canppointer to the CANDriver object
Function Class:
Object or module nitializer function.

Definition at line 68 of file hal_can.c.

References CAN_STOP, hal_can_driver::config, hal_can_driver::error_event, osalEventObjectInit(), osalThreadQueueObjectInit(), hal_can_driver::rxfull_event, hal_can_driver::rxqueue, hal_can_driver::sleep_event, hal_can_driver::state, hal_can_driver::txempty_event, hal_can_driver::txqueue, and hal_can_driver::wakeup_event.

Referenced by can_lld_init().

Here is the call graph for this function:

◆ canStart()

msg_t canStart ( CANDriver * canp,
const CANConfig * config )

Configures and activates the CAN peripheral.

Note
Activating the CAN bus can be a slow operation.
Unlike other drivers it is not possible to restart the CAN driver without first stopping it using canStop().
Parameters
[in]canppointer to the CANDriver object
[in]configpointer to the CANConfig object. Depending on the implementation the value can be NULL.
Returns
The operation status.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 105 of file hal_can.c.

References can_lld_start(), CAN_READY, CAN_STARTING, CAN_STOP, hal_can_driver::config, HAL_RET_SUCCESS, osalDbgAssert, osalDbgCheck, osalSysLock(), osalSysUnlock(), and hal_can_driver::state.

Here is the call graph for this function:

◆ canStop()

void canStop ( CANDriver * canp)

Deactivates the CAN peripheral.

Parameters
[in]canppointer to the CANDriver object
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 145 of file hal_can.c.

References can_lld_stop(), CAN_READY, CAN_STOP, CAN_STOPPING, hal_can_driver::config, MSG_RESET, osalDbgAssert, osalDbgCheck, osalOsRescheduleS(), osalSysLock(), osalSysUnlock(), osalThreadDequeueAllI(), hal_can_driver::rxqueue, hal_can_driver::state, and hal_can_driver::txqueue.

Here is the call graph for this function:

◆ canTryTransmitI()

bool canTryTransmitI ( CANDriver * canp,
canmbx_t mailbox,
const CANTxFrame * ctfp )

Can frame transmission attempt.

The specified frame is queued for transmission, if the hardware queue is full then the function fails.

Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number, CAN_ANY_MAILBOX for any mailbox
[in]ctfppointer to the CAN frame to be transmitted
Returns
The operation result.
Return values
falseFrame transmitted.
trueMailbox full.
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 181 of file hal_can.c.

References can_lld_is_tx_empty(), can_lld_transmit(), CAN_READY, CAN_SLEEP, CAN_TX_MAILBOXES, osalDbgAssert, osalDbgCheck, osalDbgCheckClassI, and hal_can_driver::state.

Here is the call graph for this function:

◆ canTryReceiveI()

bool canTryReceiveI ( CANDriver * canp,
canmbx_t mailbox,
CANRxFrame * crfp )

Can frame receive attempt.

The function tries to fetch a frame from a mailbox.

Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number, CAN_ANY_MAILBOX for any mailbox
[out]crfppointer to the buffer where the CAN frame is copied
Returns
The operation result.
Return values
falseFrame fetched.
trueMailbox empty.
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 215 of file hal_can.c.

References can_lld_is_rx_nonempty(), can_lld_receive(), CAN_READY, CAN_RX_MAILBOXES, CAN_SLEEP, osalDbgAssert, osalDbgCheck, osalDbgCheckClassI, and hal_can_driver::state.

Here is the call graph for this function:

◆ canTryAbortX()

void canTryAbortX ( CANDriver * canp,
canmbx_t mailbox )

Tries to abort an ongoing transmission.

Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number
Function Class:
This is an X-Class API, this function can be invoked from any context.

Definition at line 244 of file hal_can.c.

References CAN_ANY_MAILBOX, can_lld_abort(), CAN_TX_MAILBOXES, and osalDbgCheck.

Here is the call graph for this function:

◆ canTransmitTimeout()

msg_t canTransmitTimeout ( CANDriver * canp,
canmbx_t mailbox,
const CANTxFrame * ctfp,
sysinterval_t timeout )

Can frame transmission.

The specified frame is queued for transmission, if the hardware queue is full then the invoking thread is queued.

Note
Trying to transmit while in sleep mode simply enqueues the thread.
Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number, CAN_ANY_MAILBOX for any mailbox
[in]ctfppointer to the CAN frame to be transmitted
[in]timeoutthe number of ticks before the operation timeouts, the following special values are allowed:
  • TIME_IMMEDIATE immediate timeout.
  • TIME_INFINITE no timeout.
Returns
The operation result.
Return values
MSG_OKthe frame has been queued for transmission.
MSG_TIMEOUTThe operation has timed out.
MSG_RESETThe driver has been stopped while waiting.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 274 of file hal_can.c.

References can_lld_is_tx_empty(), can_lld_transmit(), CAN_READY, CAN_SLEEP, CAN_TX_MAILBOXES, MSG_OK, osalDbgAssert, osalDbgCheck, osalSysLock(), osalSysUnlock(), osalThreadEnqueueTimeoutS(), hal_can_driver::state, and hal_can_driver::txqueue.

Here is the call graph for this function:

◆ canReceiveTimeout()

msg_t canReceiveTimeout ( CANDriver * canp,
canmbx_t mailbox,
CANRxFrame * crfp,
sysinterval_t timeout )

Can frame receive.

The function waits until a frame is received.

Note
Trying to receive while in sleep mode simply enqueues the thread.
Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number, CAN_ANY_MAILBOX for any mailbox
[out]crfppointer to the buffer where the CAN frame is copied
[in]timeoutthe number of ticks before the operation timeouts, the following special values are allowed:
  • TIME_IMMEDIATE immediate timeout (useful in an event driven scenario where a thread never blocks for I/O).
  • TIME_INFINITE no timeout.
Returns
The operation result.
Return values
MSG_OKa frame has been received and placed in the buffer.
MSG_TIMEOUTThe operation has timed out.
MSG_RESETThe driver has been stopped while waiting.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 321 of file hal_can.c.

References can_lld_is_rx_nonempty(), can_lld_receive(), CAN_READY, CAN_RX_MAILBOXES, CAN_SLEEP, MSG_OK, osalDbgAssert, osalDbgCheck, osalSysLock(), osalSysUnlock(), osalThreadEnqueueTimeoutS(), hal_can_driver::rxqueue, and hal_can_driver::state.

Here is the call graph for this function:

◆ canSleep()

void canSleep ( CANDriver * canp)

Enters the sleep mode.

This function puts the CAN driver in sleep mode and broadcasts the sleep_event event source.

Precondition
In order to use this function the option CAN_USE_SLEEP_MODE must be enabled and the CAN_SUPPORTS_SLEEP mode must be supported by the low level driver.
Parameters
[in]canppointer to the CANDriver object
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 360 of file hal_can.c.

References can_lld_sleep(), CAN_READY, CAN_SLEEP, osalDbgAssert, osalDbgCheck, osalEventBroadcastFlagsI(), osalOsRescheduleS(), osalSysLock(), osalSysUnlock(), hal_can_driver::sleep_event, and hal_can_driver::state.

Here is the call graph for this function:

◆ canWakeup()

void canWakeup ( CANDriver * canp)

Enforces leaving the sleep mode.

Note
The sleep mode is supposed to be usually exited automatically by an hardware event.
Parameters
[in]canppointer to the CANDriver object

Definition at line 385 of file hal_can.c.

References can_lld_wakeup(), CAN_READY, CAN_SLEEP, osalDbgAssert, osalDbgCheck, osalEventBroadcastFlagsI(), osalOsRescheduleS(), osalSysLock(), osalSysUnlock(), hal_can_driver::state, and hal_can_driver::wakeup_event.

Here is the call graph for this function:

◆ can_lld_init()

void can_lld_init ( void )

Low level CAN driver initialization.

Function Class:
Not an API, this function is for internal use only.

Definition at line 65 of file hal_can_lld.c.

References CAND1, and canObjectInit().

Referenced by canInit().

Here is the call graph for this function:

◆ can_lld_start()

void can_lld_start ( CANDriver * canp)

Configures and activates the CAN peripheral.

Parameters
[in]canppointer to the CANDriver object
Function Class:
Not an API, this function is for internal use only.

Definition at line 80 of file hal_can_lld.c.

References CAN_STOP, CAND1, and hal_can_driver::state.

Referenced by canStart().

◆ can_lld_stop()

void can_lld_stop ( CANDriver * canp)

Deactivates the CAN peripheral.

Parameters
[in]canppointer to the CANDriver object
Function Class:
Not an API, this function is for internal use only.

Definition at line 101 of file hal_can_lld.c.

References CAN_READY, CAND1, and hal_can_driver::state.

Referenced by canStop().

◆ can_lld_is_tx_empty()

bool can_lld_is_tx_empty ( CANDriver * canp,
canmbx_t mailbox )

Determines whether a frame can be transmitted.

Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number, CAN_ANY_MAILBOX for any mailbox
Returns
The queue space availability.
Return values
falseno space in the transmit queue.
truetransmit slot available.
Function Class:
Not an API, this function is for internal use only.

Definition at line 127 of file hal_can_lld.c.

References CAN_ANY_MAILBOX.

Referenced by canTransmitTimeout(), and canTryTransmitI().

◆ can_lld_transmit()

void can_lld_transmit ( CANDriver * canp,
canmbx_t mailbox,
const CANTxFrame * ctfp )

Inserts a frame into the transmit queue.

Parameters
[in]canppointer to the CANDriver object
[in]ctfppointer to the CAN frame to be transmitted
[in]mailboxmailbox number, CAN_ANY_MAILBOX for any mailbox
Function Class:
Not an API, this function is for internal use only.

Definition at line 154 of file hal_can_lld.c.

Referenced by canTransmitTimeout(), and canTryTransmitI().

◆ can_lld_is_rx_nonempty()

bool can_lld_is_rx_nonempty ( CANDriver * canp,
canmbx_t mailbox )

Determines whether a frame has been received.

Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number, CAN_ANY_MAILBOX for any mailbox
Returns
The queue space availability.
Return values
falseno space in the transmit queue.
truetransmit slot available.
Function Class:
Not an API, this function is for internal use only.

Definition at line 176 of file hal_can_lld.c.

References CAN_ANY_MAILBOX.

Referenced by canReceiveTimeout(), and canTryReceiveI().

◆ can_lld_receive()

void can_lld_receive ( CANDriver * canp,
canmbx_t mailbox,
CANRxFrame * crfp )

Receives a frame from the input queue.

Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number, CAN_ANY_MAILBOX for any mailbox
[out]crfppointer to the buffer where the CAN frame is copied
Function Class:
Not an API, this function is for internal use only.

Definition at line 202 of file hal_can_lld.c.

Referenced by canReceiveTimeout(), and canTryReceiveI().

◆ can_lld_abort()

void can_lld_abort ( CANDriver * canp,
canmbx_t mailbox )

Tries to abort an ongoing transmission.

Parameters
[in]canppointer to the CANDriver object
[in]mailboxmailbox number
Function Class:
Not an API, this function is for internal use only.

Definition at line 220 of file hal_can_lld.c.

Referenced by canTryAbortX().

◆ can_lld_sleep()

void can_lld_sleep ( CANDriver * canp)

Enters the sleep mode.

Parameters
[in]canppointer to the CANDriver object
Function Class:
Not an API, this function is for internal use only.

Definition at line 235 of file hal_can_lld.c.

Referenced by canSleep().

◆ can_lld_wakeup()

void can_lld_wakeup ( CANDriver * canp)

Enforces leaving the sleep mode.

Parameters
[in]canppointer to the CANDriver object
Function Class:
Not an API, this function is for internal use only.

Definition at line 248 of file hal_can_lld.c.

Referenced by canWakeup().

Variable Documentation

◆ CAND1

CANDriver CAND1

CAN1 driver identifier.

Definition at line 41 of file hal_can_lld.c.

Referenced by can_lld_init(), can_lld_start(), and can_lld_stop().