Classes
drivers/mcan/mcan.h File Reference

SAM Control Area Network (MCAN) Low Level Driver. More...

#include <compiler.h>
#include <conf_mcan.h>
#include "status_codes.h"
Include dependency graph for drivers/mcan/mcan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mcan_config
 MCAN configuration structure. More...
 
struct  mcan_extended_message_filter_element
 MCAN extended message ID filter element structure. More...
 
union  MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_Type
 
union  MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_Type
 
struct  mcan_module
 MCAN software device instance structure. More...
 
struct  mcan_rx_element_buffer
 MCAN receive element structure for buffer. More...
 
struct  mcan_rx_element_fifo_0
 MCAN receive element structure for FIFO 0. More...
 
struct  mcan_rx_element_fifo_1
 MCAN receive element structure for FIFO 1. More...
 
union  MCAN_RX_ELEMENT_R0_Type
 
union  MCAN_RX_ELEMENT_R1_Type
 
struct  mcan_standard_message_filter_element
 MCAN standard message ID filter element structure. More...
 
union  MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_Type
 
struct  mcan_tx_element
 MCAN transfer element structure. More...
 
union  MCAN_TX_ELEMENT_T0_Type
 
union  MCAN_TX_ELEMENT_T1_Type
 
struct  mcan_tx_event_element
 MCAN transfer event FIFO element structure. More...
 
union  MCAN_TX_EVENT_ELEMENT_E0_Type
 
union  MCAN_TX_EVENT_ELEMENT_E1_Type
 

Macros

Message RAM
#define MCAN_RX_ELEMENT_R0_ID_Pos   0
 
#define MCAN_RX_ELEMENT_R0_ID_Msk   (0x1FFFFFFFul << MCAN_RX_ELEMENT_R0_ID_Pos)
 
#define MCAN_RX_ELEMENT_R0_ID(value)   ((MCAN_RX_ELEMENT_R0_ID_Msk & ((value) << MCAN_RX_ELEMENT_R0_ID_Pos)))
 
#define MCAN_RX_ELEMENT_R0_RTR_Pos   29
 
#define MCAN_RX_ELEMENT_R0_RTR   (0x1ul << MCAN_RX_ELEMENT_R0_RTR_Pos)
 
#define MCAN_RX_ELEMENT_R0_XTD_Pos   30
 
#define MCAN_RX_ELEMENT_R0_XTD   (0x1ul << MCAN_RX_ELEMENT_R0_XTD_Pos)
 
#define MCAN_RX_ELEMENT_R0_ESI_Pos   31
 
#define MCAN_RX_ELEMENT_R0_ESI   (0x1ul << MCAN_RX_ELEMENT_R0_ESI_Pos)
 
#define MCAN_RX_ELEMENT_R1_RXTS_Pos   0
 
#define MCAN_RX_ELEMENT_R1_RXTS_Msk   (0xFFFFul << MCAN_RX_ELEMENT_R1_RXTS_Pos)
 
#define MCAN_RX_ELEMENT_R1_RXTS(value)   ((MCAN_RX_ELEMENT_R1_RXTS_Msk & ((value) << MCAN_RX_ELEMENT_R1_RXTS_Pos)))
 
#define MCAN_RX_ELEMENT_R1_DLC_Pos   16
 
#define MCAN_RX_ELEMENT_R1_DLC_Msk   (0xFul << MCAN_RX_ELEMENT_R1_DLC_Pos)
 
#define MCAN_RX_ELEMENT_R1_DLC(value)   ((MCAN_RX_ELEMENT_R1_DLC_Msk & ((value) << MCAN_RX_ELEMENT_R1_DLC_Pos)))
 
#define MCAN_RX_ELEMENT_R1_BRS_Pos   20
 
#define MCAN_RX_ELEMENT_R1_BRS   (0x1ul << MCAN_RX_ELEMENT_R1_BRS_Pos)
 
#define MCAN_RX_ELEMENT_R1_FDF_Pos   21
 
#define MCAN_RX_ELEMENT_R1_FDF   (0x1ul << MCAN_RX_ELEMENT_R1_FDF_Pos)
 
#define MCAN_RX_ELEMENT_R1_FIDX_Pos   24
 
#define MCAN_RX_ELEMENT_R1_FIDX_Msk   (0x7Ful << MCAN_RX_ELEMENT_R1_FIDX_Pos)
 
#define MCAN_RX_ELEMENT_R1_FIDX(value)   ((MCAN_RX_ELEMENT_R1_FIDX_Msk & ((value) << MCAN_RX_ELEMENT_R1_FIDX_Pos)))
 
#define MCAN_RX_ELEMENT_R1_ANMF_Pos   31
 
#define MCAN_RX_ELEMENT_R1_ANMF   (0x1ul << MCAN_RX_ELEMENT_R1_ANMF_Pos)
 
#define MCAN_TX_ELEMENT_T0_EXTENDED_ID_Pos   0
 
#define MCAN_TX_ELEMENT_T0_EXTENDED_ID_Msk   (0x1FFFFFFFul << MCAN_TX_ELEMENT_T0_EXTENDED_ID_Pos)
 
#define MCAN_TX_ELEMENT_T0_EXTENDED_ID(value)   ((MCAN_TX_ELEMENT_T0_EXTENDED_ID_Msk & ((value) << MCAN_TX_ELEMENT_T0_EXTENDED_ID_Pos)))
 
#define MCAN_TX_ELEMENT_T0_STANDARD_ID_Pos   18
 
#define MCAN_TX_ELEMENT_T0_STANDARD_ID_Msk   (0x7FFul << MCAN_TX_ELEMENT_T0_STANDARD_ID_Pos)
 
#define MCAN_TX_ELEMENT_T0_STANDARD_ID(value)   ((MCAN_TX_ELEMENT_T0_STANDARD_ID_Msk & ((value) << MCAN_TX_ELEMENT_T0_STANDARD_ID_Pos)))
 
#define MCAN_TX_ELEMENT_T0_RTR_Pos   29
 
#define MCAN_TX_ELEMENT_T0_RTR   (0x1ul << MCAN_TX_ELEMENT_T0_RTR_Pos)
 
#define MCAN_TX_ELEMENT_T0_XTD_Pos   30
 
#define MCAN_TX_ELEMENT_T0_XTD   (0x1ul << MCAN_TX_ELEMENT_T0_XTD_Pos)
 
#define MCAN_TX_ELEMENT_T1_DLC_Pos   16
 
#define MCAN_TX_ELEMENT_T1_DLC_Msk   (0xFul << MCAN_TX_ELEMENT_T1_DLC_Pos)
 
#define MCAN_TX_ELEMENT_T1_DLC(value)   ((MCAN_TX_ELEMENT_T1_DLC_Msk & ((value) << MCAN_TX_ELEMENT_T1_DLC_Pos)))
 (MCAN_RXESC) 8 byte data field More...
 
#define MCAN_TX_ELEMENT_T1_DLC_DATA8_Val   0x8ul
 (MCAN_RXESC) 12 byte data field More...
 
#define MCAN_TX_ELEMENT_T1_DLC_DATA12_Val   0x9ul
 (MCAN_RXESC) 16 byte data field More...
 
#define MCAN_TX_ELEMENT_T1_DLC_DATA16_Val   0xAul
 (MCAN_RXESC) 20 byte data field More...
 
#define MCAN_TX_ELEMENT_T1_DLC_DATA20_Val   0xBul
 (MCAN_RXESC) 24 byte data field More...
 
#define MCAN_TX_ELEMENT_T1_DLC_DATA24_Val   0xCul
 (MCAN_RXESC) 32 byte data field More...
 
#define MCAN_TX_ELEMENT_T1_DLC_DATA32_Val   0xDul
 (MCAN_RXESC) 48 byte data field More...
 
#define MCAN_TX_ELEMENT_T1_DLC_DATA48_Val   0xEul
 (MCAN_RXESC) 64 byte data field More...
 
#define MCAN_TX_ELEMENT_T1_DLC_DATA64_Val   0xFul
 
#define MCAN_TX_ELEMENT_T1_EFC_Pos   23
 
#define MCAN_TX_ELEMENT_T1_EFC   (0x1ul << MCAN_TX_ELEMENT_T1_EFC_Pos)
 
#define MCAN_TX_ELEMENT_T1_MM_Pos   24
 
#define MCAN_TX_ELEMENT_T1_MM_Msk   (0xFFul << MCAN_TX_ELEMENT_T1_MM_Pos)
 
#define MCAN_TX_ELEMENT_T1_MM(value)   ((MCAN_TX_ELEMENT_T1_MM_Msk & ((value) << MCAN_TX_ELEMENT_T1_MM_Pos)))
 
#define MCAN_TX_EVENT_ELEMENT_E0_ID_Pos   0
 
#define MCAN_TX_EVENT_ELEMENT_E0_ID_Msk   (0x1FFFFFFFul << MCAN_TX_EVENT_ELEMENT_E0_ID_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E0_ID(value)   ((MCAN_TX_EVENT_ELEMENT_E0_ID_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E0_ID_Pos)))
 
#define MCAN_TX_EVENT_ELEMENT_E0_RTR_Pos   29
 
#define MCAN_TX_EVENT_ELEMENT_E0_RTR   (0x1ul << MCAN_TX_EVENT_ELEMENT_E0_RTR_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E0_XTD_Pos   30
 
#define MCAN_TX_EVENT_ELEMENT_E0_XTD   (0x1ul << MCAN_TX_EVENT_ELEMENT_E0_XTD_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E0_ESI_Pos   31
 
#define MCAN_TX_EVENT_ELEMENT_E0_ESI   (0x1ul << MCAN_TX_EVENT_ELEMENT_E0_ESI_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E1_TXTS_Pos   0
 
#define MCAN_TX_EVENT_ELEMENT_E1_TXTS_Msk   (0xFFFFul << MCAN_TX_EVENT_ELEMENT_E1_TXTS_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E1_TXTS(value)   ((MCAN_TX_EVENT_ELEMENT_E1_TXTS_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E1_TXTS_Pos)))
 
#define MCAN_TX_EVENT_ELEMENT_E1_DLC_Pos   16
 
#define MCAN_TX_EVENT_ELEMENT_E1_DLC_Msk   (0xFul << MCAN_TX_EVENT_ELEMENT_E1_DLC_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E1_DLC(value)   ((MCAN_TX_EVENT_ELEMENT_E1_DLC_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E1_DLC_Pos)))
 
#define MCAN_TX_EVENT_ELEMENT_E1_BRS_Pos   20
 
#define MCAN_TX_EVENT_ELEMENT_E1_BRS   (0x1ul << MCAN_TX_EVENT_ELEMENT_E1_BRS_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E1_FDF_Pos   21
 
#define MCAN_TX_EVENT_ELEMENT_E1_FDF   (0x1ul << MCAN_TX_EVENT_ELEMENT_E1_FDF_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E1_ET_Pos   22
 
#define MCAN_TX_EVENT_ELEMENT_E1_ET_Msk   (0x3ul << MCAN_TX_EVENT_ELEMENT_E1_ET_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E1_ET(value)   ((MCAN_TX_EVENT_ELEMENT_E1_ET_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E1_ET_Pos)))
 
#define MCAN_TX_EVENT_ELEMENT_E1_MM_Pos   24
 
#define MCAN_TX_EVENT_ELEMENT_E1_MM_Msk   (0xFFul << MCAN_TX_EVENT_ELEMENT_E1_MM_Pos)
 
#define MCAN_TX_EVENT_ELEMENT_E1_MM(value)   ((MCAN_TX_EVENT_ELEMENT_E1_MM_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E1_MM_Pos)))
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Pos   0
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Msk   (0x7FFul << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Pos)
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2(value)   ((MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Msk & ((value) << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Pos)))
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Pos   16
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Msk   (0x7FFul << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Pos)
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1(value)   ((MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Msk & ((value) << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Pos)))
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Pos   27
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Msk   (0x7ul << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Pos)
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC(value)   ((MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Msk & ((value) << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Pos)))
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_DISABLE_Val   0
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STF0M_Val   1
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STF1M_Val   2
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_REJECT_Val   3
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIORITY_Val   4
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIF0M_Val   5
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIF1M_Val   6
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STRXBUF_Val   7
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Pos   30
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Msk   (0x3ul << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Pos)
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT(value)   ((MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Msk & ((value) << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Pos)))
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_RANGE   MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT(0)
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_DUAL   MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT(1)
 
#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_CLASSIC   MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT(2)
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Pos   0
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Msk   (0x1FFFFFFFul << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Pos)
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1(value)   ((MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Msk & ((value) << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Pos)))
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Pos   29
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Msk   (0x7ul << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Pos)
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC(value)   ((MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Msk & ((value) << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Pos)))
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_DISABLE_Val   0
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STF0M_Val   1
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STF1M_Val   2
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_REJECT_Val   3
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIORITY_Val   4
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIF0M_Val   5
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIF1M_Val   6
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STRXBUF_Val   7
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Pos   0
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Msk   (0x1FFFFFFFul << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Pos)
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2(value)   ((MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Msk & ((value) << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Pos)))
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Pos   30
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Msk   (0x3ul << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Pos)
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(value)   ((MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Msk & ((value) << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Pos)))
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_RANGEM   MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(0)
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_DUAL   MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(1)
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_CLASSIC   MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(2)
 
#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_RANGE   MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(3)
 

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...
 

Detailed Description

SAM Control Area Network (MCAN) Low Level Driver.

Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.

Definition in file drivers/mcan/mcan.h.

Macro Definition Documentation

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC (   value)    ((MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Msk & ((value) << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Pos)))

Definition at line 386 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_DISABLE_Val

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_DISABLE_Val   0

Definition at line 387 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Msk

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Msk   (0x7ul << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Pos)

Definition at line 385 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Pos

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_Pos   29

Definition at line 384 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIF0M_Val

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIF0M_Val   5

Definition at line 392 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIF1M_Val

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIF1M_Val   6

Definition at line 393 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIORITY_Val

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_PRIORITY_Val   4

Definition at line 391 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_REJECT_Val

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_REJECT_Val   3

Definition at line 390 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STF0M_Val

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STF0M_Val   1

Definition at line 388 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STF1M_Val

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STF1M_Val   2

Definition at line 389 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STRXBUF_Val

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFEC_STRXBUF_Val   7

Definition at line 394 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1 (   value)    ((MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Msk & ((value) << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Pos)))

Definition at line 383 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Msk

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Msk   (0x1FFFFFFFul << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Pos)

Definition at line 382 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Pos

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F0_EFID1_Pos   0

Definition at line 381 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2 (   value)    ((MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Msk & ((value) << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Pos)))

Definition at line 412 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Msk

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Msk   (0x1FFFFFFFul << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Pos)

Definition at line 411 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Pos

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFID2_Pos   0

Definition at line 410 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT (   value)    ((MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Msk & ((value) << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Pos)))

Definition at line 415 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_CLASSIC

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_CLASSIC   MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(2)

Definition at line 418 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_DUAL

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_DUAL   MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(1)

Definition at line 417 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Msk

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Msk   (0x3ul << MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Pos)

Definition at line 414 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Pos

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_Pos   30

Definition at line 413 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_RANGE

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_RANGE   MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(3)

Definition at line 419 of file drivers/mcan/mcan.h.

◆ MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_RANGEM

#define MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT_RANGEM   MCAN_EXTENDED_MESSAGE_FILTER_ELEMENT_F1_EFT(0)

Definition at line 416 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_ESI

#define MCAN_RX_ELEMENT_R0_ESI   (0x1ul << MCAN_RX_ELEMENT_R0_ESI_Pos)

Definition at line 72 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_ESI_Pos

#define MCAN_RX_ELEMENT_R0_ESI_Pos   31

Definition at line 71 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_ID

#define MCAN_RX_ELEMENT_R0_ID (   value)    ((MCAN_RX_ELEMENT_R0_ID_Msk & ((value) << MCAN_RX_ELEMENT_R0_ID_Pos)))

Definition at line 66 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_ID_Msk

#define MCAN_RX_ELEMENT_R0_ID_Msk   (0x1FFFFFFFul << MCAN_RX_ELEMENT_R0_ID_Pos)

Definition at line 65 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_ID_Pos

#define MCAN_RX_ELEMENT_R0_ID_Pos   0

Definition at line 64 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_RTR

#define MCAN_RX_ELEMENT_R0_RTR   (0x1ul << MCAN_RX_ELEMENT_R0_RTR_Pos)

Definition at line 68 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_RTR_Pos

#define MCAN_RX_ELEMENT_R0_RTR_Pos   29

Definition at line 67 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_XTD

#define MCAN_RX_ELEMENT_R0_XTD   (0x1ul << MCAN_RX_ELEMENT_R0_XTD_Pos)

Definition at line 70 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R0_XTD_Pos

#define MCAN_RX_ELEMENT_R0_XTD_Pos   30

Definition at line 69 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_ANMF

#define MCAN_RX_ELEMENT_R1_ANMF   (0x1ul << MCAN_RX_ELEMENT_R1_ANMF_Pos)

Definition at line 110 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_ANMF_Pos

#define MCAN_RX_ELEMENT_R1_ANMF_Pos   31

Definition at line 109 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_BRS

#define MCAN_RX_ELEMENT_R1_BRS   (0x1ul << MCAN_RX_ELEMENT_R1_BRS_Pos)

Definition at line 103 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_BRS_Pos

#define MCAN_RX_ELEMENT_R1_BRS_Pos   20

Definition at line 102 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_DLC

#define MCAN_RX_ELEMENT_R1_DLC (   value)    ((MCAN_RX_ELEMENT_R1_DLC_Msk & ((value) << MCAN_RX_ELEMENT_R1_DLC_Pos)))

Definition at line 101 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_DLC_Msk

#define MCAN_RX_ELEMENT_R1_DLC_Msk   (0xFul << MCAN_RX_ELEMENT_R1_DLC_Pos)

Definition at line 100 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_DLC_Pos

#define MCAN_RX_ELEMENT_R1_DLC_Pos   16

Definition at line 99 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_FDF

#define MCAN_RX_ELEMENT_R1_FDF   (0x1ul << MCAN_RX_ELEMENT_R1_FDF_Pos)

Definition at line 105 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_FDF_Pos

#define MCAN_RX_ELEMENT_R1_FDF_Pos   21

Definition at line 104 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_FIDX

#define MCAN_RX_ELEMENT_R1_FIDX (   value)    ((MCAN_RX_ELEMENT_R1_FIDX_Msk & ((value) << MCAN_RX_ELEMENT_R1_FIDX_Pos)))

Definition at line 108 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_FIDX_Msk

#define MCAN_RX_ELEMENT_R1_FIDX_Msk   (0x7Ful << MCAN_RX_ELEMENT_R1_FIDX_Pos)

Definition at line 107 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_FIDX_Pos

#define MCAN_RX_ELEMENT_R1_FIDX_Pos   24

Definition at line 106 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_RXTS

#define MCAN_RX_ELEMENT_R1_RXTS (   value)    ((MCAN_RX_ELEMENT_R1_RXTS_Msk & ((value) << MCAN_RX_ELEMENT_R1_RXTS_Pos)))

Definition at line 98 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_RXTS_Msk

#define MCAN_RX_ELEMENT_R1_RXTS_Msk   (0xFFFFul << MCAN_RX_ELEMENT_R1_RXTS_Pos)

Definition at line 97 of file drivers/mcan/mcan.h.

◆ MCAN_RX_ELEMENT_R1_RXTS_Pos

#define MCAN_RX_ELEMENT_R1_RXTS_Pos   0

Definition at line 96 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC (   value)    ((MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Msk & ((value) << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Pos)))

Definition at line 344 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_DISABLE_Val

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_DISABLE_Val   0

Definition at line 345 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Msk

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Msk   (0x7ul << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Pos)

Definition at line 343 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Pos

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_Pos   27

Definition at line 342 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIF0M_Val

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIF0M_Val   5

Definition at line 350 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIF1M_Val

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIF1M_Val   6

Definition at line 351 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIORITY_Val

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_PRIORITY_Val   4

Definition at line 349 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_REJECT_Val

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_REJECT_Val   3

Definition at line 348 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STF0M_Val

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STF0M_Val   1

Definition at line 346 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STF1M_Val

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STF1M_Val   2

Definition at line 347 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STRXBUF_Val

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFEC_STRXBUF_Val   7

Definition at line 352 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1 (   value)    ((MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Msk & ((value) << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Pos)))

Definition at line 341 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Msk

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Msk   (0x7FFul << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Pos)

Definition at line 340 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Pos

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID1_Pos   16

Definition at line 339 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2 (   value)    ((MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Msk & ((value) << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Pos)))

Definition at line 338 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Msk

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Msk   (0x7FFul << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Pos)

Definition at line 337 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Pos

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFID2_Pos   0

Definition at line 336 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT (   value)    ((MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Msk & ((value) << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Pos)))

Definition at line 355 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_CLASSIC

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_CLASSIC   MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT(2)

Definition at line 358 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_DUAL

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_DUAL   MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT(1)

Definition at line 357 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Msk

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Msk   (0x3ul << MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Pos)

Definition at line 354 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Pos

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_Pos   30

Definition at line 353 of file drivers/mcan/mcan.h.

◆ MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_RANGE

#define MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT_RANGE   MCAN_STANDARD_MESSAGE_FILTER_ELEMENT_S0_SFT(0)

Definition at line 356 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_EXTENDED_ID

#define MCAN_TX_ELEMENT_T0_EXTENDED_ID (   value)    ((MCAN_TX_ELEMENT_T0_EXTENDED_ID_Msk & ((value) << MCAN_TX_ELEMENT_T0_EXTENDED_ID_Pos)))

Definition at line 162 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_EXTENDED_ID_Msk

#define MCAN_TX_ELEMENT_T0_EXTENDED_ID_Msk   (0x1FFFFFFFul << MCAN_TX_ELEMENT_T0_EXTENDED_ID_Pos)

Definition at line 161 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_EXTENDED_ID_Pos

#define MCAN_TX_ELEMENT_T0_EXTENDED_ID_Pos   0

Definition at line 160 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_RTR

#define MCAN_TX_ELEMENT_T0_RTR   (0x1ul << MCAN_TX_ELEMENT_T0_RTR_Pos)

Definition at line 167 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_RTR_Pos

#define MCAN_TX_ELEMENT_T0_RTR_Pos   29

Definition at line 166 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_STANDARD_ID

#define MCAN_TX_ELEMENT_T0_STANDARD_ID (   value)    ((MCAN_TX_ELEMENT_T0_STANDARD_ID_Msk & ((value) << MCAN_TX_ELEMENT_T0_STANDARD_ID_Pos)))

Definition at line 165 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_STANDARD_ID_Msk

#define MCAN_TX_ELEMENT_T0_STANDARD_ID_Msk   (0x7FFul << MCAN_TX_ELEMENT_T0_STANDARD_ID_Pos)

Definition at line 164 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_STANDARD_ID_Pos

#define MCAN_TX_ELEMENT_T0_STANDARD_ID_Pos   18

Definition at line 163 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_XTD

#define MCAN_TX_ELEMENT_T0_XTD   (0x1ul << MCAN_TX_ELEMENT_T0_XTD_Pos)

Definition at line 169 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T0_XTD_Pos

#define MCAN_TX_ELEMENT_T0_XTD_Pos   30

Definition at line 168 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC

#define MCAN_TX_ELEMENT_T1_DLC (   value)    ((MCAN_TX_ELEMENT_T1_DLC_Msk & ((value) << MCAN_TX_ELEMENT_T1_DLC_Pos)))

(MCAN_RXESC) 8 byte data field

Definition at line 204 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_DATA12_Val

#define MCAN_TX_ELEMENT_T1_DLC_DATA12_Val   0x9ul

(MCAN_RXESC) 16 byte data field

Definition at line 209 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_DATA16_Val

#define MCAN_TX_ELEMENT_T1_DLC_DATA16_Val   0xAul

(MCAN_RXESC) 20 byte data field

Definition at line 211 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_DATA20_Val

#define MCAN_TX_ELEMENT_T1_DLC_DATA20_Val   0xBul

(MCAN_RXESC) 24 byte data field

Definition at line 213 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_DATA24_Val

#define MCAN_TX_ELEMENT_T1_DLC_DATA24_Val   0xCul

(MCAN_RXESC) 32 byte data field

Definition at line 215 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_DATA32_Val

#define MCAN_TX_ELEMENT_T1_DLC_DATA32_Val   0xDul

(MCAN_RXESC) 48 byte data field

Definition at line 217 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_DATA48_Val

#define MCAN_TX_ELEMENT_T1_DLC_DATA48_Val   0xEul

(MCAN_RXESC) 64 byte data field

Definition at line 219 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_DATA64_Val

#define MCAN_TX_ELEMENT_T1_DLC_DATA64_Val   0xFul

Definition at line 221 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_DATA8_Val

#define MCAN_TX_ELEMENT_T1_DLC_DATA8_Val   0x8ul

(MCAN_RXESC) 12 byte data field

Definition at line 207 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_Msk

#define MCAN_TX_ELEMENT_T1_DLC_Msk   (0xFul << MCAN_TX_ELEMENT_T1_DLC_Pos)

Definition at line 203 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_DLC_Pos

#define MCAN_TX_ELEMENT_T1_DLC_Pos   16

Definition at line 202 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_EFC

#define MCAN_TX_ELEMENT_T1_EFC   (0x1ul << MCAN_TX_ELEMENT_T1_EFC_Pos)

Definition at line 229 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_EFC_Pos

#define MCAN_TX_ELEMENT_T1_EFC_Pos   23

Definition at line 228 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_MM

#define MCAN_TX_ELEMENT_T1_MM (   value)    ((MCAN_TX_ELEMENT_T1_MM_Msk & ((value) << MCAN_TX_ELEMENT_T1_MM_Pos)))

Definition at line 232 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_MM_Msk

#define MCAN_TX_ELEMENT_T1_MM_Msk   (0xFFul << MCAN_TX_ELEMENT_T1_MM_Pos)

Definition at line 231 of file drivers/mcan/mcan.h.

◆ MCAN_TX_ELEMENT_T1_MM_Pos

#define MCAN_TX_ELEMENT_T1_MM_Pos   24

Definition at line 230 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_ESI

#define MCAN_TX_EVENT_ELEMENT_E0_ESI   (0x1ul << MCAN_TX_EVENT_ELEMENT_E0_ESI_Pos)

Definition at line 269 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_ESI_Pos

#define MCAN_TX_EVENT_ELEMENT_E0_ESI_Pos   31

Definition at line 268 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_ID

#define MCAN_TX_EVENT_ELEMENT_E0_ID (   value)    ((MCAN_TX_EVENT_ELEMENT_E0_ID_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E0_ID_Pos)))

Definition at line 263 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_ID_Msk

#define MCAN_TX_EVENT_ELEMENT_E0_ID_Msk   (0x1FFFFFFFul << MCAN_TX_EVENT_ELEMENT_E0_ID_Pos)

Definition at line 262 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_ID_Pos

#define MCAN_TX_EVENT_ELEMENT_E0_ID_Pos   0

Definition at line 261 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_RTR

#define MCAN_TX_EVENT_ELEMENT_E0_RTR   (0x1ul << MCAN_TX_EVENT_ELEMENT_E0_RTR_Pos)

Definition at line 265 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_RTR_Pos

#define MCAN_TX_EVENT_ELEMENT_E0_RTR_Pos   29

Definition at line 264 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_XTD

#define MCAN_TX_EVENT_ELEMENT_E0_XTD   (0x1ul << MCAN_TX_EVENT_ELEMENT_E0_XTD_Pos)

Definition at line 267 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E0_XTD_Pos

#define MCAN_TX_EVENT_ELEMENT_E0_XTD_Pos   30

Definition at line 266 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_BRS

#define MCAN_TX_EVENT_ELEMENT_E1_BRS   (0x1ul << MCAN_TX_EVENT_ELEMENT_E1_BRS_Pos)

Definition at line 298 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_BRS_Pos

#define MCAN_TX_EVENT_ELEMENT_E1_BRS_Pos   20

Definition at line 297 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_DLC

#define MCAN_TX_EVENT_ELEMENT_E1_DLC (   value)    ((MCAN_TX_EVENT_ELEMENT_E1_DLC_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E1_DLC_Pos)))

Definition at line 296 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_DLC_Msk

#define MCAN_TX_EVENT_ELEMENT_E1_DLC_Msk   (0xFul << MCAN_TX_EVENT_ELEMENT_E1_DLC_Pos)

Definition at line 295 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_DLC_Pos

#define MCAN_TX_EVENT_ELEMENT_E1_DLC_Pos   16

Definition at line 294 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_ET

#define MCAN_TX_EVENT_ELEMENT_E1_ET (   value)    ((MCAN_TX_EVENT_ELEMENT_E1_ET_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E1_ET_Pos)))

Definition at line 303 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_ET_Msk

#define MCAN_TX_EVENT_ELEMENT_E1_ET_Msk   (0x3ul << MCAN_TX_EVENT_ELEMENT_E1_ET_Pos)

Definition at line 302 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_ET_Pos

#define MCAN_TX_EVENT_ELEMENT_E1_ET_Pos   22

Definition at line 301 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_FDF

#define MCAN_TX_EVENT_ELEMENT_E1_FDF   (0x1ul << MCAN_TX_EVENT_ELEMENT_E1_FDF_Pos)

Definition at line 300 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_FDF_Pos

#define MCAN_TX_EVENT_ELEMENT_E1_FDF_Pos   21

Definition at line 299 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_MM

#define MCAN_TX_EVENT_ELEMENT_E1_MM (   value)    ((MCAN_TX_EVENT_ELEMENT_E1_MM_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E1_MM_Pos)))

Definition at line 306 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_MM_Msk

#define MCAN_TX_EVENT_ELEMENT_E1_MM_Msk   (0xFFul << MCAN_TX_EVENT_ELEMENT_E1_MM_Pos)

Definition at line 305 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_MM_Pos

#define MCAN_TX_EVENT_ELEMENT_E1_MM_Pos   24

Definition at line 304 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_TXTS

#define MCAN_TX_EVENT_ELEMENT_E1_TXTS (   value)    ((MCAN_TX_EVENT_ELEMENT_E1_TXTS_Msk & ((value) << MCAN_TX_EVENT_ELEMENT_E1_TXTS_Pos)))

Definition at line 293 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_TXTS_Msk

#define MCAN_TX_EVENT_ELEMENT_E1_TXTS_Msk   (0xFFFFul << MCAN_TX_EVENT_ELEMENT_E1_TXTS_Pos)

Definition at line 292 of file drivers/mcan/mcan.h.

◆ MCAN_TX_EVENT_ELEMENT_E1_TXTS_Pos

#define MCAN_TX_EVENT_ELEMENT_E1_TXTS_Pos   0

Definition at line 291 of file drivers/mcan/mcan.h.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:06