14#include "common/phal/can.h"
19 uint32_t tx_enqueue_count;
20 uint32_t tx_task_wake_count;
21 uint32_t tx_sent_count;
22 uint32_t tx_callback_count;
28extern volatile uint32_t last_can_rx_time_ms;
31extern QueueHandle_t can_rx_queue;
33void CAN_tx_update(
void);
34void CAN_rx_update(
void);
36void CAN_enable_IRQs(
void);
37void CAN_rx_init(
void);
38void CAN_tx_init(
void);
40#define DEFINE_CAN_TASKS() \
41 DEFINE_TASK(CAN_rx_update, 0, osPriorityHigh, STACK_2048); \
42 DEFINE_TASK(CAN_tx_update, 0, osPriorityHigh, STACK_1024);
44#define START_CAN_TASKS() \
45 START_TASK(CAN_rx_update); \
46 START_TASK(CAN_tx_update); \
49#define CAN_TX_QUEUE_LENGTH (32)
50#define CAN_RX_QUEUE_LENGTH (32)
52#define NVIC_RX_IRQ_PRIO (6)
53#define NVIC_TX_IRQ_PRIO (7)
55 configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY < NVIC_RX_IRQ_PRIO,
56 "Do not set an IRQ priority higher (numerically lower) than FreeRTOS to prevent corruption of kernel data structures"
59 NVIC_RX_IRQ_PRIO < NVIC_TX_IRQ_PRIO,
60 "RX priority should be higher (numerically lower) than TX"
Wrapper macros for FreeRTOS constructs (tasks, queues, semaphores) to simplify static memory allocati...
Definition can_common.h:16