|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
drv_can.h里定义了这一段,搞不懂请
' J: ]" ^ E' Y) i& C8 R
) X8 L! Y, z+ Q7 n#define BAUD_DATA(TYPE,NO) ((can_baud_rate_tab[NO].config_data & TYPE##MASK))
& t* f" O. B0 g$ `/ J1 N" P- @- W2 [3 W" ?( L
我把drv_can.c里面这一段3 @* M' P: k% S8 n: ~ W
}: a0 ?; o( U; p
drv_can->CanHandle.Init.SyncJumpWidth = BAUD_DATA(SJW, baud_index);
8 d3 a/ K* f$ V1 b- Q: i5 c$ r% T( a; x `( T1 r
改成
& f; z+ d9 \: V7 a! Q8 L" |' `7 J9 N ?2 t
drv_can->CanHandle.resync_jump_width = (rt_uint8_t)BAUD_DATA(resync_jump_width, baud_index);//
+ E Y' S; i$ }) ^, u W+ g- _' o8 ~* m" d8 V% M& b8 m3 Q1 o% Y
报错
; z6 z. _6 E. }4 h# T4 x2 O4 a/ D% u& t7 J3 {: k
drivers\drv_can.c(183): error: #20: identifier "resync_jump_widthMASK" is undefined
6 D' f8 U7 r7 y4 A% Z" g, x |
|