@CHIP-RTOS C Library V2.06 - CAN API
CAN_Error_Counts
Read out CAN Rx/Tx error count and errror
status information for specified CAN port. int CAN_Error_Counts ( unsigned int port_idx, CAN_ERRORS far *errors ); Parameters
port_idx
- CAN port specifier:
CAN0_PORT = 0, or CAN1_PORT = 1
errors
- Pointer to a
CAN_ERRORS
data structure that will be written to by this API to report
the error count and error status information for the specified CAN port.
Return Value
- Error code -
CAN_EC_SUCCESS = 0: Success
CAN_EC_INVALID_PARAMS = -1: port_idx
invalid or errors pointer invalid
Comments
- This function reports transmitter/receiver error counts as specified
by the Bosch CAN specification. Also some discrete bits
are reported which indicate the bus error state.
Inside this API the interrupts are masked for a short period and then
re-enabled. This function is reentrant.
See Also
RTOS API
- This library function uses a
dynamic
link to reach the service
offered by RTOS software
interrupt.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
n/a | n/a | n/a | V1.07 |
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|