#ifndef __HAL_CAN_H
#define __HAL_CAN_H

#include "stm32f4xx.h"

#define __CAN_BAUD_250K

typedef void (*pcan_tx)(void);
typedef void (*pcan_rx)(CanRxMsg);

void    hal_can_init(); // CAN初始化
uint8_t hal_can_msg_tx(uint32_t id, uint8_t id_type, uint8_t *p_data, uint8_t len);
void    hal_can_rx_back_init(pcan_rx p_fun);
void    hal_can_tx_back_init(pcan_tx p_fun);

#endif
