29 lines
797 B
C
29 lines
797 B
C
|
|
#ifndef __flexcan_init_H__
|
|
#define __flexcan_init_H__
|
|
|
|
#include "regs_base.h"
|
|
#include "irq_num.h"
|
|
#include <sdrv_flexcan.h>
|
|
|
|
#define TX_MB_INDEX (USED_MB_FOR_FIFO)
|
|
|
|
|
|
|
|
//外部函数
|
|
void flexcan_transfer_callback(flexcan_handle_t *handle,flexcan_status_e status, uint32_t result,void *userData);
|
|
void flexcan_config_rx_fifo(flexcan_handle_t *handle,flexcan_rx_fifo_config_t *config);
|
|
uint8_t CAN_Send_Msg( flexcan_handle_t *handle, uint32_t ID, flexcan_frame_format_e ide, flexcan_frame_type_e rtr, uint8_t *msg, uint8_t len, uint8_t tx_index);
|
|
void flexcan_busoff_recovery_demo(flexcan_handle_t *handle);
|
|
|
|
|
|
|
|
|
|
//外部变量
|
|
extern flexcan_handle_t g_flexcan_handle;
|
|
extern bool busoff_occur_flag;//标志量
|
|
extern bool WDTReFresh_flag;//更新标志
|
|
|
|
|
|
|
|
#endif /* __IAP_TASK_H__ */ |