PER Firmware
Loading...
Searching...
No Matches
can_common.h File Reference

Common functions and data structures used in every node in the CAN library. More...

#include <stdint.h>
#include "common/rtos/rtos.h"
Include dependency graph for can_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  can_stats_t
 

Macros

#define DEFINE_CAN_TASKS()
 
#define START_CAN_TASKS()
 
#define CAN_TX_QUEUE_LENGTH   (32)
 
#define CAN_RX_QUEUE_LENGTH   (32)
 
#define NVIC_RX_IRQ_PRIO   (6)
 
#define NVIC_TX_IRQ_PRIO   (7)
 

Functions

void CAN_tx_update (void)
 
void CAN_rx_update (void)
 
bool CAN_init (void)
 
void CAN_enable_IRQs (void)
 
void CAN_rx_init (void)
 
void CAN_tx_init (void)
 

Variables

volatile can_stats_t can_stats
 
volatile uint32_t last_can_rx_time_ms
 
QueueHandle_t can_rx_queue
 

Detailed Description

Common functions and data structures used in every node in the CAN library.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Macro Definition Documentation

◆ CAN_RX_QUEUE_LENGTH

#define CAN_RX_QUEUE_LENGTH   (32)

◆ CAN_TX_QUEUE_LENGTH

#define CAN_TX_QUEUE_LENGTH   (32)

◆ DEFINE_CAN_TASKS

#define DEFINE_CAN_TASKS ( )
Value:
void CAN_tx_update(void)
Definition can_tx.c:160
void CAN_rx_update(void)
Definition can_rx.c:20
@ TASK_PRIORITY_HIGH
Definition rtos.h:36
@ STACK_1024
Definition rtos.h:27
@ STACK_2048
Definition rtos.h:28
#define RTOS_DEFINE_TASK(NAME, PERIOD_MS, PRIORITY, STACK_SIZE)
Defines a statically allocated periodic FreeRTOS task.
Definition rtos.h:79

◆ NVIC_RX_IRQ_PRIO

#define NVIC_RX_IRQ_PRIO   (6)

◆ NVIC_TX_IRQ_PRIO

#define NVIC_TX_IRQ_PRIO   (7)

◆ START_CAN_TASKS

#define START_CAN_TASKS ( )
Value:
RTOS_START_TASK(CAN_tx_update); \
CAN_enable_IRQs();
#define RTOS_START_TASK(NAME)
Creates and starts a previously defined task.
Definition rtos.h:109

Function Documentation

◆ CAN_enable_IRQs()

void CAN_enable_IRQs ( void )

◆ CAN_init()

bool CAN_init ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CAN_rx_init()

void CAN_rx_init ( void )
Here is the caller graph for this function:

◆ CAN_rx_update()

void CAN_rx_update ( void )

◆ CAN_tx_init()

void CAN_tx_init ( void )
Here is the caller graph for this function:

◆ CAN_tx_update()

void CAN_tx_update ( void )

Variable Documentation

◆ can_rx_queue

QueueHandle_t can_rx_queue
extern

◆ can_stats

volatile can_stats_t can_stats
extern

◆ last_can_rx_time_ms

volatile uint32_t last_can_rx_time_ms
extern