77#if (CORE_CAN_DISABLE_TX_QUEUE != 1) || (CORE_CAN_DISABLE_SEMAPHORE != 1) || (CORE_CAN_USE_MSGBUF == 1) || (CORE_CAN_DISABLE_RX_QUEUE != 1)
81#include "message_buffer.h"
102#if CORE_CAN_DISABLE_RX_QUEUE != 1
105#if CORE_CAN_DISABLE_TX_QUEUE != 1
108#if CORE_CAN_USE_MSGBUF != 0
109 MessageBufferHandle_t msgbuf;
111#if CORE_CAN_DISABLE_SEMAPHORE != 1
118 uint8_t fdcan_num_standard_filters;
119 uint8_t fdcan_num_extended_filters;
145 uint16_t arbitration_error;
151extern const uint8_t core_CAN_dlc_lookup[16];
160bool core_CAN_init(FDCAN_GlobalTypeDef *fdcan, uint32_t baudrate);
164#define core_CAN_enable_timestamps core_timestamp_init
195#if !defined(CORE_CAN_DISABLE_TX_QUEUE) || (CORE_CAN_DISABLE_TX_QUEUE == 0) || defined(DOXYGEN)
230#if ((CORE_CAN_USE_MSGBUF != 1) && (CORE_CAN_DISABLE_RX_QUEUE != 1)) || defined(DOXYGEN)
264#if (defined(CORE_CAN_USE_MSGBUF)) && (CORE_CAN_USE_MSGBUF != 0)
278uint8_t core_CAN_receive_from_msgbuf(FDCAN_GlobalTypeDef *can, uint8_t *buf, TickType_t timeout);
283BaseType_t core_CAN_msgbuf_insert_ts(
core_CAN_module_t *p_can, uint8_t *buf, uint8_t buflen, uint32_t lsb);
298bool core_CAN_add_filter(FDCAN_GlobalTypeDef *can,
bool isExtended, uint32_t id1, uint32_t id2);
bool core_CAN_add_filter(FDCAN_GlobalTypeDef *can, bool isExtended, uint32_t id1, uint32_t id2)
Add an RX filter for the given FDCAN module.
Definition can.c:577
bool core_CAN_receive_from_queue(FDCAN_GlobalTypeDef *can, CanMessage_s *received_message)
If a frame is waiting in the RX queue, copy it to the given location.
Definition can.c:554
bool core_CAN_send_from_tx_queue_task(FDCAN_GlobalTypeDef *can)
Loop for sending data in the TX queue over CAN. This function must be run in its own task....
Definition can.c:301
bool core_CAN_receive_extended_from_queue(FDCAN_GlobalTypeDef *can, CanExtendedMessage_s *received_message)
If a frame is waiting in the RX queue, copy it to the given location.
Definition can.c:544
bool core_CAN_add_extended_message_to_tx_queue(FDCAN_GlobalTypeDef *can, uint32_t id, uint8_t dlc, uint8_t *data)
Add a CAN frame to the TX queue. This function is only available if CORE_CAN_DISABLE_TX_QUEUE is set ...
Definition can.c:287
bool core_CAN_send_message(FDCAN_GlobalTypeDef *can, uint32_t id, uint8_t dlc, uint64_t data)
Add a CAN message to the hardware FIFO.
Definition can.c:330
bool core_CAN_add_message_to_tx_queue(FDCAN_GlobalTypeDef *can, uint32_t id, uint8_t dlc, uint64_t data)
Add a CAN frame to the TX queue. This function is only available if CORE_CAN_DISABLE_TX_QUEUE is set ...
Definition can.c:271
bool core_CAN_send_fd_message(FDCAN_GlobalTypeDef *can, uint32_t id, uint8_t dlc, uint8_t *data)
Add an FDCAN message to the hardware FIFO.
Definition can.c:357
bool core_CAN_init(FDCAN_GlobalTypeDef *fdcan, uint32_t baudrate)
Initialize an FDCAN module, the RX and TX pins, the TX queue (if enabled), and the RX queue or messag...
Definition can.c:78
Configuration file for the core library.
Header for a CAN packet.
Definition can.h:128
uint8_t rtr
Indicates if the frame was a remote transmission request.
Definition can.h:134
uint8_t esi
Indicates if the transmitting node is error passive.
Definition can.h:136
uint8_t type
Packet type.
Definition can.h:129
uint8_t xtd
Indicates if the ID is an extended ID.
Definition can.h:135
uint8_t length
Length of the packet not including the header.
Definition can.h:130
uint32_t id
CAN ID.
Definition can.h:133
uint8_t fdf
1 for FD frames, 0 otherwise
Definition can.h:131
uint16_t timestamp
Timestamp for received packets.
Definition can.h:132
SemaphoreHandle_t can_tx_semaphore
TX semaphore, taken when a message is added to the hardware FIFO and given when transmission complete...
Definition can.h:112
uint32_t * timestamp_msb
Most significant bits of the timestamp for the most recently received packet.
Definition can.h:116
FDCAN_HandleTypeDef hfdcan
HAL FDCAN handle.
Definition can.h:101
QueueHandle_t can_queue_rx
Handle for FreeRTOS RX queue.
Definition can.h:103
QueueHandle_t can_queue_tx
Handle for FreeRTOS TX queue.
Definition can.h:106