#ifndef __APP_CAN_H #define __APP_CAN_H #include "queue.h" #include "stm32f4xx_can.h" #define CAN_PGN_PF 0xFFFF00 #define CAN_PGN_PS 0xFF00 extern uint8_t recv_can_id; typedef struct { uint32_t id; void (*p_func)(pdu_tag); } can_rx_tab; // #define ARR_SIZE(a) sizeof(a) / a[0] #define ARR_SIZE(a) sizeof(a) / sizeof((a)[0]) // #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) void can_rx_callback(CanRxMsg rx_message); void can_tx_callback(); void can_process(void); void dev_can_network_init(); uint8_t push_can_message_to_queue(uint32_t id, uint8_t len, uint8_t *p_data); #endif // __APP_CAN_H