[bsp][stm32][libraries][HAL_Drivers] update drv_can.c

adapt to new HAL_lib
This commit is contained in:
杨连钊 2019-06-24 12:31:02 +08:00
parent c574c49b2f
commit 9e74077928
2 changed files with 258 additions and 522 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,10 +9,11 @@
* 2019-01-22 YLZ port from stm324xx-HAL to bsp stm3210x-HAL
* 2019-01-26 YLZ redefine `struct stm32_drv_can` add member `Rx1Message`
* 2019-02-19 YLZ port to BSP [stm32]
* 2019-06-17 YLZ modify struct stm32_drv_can.
*/
#ifndef __DRV_CAN_H__
#define __DRV_CAN_H__
#include "board.h"
#include <board.h>
#include <rtdevice.h>
#include <rthw.h>
#include <rtthread.h>
@ -36,19 +37,14 @@ struct stm_baud_rate_tab
struct stm32_drv_can
{
CAN_HandleTypeDef CanHandle;
CAN_TxHeaderTypeDef TxMessage;
CAN_RxHeaderTypeDef RxMessage;
uint8_t RxMessage_Data[8];
CAN_RxHeaderTypeDef Rx1Message;
uint8_t Rx1Message_Data[8];
CAN_FilterTypeDef FilterConfig;
};
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
extern int rt_hw_can_init(void);
rt_err_t rt_hw_can_init(void);
#ifdef __cplusplus
}
}
#endif
#endif /*__DRV_CAN_H__ */