#ifndef __CAN_TASK_H #define __CAN_TASK_H #ifdef __cplusplus extern "C" { #endif #ifdef __CAN_TASK_H_GLOBAL #define __CAN_TASK_H_EXTERN #else #define __CAN_TASK_H_EXTERN extern #endif /************************************************************************************************ * Version * ************************************************************************************************/ /************************************************************************************************ * How to use * ************************************************************************************************/ /************************************************************************************************ * Enable config * ************************************************************************************************/ /************************************************************************************************ * Includes * ************************************************************************************************/ #include "can_interface.h" /************************************************************************************************ * Defines * ************************************************************************************************/ #define CAN_PGN_PF 0xFFFF00 #define CAN_PGN_PS 0xFF00 /************************************************************************************************ * Typedefs * ************************************************************************************************/ typedef struct { uint32_t id; void (*p_func)(pdu_tag); } can_rx_tab; extern uint8_t recv_can_id; /************************************************************************************************ * Interfaces * ************************************************************************************************/ void can_rx_callback(CanRxMsg rx_message); void can_tx_callback(void); void can_process(void); void can_network_init(void); uint8_t push_can_message_to_queue(uint32_t id, uint8_t len, uint8_t *p_data); #ifdef __cplusplus }; #endif #endif // __CAN_TASK_H