36 lines
609 B
C
36 lines
609 B
C
|
#ifndef __CAN1_H
|
|||
|
#define __CAN1_H
|
|||
|
#include "stm32f10x.h"
|
|||
|
|
|||
|
//********************************************************************************
|
|||
|
//V1.1<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD> 20150528
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CAN<41><4E>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>㹫ʽ
|
|||
|
//////////////////////////////////////////////////////////////////////////////////
|
|||
|
|
|||
|
//CAN<41><4E><EFBFBD><EFBFBD>RX0<58>ж<EFBFBD>ʹ<EFBFBD><CAB9>
|
|||
|
#define CAN_RX0_INT_ENABLE 1 //0,<2C><>ʹ<EFBFBD><CAB9>;1,ʹ<><CAB9>.
|
|||
|
|
|||
|
u8 CAN_Mode_Init(u8 tsjw,u8 tbs2,u8 tbs1,u16 brp,u8 mode);//CAN<41><4E>ʼ<EFBFBD><CABC>
|
|||
|
|
|||
|
u32 Can_Send_Msg(u8* msg,u8 len,u32 appid);
|
|||
|
|
|||
|
u8 Can_Receive_Msg(u8 *buf); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|