Tetrapod Project
teensy_can_ports.h
Go to the documentation of this file.
1 #ifndef Teensy_CAN_ports_h
2 #define Teensy_CAN_ports_h
3 
4 #include "FlexCAN_T4.h"
5 
6 const uint8_t CAN_PORT_1 = 1;
7 const uint8_t CAN_PORT_2 = 2;
8 
9 static FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> can_port_1;
10 static FlexCAN_T4<CAN2, RX_SIZE_256, TX_SIZE_16> can_port_2;
11 
12 static CAN_message_t CAN_MESSAGE;
13 
14 /*
15 static void clearCANBuffer()
16 {
17  while(can_port_1.read(CAN_MESSAGE));
18  while(can_port_2.read(CAN_MESSAGE));
19 }
20 */
21 
22 #endif
const uint8_t CAN_PORT_1
static FlexCAN_T4< CAN1, RX_SIZE_256, TX_SIZE_16 > can_port_1
static CAN_message_t CAN_MESSAGE
static FlexCAN_T4< CAN2, RX_SIZE_256, TX_SIZE_16 > can_port_2
const uint8_t CAN_PORT_2