4.1.18 CAN_Status
Description:
Obtain the status of CAN controller for PISO-CAN board.
Syntax:
int CAN_Status(BYTE BoardNo, BYTE Port,BYTE *bStatus)
Parameter:
BoardNo: [input] PISO-CAN board number (0~7).
Port: [input] CAN port number (1~8)
*bStatus:[output] Status value of CAN controller.
Table 4.3 Bit interpretation of the bStatus.
Bit NAME VALUE
STATUS
1
bus-off
bit 7 Bus Status
0
bus-on
1 error
bit 6 Error Status
0 ok
1 transmit
bit 5 Transmit Status
0 idle
1 receive
bit 4 Receive Status
0 idle
1
complete
bit 3 Transmission Complete Status
0 incomplete
1 release
bit 2 Transmit Buffer Status
0 locked
1 overrun
bit 1 Data Overrun Status
0 absent
1 full/not
empty
bit 0 Receive Buffer Status
0 empty
Return:
CAN_NoError: OK
CAN_BoardNumberError: BoardNo is not correct or exceeds the current
total board number.
PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) -------
52
CAN_PortNumberError: Port number is not correct.
CAN_ActiveBoardError: This board is not activated.
ГК
Атлант
Инжиниринг
–
официальный
представитель
в
РФ
и
СНГ
+7(495)109-02-08 [email protected] www.bbrc.ru