Browse Source

[bsp][stm32][libraries][HAL_Drivers] update drv_can.c
adapt to new HAL_lib

杨连钊 5 năm trước cách đây
mục cha
commit
9e74077928

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 223 - 497
bsp/stm32/libraries/HAL_Drivers/drv_can.c


+ 5 - 9
bsp/stm32/libraries/HAL_Drivers/drv_can.h

@@ -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__ */

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác