drv_can.h 379 B

12345678910111213141516
  1. #ifndef __DRV_CAN_H
  2. #define __DRV_CAN_H
  3. #include "stm32f4xx.h"
  4. #define __CAN_BAUD_250K
  5. typedef void (*pcan_tx)(void);
  6. typedef void (*pcan_rx)(CanRxMsg);
  7. void drv_can_init(); // CAN初始化
  8. uint8_t drv_can_msg_tx(uint32_t id, uint8_t id_type, uint8_t *p_data, uint8_t len);
  9. void drv_can_rx_back_init(pcan_rx p_fun);
  10. void drv_can_tx_back_init(pcan_tx p_fun);
  11. #endif