This group of defines specifies status fields that can be queried from hsk_can_status().
More...
This group of defines specifies status fields that can be queried from hsk_can_status().
§ CAN_STATUS_ALERT
#define CAN_STATUS_ALERT 3 |
Alert Warning.
- Return values
-
§ CAN_STATUS_BOFF
#define CAN_STATUS_BOFF 5 |
Bus-off Status.
- Return values
-
0 | The bus is not off |
1 | The bus is turned off due to an error counter exceeding 256 |
§ CAN_STATUS_EWRN
#define CAN_STATUS_EWRN 4 |
Error Warning Status.
- Return values
-
0 | No error warnings exceeded |
1 | An error counter has exceeded the warning level of 96 |
§ CAN_STATUS_LEC
The Last Error Code field provides the error triggered by the last message on the bus.
For details check table 16-8 from the User Manual 1.1.
- Return values
-
0 | No Error |
1 | Stuff Error, 5 consecutive bits of the same value are stuffed, this error is triggered when the stuff bit is missing |
2 | Form Error, the frame format was violated |
3 | Ack Error, the message was not acknowledged, maybe nobody else is on the bus |
4 | Bit1 Error, a recessive (1) bit was sent out of sync |
5 | Bit0 Error, a recessive (1) bit won against a dominant (0) bit |
6 | CRC Error, wrong checksum for a received message |
§ CAN_STATUS_RXOK
#define CAN_STATUS_RXOK 2 |
Message Received Successfully.
- Return values
-
0 | No successful receptions since the last time this field was queried |
1 | A message was received successfully |
§ CAN_STATUS_TXOK
#define CAN_STATUS_TXOK 1 |
Message Transmitted Successfully.
- Return values
-
0 | No successful transmission since TXOK was queried last time |
1 | A message was transmitted and acknowledged successfully |