1234567891011121314151617181920212223242526272829 |
- #ifndef __APP_CAN_H
- #define __APP_CAN_H
- #include "hal_conf.h"
- #include "queue.h"
- #define CAN_PGN_PF 0xFF
- #define CAN_PGN_PS 0xFF
- 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
|