This driver for AtmelĀ® | SMART SAM devices provides an low level interface for the configuration and management of the device's Control Area Network functionality.
For storage of Rx/Tx messages and for storage of the filter configuration, a message RAM is needed to the CAN module. In this driver, the message RAM is static allocated, the related setting is defined and can be changed in the module configuration file "conf_mcan.h".
The following peripherals are used by this module:
The following devices can use this module:
The outline of this documentation is as follows:
There are no prerequisites for this module.
This driver provides an interface for the Control Area Network Controller functions on the device.
There are no special considerations for this module.
For extra information see asfdoc_sam_mcan_extra. This includes:
For a list of examples related to this driver, see Examples for MCAN Driver.
Modules | |
Quick Start Guide(s) | |
In this section you can find a list of all Quick Start guides related to the SAM Control Area Network (MCAN) Low Level Driver. | |
Data Structures | |
struct | mcan_config |
MCAN configuration structure. More... | |
struct | mcan_module |
MCAN software device instance structure. More... | |
Module Setting | |
enum | mcan_timeout_mode { MCAN_TIMEOUT_CONTINUES = MCAN_TOCC_TOS_CONTINUOUS, MCAN_TIMEOUT_TX_EVEN_FIFO = MCAN_TOCC_TOS_TX_EV_TIMEOUT, MCAN_TIMEOUT_RX_FIFO_0 = MCAN_TOCC_TOS_RX0_EV_TIMEOUT, MCAN_TIMEOUT_RX_FIFO_1 = MCAN_TOCC_TOS_RX1_EV_TIMEOUT } |
Can time out modes. More... | |
enum | mcan_nonmatching_frames_action { MCAN_NONMATCHING_FRAMES_FIFO_0, MCAN_NONMATCHING_FRAMES_FIFO_1, MCAN_NONMATCHING_FRAMES_REJECT } |
Can nonmatching frames action. More... | |
static void | mcan_get_config_defaults (struct mcan_config *const config) |
Initializes an MCAN configuration structure to defaults. More... | |
void | mcan_init (struct mcan_module *const module_inst, Mcan *hw, struct mcan_config *config) |
initialize can module. More... | |
void | mcan_set_baudrate (Mcan *hw, uint32_t baudrate) |
Set MCAN baudrate. More... | |
void | mcan_fd_set_baudrate (Mcan *hw, uint32_t baudrate) |
Set MCAN_FD baudrate. More... | |
void | mcan_start (struct mcan_module *const module_inst) |
start can module after initialization. More... | |
void | mcan_stop (struct mcan_module *const module_inst) |
stop mcan module when bus off occurs More... | |
void | mcan_enable_fd_mode (struct mcan_module *const module_inst) |
switch mcan module into fd mode. More... | |
void | mcan_disable_fd_mode (struct mcan_module *const module_inst) |
disable fd mode of mcan module. More... | |
void | mcan_enable_restricted_operation_mode (struct mcan_module *const module_inst) |
enable restricted mode of mcan module. More... | |
void | mcan_disable_restricted_operation_mode (struct mcan_module *const module_inst) |
disable restricted mode of mcan module. More... | |
void | mcan_enable_bus_monitor_mode (struct mcan_module *const module_inst) |
enable bus monitor mode of mcan module. More... | |
void | mcan_disable_bus_monitor_mode (struct mcan_module *const module_inst) |
disable bus monitor mode of mcan module. More... | |
void | mcan_enable_sleep_mode (struct mcan_module *const module_inst) |
enable sleep mode of mcan module. More... | |
void | mcan_disable_sleep_mode (struct mcan_module *const module_inst) |
disable sleep mode of mcan module. More... | |
void | mcan_enable_test_mode (struct mcan_module *const module_inst) |
enable test mode of mcan module. More... | |
void | mcan_disable_test_mode (struct mcan_module *const module_inst) |
disable test mode of mcan module. More... | |
static uint16_t | mcan_read_timestamp_count_value (struct mcan_module *const module_inst) |
Can read timestamp count value. More... | |
static uint16_t | mcan_read_timeout_count_value (struct mcan_module *const module_inst) |
Can read timeout count value. More... | |
static uint32_t | mcan_read_error_count (struct mcan_module *const module_inst) |
Can read error count. More... | |
static uint32_t | mcan_read_protocal_status (struct mcan_module *const module_inst) |
Can read protocol status. More... | |
Rx Handling | |
enum | mcan_interrupt_source { MCAN_RX_FIFO_0_NEW_MESSAGE = MCAN_IE_RF0NE, MCAN_RX_FIFO_0_WATERMARK = MCAN_IE_RF0WE, MCAN_RX_FIFO_0_FULL = MCAN_IE_RF0FE, MCAN_RX_FIFO_0_LOST_MESSAGE = MCAN_IE_RF0LE, MCAN_RX_FIFO_1_NEW_MESSAGE = MCAN_IE_RF1NE, MCAN_RX_FIFO_1_WATERMARK = MCAN_IE_RF1WE, MCAN_RX_FIFO_1_FULL = MCAN_IE_RF1FE, MCAN_RX_FIFO_1_MESSAGE_LOST = MCAN_IE_RF1LE, MCAN_RX_HIGH_PRIORITY_MESSAGE = MCAN_IE_HPME, MCAN_TIMESTAMP_COMPLETE = MCAN_IE_TCE, MCAN_TX_CANCELLATION_FINISH = MCAN_IE_TCFE, MCAN_TX_FIFO_EMPTY = MCAN_IE_TFEE, MCAN_TX_EVENT_FIFO_NEW_ENTRY = MCAN_IE_TEFNE, MCAN_TX_EVENT_FIFO_WATERMARK = MCAN_IE_TEFWE, MCAN_TX_EVENT_FIFO_FULL = MCAN_IE_TEFFE, MCAN_TX_EVENT_FIFO_ELEMENT_LOST = MCAN_IE_TEFLE, MCAN_TIMESTAMP_WRAPAROUND = MCAN_IE_TSWE, MCAN_MESSAGE_RAM_ACCESS_FAILURE = MCAN_IE_MRAFE, MCAN_TIMEOUT_OCCURRED = MCAN_IE_TOOE, MCAN_RX_BUFFER_NEW_MESSAGE = MCAN_IE_DRXE, MCAN_ERROR_LOGGING_OVERFLOW = MCAN_IE_ELOE, MCAN_ERROR_PASSIVE = MCAN_IE_EPE, MCAN_WARNING_STATUS = MCAN_IE_EWE, MCAN_BUS_OFF = MCAN_IE_BOE, MCAN_WATCHDOG = MCAN_IE_WDIE, MCAN_CRC_ERROR = MCAN_IE_CRCEE, MCAN_BIT_ERROR = MCAN_IE_BEE, MCAN_ACKNOWLEDGE_ERROR = MCAN_IE_ACKEE, MCAN_FORMAT_ERROR = MCAN_IE_FOEE, MCAN_STUFF_ERROR = MCAN_IE_STEE } |
Can module interrupt source. More... | |
static uint32_t | mcan_read_high_priority_message_status (struct mcan_module *const module_inst) |
Read high priority message status. More... | |
static bool | mcan_rx_get_buffer_status (struct mcan_module *const module_inst, uint32_t index) |
Get Rx buffer status. More... | |
static void | mcan_rx_clear_buffer_status (struct mcan_module *const module_inst, uint32_t index) |
Clear Rx buffer status. More... | |
static uint32_t | mcan_rx_get_fifo_status (struct mcan_module *const module_inst, bool fifo_number) |
Get Rx FIFO status. More... | |
static void | mcan_rx_fifo_acknowledge (struct mcan_module *const module_inst, bool fifo_number, uint32_t index) |
Set Rx acknowledge. More... | |
static void | mcan_get_standard_message_filter_element_default (struct mcan_standard_message_filter_element *sd_filter) |
Get the standard message filter default value. More... | |
enum status_code | mcan_set_rx_standard_filter (struct mcan_module *const module_inst, struct mcan_standard_message_filter_element *sd_filter, uint32_t index) |
set standard receive CAN ID. More... | |
static void | mcan_get_extended_message_filter_element_default (struct mcan_extended_message_filter_element *et_filter) |
Get the extended message filter default value. More... | |
enum status_code | mcan_set_rx_extended_filter (struct mcan_module *const module_inst, struct mcan_extended_message_filter_element *et_filter, uint32_t index) |
set extended receive CAN ID. More... | |
enum status_code | mcan_get_rx_buffer_element (struct mcan_module *const module_inst, struct mcan_rx_element_buffer *rx_element, uint32_t index) |
get dedicated rx buffer element . More... | |
enum status_code | mcan_get_rx_fifo_0_element (struct mcan_module *const module_inst, struct mcan_rx_element_fifo_0 *rx_element, uint32_t index) |
get FIFO rx buffer element . More... | |
enum status_code | mcan_get_rx_fifo_1_element (struct mcan_module *const module_inst, struct mcan_rx_element_fifo_1 *rx_element, uint32_t index) |
get FIFO rx buffer element . More... | |
static uint32_t | mcan_tx_get_fifo_queue_status (struct mcan_module *const module_inst) |
Get Tx FIFO/Queue status. More... | |
static uint32_t | mcan_tx_get_pending_status (struct mcan_module *const module_inst) |
Get Tx buffer request pending status. More... | |
static enum status_code | mcan_tx_transfer_request (struct mcan_module *const module_inst, uint32_t trig_mask) |
Tx buffer add transfer request. More... | |
static enum status_code | mcan_tx_cancel_request (struct mcan_module *const module_inst, uint32_t trig_mask) |
Set Tx Queue operation. More... | |
static uint32_t | mcan_tx_get_transmission_status (struct mcan_module *const module_inst) |
Get Tx transmission status. More... | |
static uint32_t | mcan_tx_get_cancellation_status (struct mcan_module *const module_inst) |
Get Tx cancellation status. More... | |
static uint32_t | mcan_tx_get_event_fifo_status (struct mcan_module *const module_inst) |
Get Tx event FIFO status. More... | |
static void | mcan_tx_event_fifo_acknowledge (struct mcan_module *const module_inst, uint32_t index) |
Set Tx Queue operation. More... | |
static void | mcan_get_tx_buffer_element_defaults (struct mcan_tx_element *tx_element) |
Get the default transfer buffer element. More... | |
enum status_code | mcan_set_tx_buffer_element (struct mcan_module *const module_inst, struct mcan_tx_element *tx_element, uint32_t index) |
set dedicated transmit buffer element . More... | |
enum status_code | mcan_get_tx_event_fifo_element (struct mcan_module *const module_inst, struct mcan_tx_event_element *tx_event_element, uint32_t index) |
set FIFO transmit buffer element . More... | |
static void | mcan_enable_interrupt (struct mcan_module *const module_inst, const enum mcan_interrupt_source source) |
Enable MCAN interrupt. More... | |
static void | mcan_disable_interrupt (struct mcan_module *const module_inst, const enum mcan_interrupt_source source) |
Disable MCAN interrupt. More... | |
static uint32_t | mcan_read_interrupt_status (struct mcan_module *const module_inst) |
Get MCAN interrupt status. More... | |
static void | mcan_clear_interrupt_status (struct mcan_module *const module_inst, const enum mcan_interrupt_source source) |
Clear MCAN interrupt status. More... | |
Can module interrupt source.
Enum for the interrupt source.
enum mcan_timeout_mode |
|
inlinestatic |
Clear MCAN interrupt status.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | source | Interrupt source type |
void mcan_disable_bus_monitor_mode | ( | struct mcan_module *const | module_inst | ) |
disable bus monitor mode of mcan module.
module_inst | MCAN instance |
void mcan_disable_fd_mode | ( | struct mcan_module *const | module_inst | ) |
disable fd mode of mcan module.
module_inst | MCAN instance |
|
inlinestatic |
Disable MCAN interrupt.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | source | Interrupt source type |
void mcan_disable_restricted_operation_mode | ( | struct mcan_module *const | module_inst | ) |
disable restricted mode of mcan module.
module_inst | MCAN instance |
void mcan_disable_sleep_mode | ( | struct mcan_module *const | module_inst | ) |
disable sleep mode of mcan module.
module_inst | MCAN instance |
References _mcan_enable_peripheral_clock().
void mcan_disable_test_mode | ( | struct mcan_module *const | module_inst | ) |
disable test mode of mcan module.
module_inst | MCAN instance |
void mcan_enable_bus_monitor_mode | ( | struct mcan_module *const | module_inst | ) |
enable bus monitor mode of mcan module.
module_inst | MCAN instance |
void mcan_enable_fd_mode | ( | struct mcan_module *const | module_inst | ) |
switch mcan module into fd mode.
module_inst | MCAN instance |
|
inlinestatic |
Enable MCAN interrupt.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | source | Interrupt source type |
void mcan_enable_restricted_operation_mode | ( | struct mcan_module *const | module_inst | ) |
enable restricted mode of mcan module.
module_inst | MCAN instance |
void mcan_enable_sleep_mode | ( | struct mcan_module *const | module_inst | ) |
enable sleep mode of mcan module.
module_inst | MCAN instance |
void mcan_enable_test_mode | ( | struct mcan_module *const | module_inst | ) |
enable test mode of mcan module.
module_inst | MCAN instance |
void mcan_fd_set_baudrate | ( | Mcan * | hw, |
uint32_t | baudrate | ||
) |
Set MCAN_FD baudrate.
[in] | hw | Pointer to the MCAN_FD module instance |
[in] | baudrate | MCAN_FD baudrate |
References genclk_get_frequency_hz(), and PMC_PCK_5.
|
inlinestatic |
Initializes an MCAN configuration structure to defaults.
Initializes a given MCAN configuration struct to a set of known default values. This function should be called on any new instance of the configuration struct before being modified by the user application.
The default configuration is as follows:
[out] | config | Pointer to configuration struct to initialize to default values |
References Assert, mcan_config::automatic_retransmission, mcan_config::clock_stop_acknowledge, mcan_config::clock_stop_request, mcan_config::delay_compensation_offset, mcan_config::edge_filtering, mcan_config::extended_id_mask, MCAN_NONMATCHING_FRAMES_REJECT, MCAN_TIMEOUT_CONTINUES, mcan_config::nonmatching_frames_action_extended, mcan_config::nonmatching_frames_action_standard, mcan_config::protocol_exception_handling, mcan_config::remote_frames_extended_reject, mcan_config::remote_frames_standard_reject, mcan_config::run_in_standby, mcan_config::rx_fifo_0_overwrite, mcan_config::rx_fifo_0_watermark, mcan_config::rx_fifo_1_overwrite, mcan_config::rx_fifo_1_watermark, mcan_config::tdc_enable, mcan_config::timeout_enable, mcan_config::timeout_mode, mcan_config::timeout_period, mcan_config::timestamp_prescaler, mcan_config::transmit_pause, mcan_config::tx_event_fifo_watermark, mcan_config::tx_queue_mode, and mcan_config::watchdog_configuration.
|
inlinestatic |
Get the extended message filter default value.
The default configuration is as follows:
[out] | et_filter | Pointer to extended filter element struct to initialize to default values |
References mcan_extended_message_filter_element::F0, mcan_extended_message_filter_element::F1, MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC, MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STF1M_Val, MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1, MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Msk, MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_CLASSIC, MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_Type::reg, and MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_Type::reg.
enum status_code mcan_get_rx_buffer_element | ( | struct mcan_module *const | module_inst, |
struct mcan_rx_element_buffer * | rx_element, | ||
uint32_t | index | ||
) |
get dedicated rx buffer element .
module_inst | MCAN instance |
rx_element | structure of element |
index | CAN messages memory index for receiving CAN ID |
References ERR_INVALID_ARG, mcan0_rx_buffer, mcan1_rx_buffer, and STATUS_OK.
enum status_code mcan_get_rx_fifo_0_element | ( | struct mcan_module *const | module_inst, |
struct mcan_rx_element_fifo_0 * | rx_element, | ||
uint32_t | index | ||
) |
get FIFO rx buffer element .
module_inst | MCAN instance |
rx_element | structure of element |
index | CAN messages memory index for receiving CAN ID |
References ERR_INVALID_ARG, mcan0_rx_fifo_0, mcan1_rx_fifo_0, and STATUS_OK.
enum status_code mcan_get_rx_fifo_1_element | ( | struct mcan_module *const | module_inst, |
struct mcan_rx_element_fifo_1 * | rx_element, | ||
uint32_t | index | ||
) |
get FIFO rx buffer element .
module_inst | MCAN instance |
rx_element | structure of element |
index | CAN messages memory index for receiving CAN ID |
References ERR_INVALID_ARG, mcan0_rx_fifo_1, mcan1_rx_fifo_1, and STATUS_OK.
|
inlinestatic |
Get the standard message filter default value.
The default configuration is as follows:
[out] | sd_filter | Pointer to standard filter element struct to initialize to default values |
References MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC, MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STF0M_Val, MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1, MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Msk, MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_CLASSIC, MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_Type::reg, and mcan_standard_message_filter_element::S0.
|
inlinestatic |
Get the default transfer buffer element.
The default configuration is as follows:
[out] | tx_element | Pointer to transfer element struct to initialize to default values |
References MCAN_TX_ELEMENT_T1_DLC, MCAN_TX_ELEMENT_T1_DLC_DATA8_Val, MCAN_TX_ELEMENT_T1_EFC, MCAN_TX_ELEMENT_T0_Type::reg, MCAN_TX_ELEMENT_T1_Type::reg, mcan_tx_element::T0, and mcan_tx_element::T1.
enum status_code mcan_get_tx_event_fifo_element | ( | struct mcan_module *const | module_inst, |
struct mcan_tx_event_element * | tx_event_element, | ||
uint32_t | index | ||
) |
set FIFO transmit buffer element .
module_inst | MCAN instance |
tx_element | structure of element |
index | CAN messages memory index for transmitting CAN ID |
References mcan_tx_event_element::E0, mcan_tx_event_element::E1, ERR_INVALID_ARG, mcan0_tx_event_fifo, mcan1_tx_event_fifo, MCAN_TX_EVENT_ELEMENT_E0_Type::reg, MCAN_TX_EVENT_ELEMENT_E1_Type::reg, and STATUS_OK.
void mcan_init | ( | struct mcan_module *const | module_inst, |
Mcan * | hw, | ||
struct mcan_config * | config | ||
) |
initialize can module.
module_inst | MCAN instance |
hw | Base address of MCAN. |
config | default configuration . |
References _mcan_enable_peripheral_clock(), _mcan_message_memory_init(), _mcan_set_configuration(), Assert, pmc_disable_pck(), pmc_enable_pck(), PMC_PCK_5, and pmc_switch_pck_to_pllack().
|
inlinestatic |
Can read error count.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Read high priority message status.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Get MCAN interrupt status.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Can read protocol status.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Can read timeout count value.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Can read timestamp count value.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Clear Rx buffer status.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | index | Index offset in Rx buffer |
|
inlinestatic |
Set Rx acknowledge.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | fifo_number | Rx FIFO 0 or 1 |
[in] | index | Index offset in FIFO |
|
inlinestatic |
Get Rx buffer status.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | index | Index offset in Rx buffer |
true | Rx Buffer updated from new message. |
false | Rx Buffer not updated. |
|
inlinestatic |
Get Rx FIFO status.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | fifo_number | Rx FIFO 0 or 1 |
void mcan_set_baudrate | ( | Mcan * | hw, |
uint32_t | baudrate | ||
) |
Set MCAN baudrate.
[in] | hw | Pointer to the MCAN module instance |
[in] | baudrate | MCAN baudrate |
References genclk_get_frequency_hz(), and PMC_PCK_5.
enum status_code mcan_set_rx_extended_filter | ( | struct mcan_module *const | module_inst, |
struct mcan_extended_message_filter_element * | et_filter, | ||
uint32_t | index | ||
) |
set extended receive CAN ID.
module_inst | MCAN instance |
sd_filter | structure of extended CAN ID |
index | CAN messages memory index for different CAN ID |
References ERR_INVALID_ARG, mcan_extended_message_filter_element::F0, mcan_extended_message_filter_element::F1, mcan0_rx_extended_filter, mcan1_rx_extended_filter, MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_Type::reg, MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_Type::reg, and STATUS_OK.
enum status_code mcan_set_rx_standard_filter | ( | struct mcan_module *const | module_inst, |
struct mcan_standard_message_filter_element * | sd_filter, | ||
uint32_t | index | ||
) |
set standard receive CAN ID.
module_inst | MCAN instance |
sd_filter | structure of CAN ID |
index | CAN messages memory index for different CAN ID |
References ERR_INVALID_ARG, mcan0_rx_standard_filter, mcan1_rx_standard_filter, MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_Type::reg, mcan_standard_message_filter_element::S0, and STATUS_OK.
enum status_code mcan_set_tx_buffer_element | ( | struct mcan_module *const | module_inst, |
struct mcan_tx_element * | tx_element, | ||
uint32_t | index | ||
) |
set dedicated transmit buffer element .
module_inst | MCAN instance |
tx_element | structure of element |
index | CAN messages memory index for transmitting CAN ID |
References mcan_tx_element::data, ERR_INVALID_ARG, mcan0_tx_buffer, mcan1_tx_buffer, MCAN_TX_ELEMENT_T0_Type::reg, MCAN_TX_ELEMENT_T1_Type::reg, STATUS_OK, mcan_tx_element::T0, and mcan_tx_element::T1.
void mcan_start | ( | struct mcan_module *const | module_inst | ) |
start can module after initialization.
module_inst | MCAN instance |
void mcan_stop | ( | struct mcan_module *const | module_inst | ) |
stop mcan module when bus off occurs
module_inst | MCAN instance |
|
inlinestatic |
Set Tx Queue operation.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | trig_mask | The mask value to cancel transfer buffer |
STATUS_OK | Set the transfer request. |
STATUS_BUSY | The module is in configuration. |
References STATUS_ERR_BUSY, and STATUS_OK.
|
inlinestatic |
Set Tx Queue operation.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | index | Index for the transfer FIFO |
|
inlinestatic |
Get Tx cancellation status.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Get Tx event FIFO status.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Get Tx FIFO/Queue status.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Get Tx buffer request pending status.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Get Tx transmission status.
[in] | module_inst | Pointer to the MCAN software instance struct |
|
inlinestatic |
Tx buffer add transfer request.
[in] | module_inst | Pointer to the MCAN software instance struct |
[in] | trig_mask | The mask value to trigger transfer buffer |
STATUS_OK | Set the transfer request. |
STATUS_ERR_BUSY | The module is in configuration. |