Table 4.1 DLL function definition
Function definition
Section
WORD
CAN_GetDllVersion();
int CAN_TotalBoard();
int CAN_GetBoardInf(BYTE BoardNo, DWORD *dwVID, DWORD *dwDID,
DWORD *dwSVID, DWORD *dwSDID, DWORD
*dwIrqNo);
int CAN_GetCardPortNum(BYTE BoardNo, BYTE *bGetPortNum);
int
CAN_ActiveBoard(BYTE wBoardNo)
int
CAN_CloseBoard(BYTE wBoardNo);
int CAN_BoardIsActive(BYTE BoardNo);
int CAN_Reset(BYTE BoardNo, BYTE Port);
int CAN_Init(BYTE wBoardNo, BYTE Port);
int CAN_Config(BYTE BoardNo, BYTE Port, ConfigStruct *CanConfig);
int CAN_ConfigWithoutStructure(BYTE BoardNo, BYTE Port, DWORD
AccCode, DWORD AccMask, BYTE BaudRate, BYTE BT0, BYTE BT1);
int CAN_EnableRxIrq(BYTE BoardNo ,BYTE Port);
int CAN_DisableRxIrq(BYTE BoardNo, BYTE Port);
int CAN_RxIrqStatus(BYTE BoardNo, BYTE Port, BYTE *bStatus);
int CAN_InstallIrq(BYTE BoardNo);
int CAN_RemoveIrq(BYTE BoardNo);
int CAN_IrqStatus(BYTE BoardNo, BYTE *bStatus);
int CAN_Status(BYTE BoardNo, BYTE Port, BYTE *bStatus);
int CAN_SendMsg(BYTE BoardNo, BYTE Port, PacketStruct *CanPacket);
int CAN_SendWithoutStruct(BYTE BoardNo, BYTE Port, BYTE Mode,
DWORD Id, BYTE Rtr, BYTE Dlen, BYTE *Data)
int CAN_RxMsgCount(BYTE BoardNo, BYTE Port);
int CAN_ReceiveMsg(BYTE BoardNo, BYTE Port, PacketStruct *CanPacket);
int CAN_ReceiveWithoutStruct(BYTE BoardNo, BYTE Port, BYTE *Mode,
DWORD *Id, BYTE *Rtr, BYTE *Dlen, BYTE
*Data, LONGLONG *MsgTimeStamps);
int CAN_ClearSoftBuffer(BYTE BoardNo, BYTE Port);
int CAN_ClearDataOverrun(BYTE BoardNo, BYTE Port);
void CAN_OutputByte(BYTE BoardNo, BYTE Port, WORD wOffset, BYTE
bValue);
BYTE CAN_InputByte(BYTE BoardNo, BYTE Port, WORD wOffset);
LONGLONG CAN_GetSystemFreq(void);
Int CAN_InstallUserIsr(BYTE BoardNo, void(*UserISR)(BYTE BoardNo));
Int CAN_RemoveUserIsr(BYTE BoardNo);
int CAN_BusErrorCode(BYTE BoardNo, BYTE Port, BYTE *bErrorCode);
PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) -------
32
ГК
Атлант
Инжиниринг
–
официальный
представитель
в
РФ
и
СНГ
+7(495)109-02-08 [email protected] www.bbrc.ru