![]() |
![]() |
CAN driver implementation for a MSP432E4 CAN controller.
============================================================================
The CAN header file should be included in an application as follows:
The CANMSP432E4 driver is a (ring) buffered driver that stores data it may
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <ti/devices/msp432e4/inc/msp432.h>
#include <ti/devices/msp432e4/driverlib/gpio.h>
#include <ti/devices/msp432e4/driverlib/pin_map.h>
#include <ti/drivers/dpl/ClockP.h>
#include <ti/drivers/dpl/HwiP.h>
#include <ti/drivers/dpl/SemaphoreP.h>
#include <ti/drivers/gpio/GPIOMSP432E4.h>
#include <ti/drivers/CAN.h>
#include <ti/drivers/utils/List.h>
#include <ti/drivers/utils/StructRingBuf.h>
Go to the source code of this file.
Data Structures | |
struct | CANMSP432E4_HWAttrs |
CANMSP432E4 Hardware attributes. More... | |
struct | CANMSP432E4_Object |
CANMSP432E4 Object. More... | |
Macros | |
#define | CANMSP432E4_PA0_CAN0RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 0, GPIO_PA0_CAN0RX) |
PA0 is used for CAN0 RX. More... | |
#define | CANMSP432E4_PA1_CAN0TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 1, GPIO_PA1_CAN0TX) |
PA1 is used for CAN0 RX. More... | |
#define | CANMSP432E4_PB0_CAN1RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTB, 0, GPIO_PB0_CAN1RX) |
PB0 is used for CAN1 RX. More... | |
#define | CANMSP432E4_PB1_CAN1TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTB, 1, GPIO_PB1_CAN1TX) |
PB1 is used for CAN1 RX. More... | |
Typedefs | |
typedef void(* | CANMSP432E4_ErrorCallback) (CAN_Handle handle, uint32_t error) |
The definition of an optional callback function used by the CAN driver to notify the application when a receive error (FIFO overrun, parity error, etc) occurs. More... | |
typedef struct CANMSP432E4_Object * | CANMSP432E4_Handle |
Variables | |
const CAN_FxnTable | CANMSP432E4_fxnTable |
#define CANMSP432E4_PA0_CAN0RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 0, GPIO_PA0_CAN0RX) |
PA0 is used for CAN0 RX.
#define CANMSP432E4_PA1_CAN0TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 1, GPIO_PA1_CAN0TX) |
PA1 is used for CAN0 RX.
#define CANMSP432E4_PB0_CAN1RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTB, 0, GPIO_PB0_CAN1RX) |
PB0 is used for CAN1 RX.
#define CANMSP432E4_PB1_CAN1TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTB, 1, GPIO_PB1_CAN1TX) |
PB1 is used for CAN1 RX.
typedef void(* CANMSP432E4_ErrorCallback) (CAN_Handle handle, uint32_t error) |
The definition of an optional callback function used by the CAN driver to notify the application when a receive error (FIFO overrun, parity error, etc) occurs.
CAN_Handle | CAN_Handle |
error | The current value of the receive status register. Please refer to the device data sheet to interpret this value. |
typedef struct CANMSP432E4_Object * CANMSP432E4_Handle |
const CAN_FxnTable CANMSP432E4_fxnTable |