CAN callback implementation.
More...
#include <string.h>
#include "activity_leds.h"
#include "can_library/generated/SCAN.h"
#include "can_library/generated/VCAN.h"
#include "phal_G4/fdcan/fdcan.h"
#include "rtos/rtos.h"
#include "timestamped_frame/timestamped_frame.h"
#include "main.h"
CAN callback implementation.
- Author
- Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)
◆ get_bus_id()
| static uint32_t get_bus_id |
( |
FDCAN_GlobalTypeDef * | peripheral | ) |
|
|
inlinestatic |
◆ PHAL_FDCAN_rxCallback()
Weak callback fired once per received frame.
Called from FDCANx_IT0_IRQHandler (interrupt context) for every frame popped from RX FIFO0.
Default implementation does nothing.
- Parameters
-
| msg | the received frame (valid only for the duration of the call) |
◆ last_can_rx_time_ms
| volatile uint32_t last_can_rx_time_ms = 0 |