CC27xxDriverLibrary
can.h File Reference
#include <stdint.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_canfd.h"
Include dependency graph for can.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CANSS_CTRL_EXT_TIMESTAMP_EN   (CANFD_MCANSS_CTRL_EXT_TS_CNTR_EN_M)
 External Timestamp Counter Enable. More...
 
#define CANSS_CTRL_AUTOWAKEUP_EN   (CANFD_MCANSS_CTRL_AUTOWAKEUP_M)
 Automatic Wakeup Enable. More...
 
#define CANSS_CTRL_WAKEUP_REQ_EN   (CANFD_MCANSS_CTRL_WAKEUPREQEN_M)
 Wakeup Request Enable. More...
 
#define CANSS_CTRL_DEBUG_SUSPEND_EN   (CANFD_MCANSS_CTRL_DBGSUSP_FREE_M)
 Debug Suspend Enable. More...
 
#define CANSS_STATUS_ENABLE_FDOE   (CANFD_MCANSS_STAT_ENABLE_FDOE_M)
 CAN FD Operation Enabled. More...
 
#define CANSS_STATUS_MEM_INIT_DONE   (CANFD_MCANSS_STAT_MEM_INIT_DONE_M)
 Memory Initialization Done. More...
 
#define CANSS_INT_EXT_TIMESTAMP_OVERFLOW   (CANFD_MCANSS_IRS_EXT_TS_CNTR_OVFL_M)
 External Timestamp Counter Overflow Interrupt. More...
 
#define CANSS_EOI_EXT_TIMESTAMP   0U
 End Of Interrupt for External Timestamp. More...
 
#define CANSS_EOI_MCAN0   1U
 End Of Interrupt for MCAN Interrupt Line 0. More...
 
#define CANSS_EOI_MCAN1   2U
 End Of Interrupt for MCAN Interrupt Line 1. More...
 
#define CAN_INT_LINE0   0U
 Interrupt Line 0. More...
 
#define CAN_INT_LINE1   1U
 Interrupt Line 1. More...
 
#define CAN_INT_DMA_DONE1   (CANFD_IMASK0_DMA_DONE1_M)
 DMA Done Channel 1 Event Interrupt. More...
 
#define CAN_INT_DMA_DONE0   (CANFD_IMASK0_DMA_DONE0_M)
 DMA Done Channel 0 Event Interrupt. More...
 
#define CAN_INT_FILTER_EVENT2   (CANFD_IMASK0_FE2_M)
 Rx Buffer Filter Event 2 Interrupt. More...
 
#define CAN_INT_EXT_TS_OR_WAKE   (CANFD_IMASK0_EXT_TS_OR_WAKE_M)
 External Timestamp or Wake Event Interrupt. More...
 
#define CAN_INT_DED   (CANFD_IMASK0_DED_M)
 Double Error Detected Event Interrupt. More...
 
#define CAN_INT_SEC   (CANFD_IMASK0_SEC_M)
 Single Error Corrected Event Interrupt. More...
 
#define CAN_INT_INTL1   (CANFD_IMASK0_INTL1_M)
 MCAN Interrupt Line 1 Event Interrupt. More...
 
#define CAN_INT_INTL0   (CANFD_IMASK0_INTL0_M)
 MCAN Interrupt Line 0 Event Interrupt. More...
 
#define CAN_INT_MASK   (0x0000000FU)
 Mask of all interrupts. More...
 
#define CANSS_CLK_DIVIDE_BY_1   0U
 Divides input clock by 1. More...
 
#define CANSS_CLK_DIVIDE_BY_2   1U
 Divides input clock by 2. More...
 
#define CANSS_CLK_DIVIDE_BY_4   2U
 Divides input clock by 4. More...
 
#define CANSS_CLKCTRL_WAKEUP_GLITCH_FILTER_EN   (CANFD_MCANSS_CLKCTL_WKUP_GLTFLT_EN_M)
 Wakeup Glitch Filter Enable. More...
 
#define CANSS_CLKCTRL_WAKEUP_INT_EN   (CANFD_MCANSS_CLKCTL_WAKEUP_INT_EN_M)
 Wakeup Interrupt Enable. More...
 
#define CANSS_CLKCTRL_STOP_REQ   (CANFD_MCANSS_CLKCTL_STOPREQ_M)
 Clock Stop Request. More...
 
#define CANSS_CLKSTAT_CLKSTOP_REQ_OVR   (CANFD_MCANSS_CLKSTS_STOPREQ_HW_OVR_M)
 Clock Stop Request Hardware Override (1 = Request cleared by HW) More...
 
#define CANSS_CLKSTAT_CLKSTOP_ACK   (CANFD_MCANSS_CLKSTS_CLKSTOP_ACKSTS_M)
 Clock Stop Acknowledge. More...
 

Functions

__STATIC_INLINE void CANSSSetControl (uint32_t flags)
 Sets the specified CAN Subsystem control feature flag(s). More...
 
__STATIC_INLINE void CANSSClearControl (uint32_t flags)
 Clears the specified CAN Subsystem control feature flag(s). More...
 
__STATIC_INLINE uint32_t CANSSGetStatus (void)
 Gets the CAN Subsystem status. More...
 
__STATIC_INLINE uint32_t CANSSGetMaskedIntStatus (void)
 Gets the CAN Subsystem masked interrupt status. More...
 
__STATIC_INLINE uint32_t CANSSGetRawIntStatus (void)
 Gets the CAN Subsystem raw interrupt status. More...
 
__STATIC_INLINE void CANSSClearInt (uint32_t flags)
 Clears the specified CAN Subsytem interrupt enable(s). More...
 
__STATIC_INLINE void CANSSEnableInt (uint32_t flags)
 Enables the specified CAN Subsytem interrupt(s). More...
 
__STATIC_INLINE void CANSSDisableInt (uint32_t flags)
 Disables the specified CAN Subsytem interrupt(s). More...
 
void CANSSSetEndOfInt (uint32_t eoi) __attribute__((weak))
 Sets the CAN Subsystem End Of Interrupt (EOI). More...
 
__STATIC_INLINE void CANSSSetExtTimestampPrescaler (uint32_t prescaler)
 Sets the CAN Subsystem external timestamp prescaler. More...
 
__STATIC_INLINE uint32_t CANSSGetExtTSUnservicedIntCounter (void)
 Gets the CAN Subsystem external timestamp unserviced interrupts counter. More...
 
__STATIC_INLINE void CANSetIntMask (uint32_t lineNum, uint32_t flags)
 Sets the CAN peripheral interrupt mask. More...
 
__STATIC_INLINE void CANClearIntMask (uint8_t lineNum, uint32_t flags)
 Clears the CAN peripheral interrupt mask. More...
 
__STATIC_INLINE uint32_t CANGetMaskedIntStatus (uint8_t lineNum)
 Gets the CAN masked peripheral interrupt status. More...
 
__STATIC_INLINE uint32_t CANGetRawIntStatus (uint8_t lineNum)
 Gets the CAN raw peripheral interrupt status. More...
 
void CANClearInt (uint8_t lineNum, uint32_t flags) __attribute__((weak))
 Clears the specified CAN peripheral interrupt(s). More...
 
__STATIC_INLINE void CANSSSetClockDivider (uint32_t ratio)
 Sets the CAN Subsystem clock divider ratio for the functional clock input. More...
 
void CANSSSetClkStopCtrl (uint32_t flags) __attribute__((weak))
 Sets the CAN Subsystem clock stop control feature flag(s). More...
 
void CANSSClearClkStopCtrl (uint32_t flags) __attribute__((weak))
 Clears the CAN Subsystem clock stop control feature flag(s). More...
 
__STATIC_INLINE uint32_t CANSSGetClkStopCtrlStatus (void)
 Gets the CAN Subsystem clock stop control status. More...