blob: 5ac603e92516acd0757257c4580abf2e5ec543fb [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -07007#ifndef _UAPI_CAN_ERROR_H
8#define _UAPI_CAN_ERROR_H
Ben Cheng655a7c02013-10-16 16:09:24 -07009#define CAN_ERR_DLC 8
10#define CAN_ERR_TX_TIMEOUT 0x00000001U
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define CAN_ERR_LOSTARB 0x00000002U
12#define CAN_ERR_CRTL 0x00000004U
13#define CAN_ERR_PROT 0x00000008U
14#define CAN_ERR_TRX 0x00000010U
Ben Cheng655a7c02013-10-16 16:09:24 -070015#define CAN_ERR_ACK 0x00000020U
16#define CAN_ERR_BUSOFF 0x00000040U
17#define CAN_ERR_BUSERROR 0x00000080U
18#define CAN_ERR_RESTARTED 0x00000100U
Christopher Ferris7447a1c2022-10-04 18:24:44 -070019#define CAN_ERR_CNT 0x00000200U
Ben Cheng655a7c02013-10-16 16:09:24 -070020#define CAN_ERR_LOSTARB_UNSPEC 0x00
21#define CAN_ERR_CRTL_UNSPEC 0x00
22#define CAN_ERR_CRTL_RX_OVERFLOW 0x01
23#define CAN_ERR_CRTL_TX_OVERFLOW 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define CAN_ERR_CRTL_RX_WARNING 0x04
25#define CAN_ERR_CRTL_TX_WARNING 0x08
26#define CAN_ERR_CRTL_RX_PASSIVE 0x10
27#define CAN_ERR_CRTL_TX_PASSIVE 0x20
Christopher Ferris05d08e92016-02-04 13:16:38 -080028#define CAN_ERR_CRTL_ACTIVE 0x40
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define CAN_ERR_PROT_UNSPEC 0x00
30#define CAN_ERR_PROT_BIT 0x01
31#define CAN_ERR_PROT_FORM 0x02
Christopher Ferris05d08e92016-02-04 13:16:38 -080032#define CAN_ERR_PROT_STUFF 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070033#define CAN_ERR_PROT_BIT0 0x08
34#define CAN_ERR_PROT_BIT1 0x10
35#define CAN_ERR_PROT_OVERLOAD 0x20
Christopher Ferris05d08e92016-02-04 13:16:38 -080036#define CAN_ERR_PROT_ACTIVE 0x40
Ben Cheng655a7c02013-10-16 16:09:24 -070037#define CAN_ERR_PROT_TX 0x80
38#define CAN_ERR_PROT_LOC_UNSPEC 0x00
39#define CAN_ERR_PROT_LOC_SOF 0x03
Christopher Ferris05d08e92016-02-04 13:16:38 -080040#define CAN_ERR_PROT_LOC_ID28_21 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -070041#define CAN_ERR_PROT_LOC_ID20_18 0x06
42#define CAN_ERR_PROT_LOC_SRTR 0x04
43#define CAN_ERR_PROT_LOC_IDE 0x05
Christopher Ferris05d08e92016-02-04 13:16:38 -080044#define CAN_ERR_PROT_LOC_ID17_13 0x07
Ben Cheng655a7c02013-10-16 16:09:24 -070045#define CAN_ERR_PROT_LOC_ID12_05 0x0F
46#define CAN_ERR_PROT_LOC_ID04_00 0x0E
47#define CAN_ERR_PROT_LOC_RTR 0x0C
Christopher Ferris05d08e92016-02-04 13:16:38 -080048#define CAN_ERR_PROT_LOC_RES1 0x0D
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define CAN_ERR_PROT_LOC_RES0 0x09
50#define CAN_ERR_PROT_LOC_DLC 0x0B
51#define CAN_ERR_PROT_LOC_DATA 0x0A
Christopher Ferris05d08e92016-02-04 13:16:38 -080052#define CAN_ERR_PROT_LOC_CRC_SEQ 0x08
Ben Cheng655a7c02013-10-16 16:09:24 -070053#define CAN_ERR_PROT_LOC_CRC_DEL 0x18
54#define CAN_ERR_PROT_LOC_ACK 0x19
55#define CAN_ERR_PROT_LOC_ACK_DEL 0x1B
Christopher Ferris05d08e92016-02-04 13:16:38 -080056#define CAN_ERR_PROT_LOC_EOF 0x1A
Ben Cheng655a7c02013-10-16 16:09:24 -070057#define CAN_ERR_PROT_LOC_INTERM 0x12
58#define CAN_ERR_TRX_UNSPEC 0x00
59#define CAN_ERR_TRX_CANH_NO_WIRE 0x04
Christopher Ferris05d08e92016-02-04 13:16:38 -080060#define CAN_ERR_TRX_CANH_SHORT_TO_BAT 0x05
Ben Cheng655a7c02013-10-16 16:09:24 -070061#define CAN_ERR_TRX_CANH_SHORT_TO_VCC 0x06
62#define CAN_ERR_TRX_CANH_SHORT_TO_GND 0x07
63#define CAN_ERR_TRX_CANL_NO_WIRE 0x40
Christopher Ferris05d08e92016-02-04 13:16:38 -080064#define CAN_ERR_TRX_CANL_SHORT_TO_BAT 0x50
Ben Cheng655a7c02013-10-16 16:09:24 -070065#define CAN_ERR_TRX_CANL_SHORT_TO_VCC 0x60
66#define CAN_ERR_TRX_CANL_SHORT_TO_GND 0x70
67#define CAN_ERR_TRX_CANL_SHORT_TO_CANH 0x80
Christopher Ferris7447a1c2022-10-04 18:24:44 -070068#define CAN_ERROR_WARNING_THRESHOLD 96
69#define CAN_ERROR_PASSIVE_THRESHOLD 128
70#define CAN_BUS_OFF_THRESHOLD 256
Christopher Ferris05d08e92016-02-04 13:16:38 -080071#endif