libc/new/linux_uapi/linux/can/
error.rs1pub use crate::linux::can::*;
4
5pub const CAN_ERR_DLC: c_int = 8;
6
7pub const CAN_ERR_TX_TIMEOUT: c_uint = 0x00000001;
8pub const CAN_ERR_LOSTARB: c_uint = 0x00000002;
9pub const CAN_ERR_CRTL: c_uint = 0x00000004;
10pub const CAN_ERR_PROT: c_uint = 0x00000008;
11pub const CAN_ERR_TRX: c_uint = 0x00000010;
12pub const CAN_ERR_ACK: c_uint = 0x00000020;
13pub const CAN_ERR_BUSOFF: c_uint = 0x00000040;
14pub const CAN_ERR_BUSERROR: c_uint = 0x00000080;
15pub const CAN_ERR_RESTARTED: c_uint = 0x00000100;
16pub const CAN_ERR_CNT: c_uint = 0x00000200;
17
18pub const CAN_ERR_LOSTARB_UNSPEC: c_int = 0x00;
19
20pub const CAN_ERR_CRTL_UNSPEC: c_int = 0x00;
21pub const CAN_ERR_CRTL_RX_OVERFLOW: c_int = 0x01;
22pub const CAN_ERR_CRTL_TX_OVERFLOW: c_int = 0x02;
23pub const CAN_ERR_CRTL_RX_WARNING: c_int = 0x04;
24pub const CAN_ERR_CRTL_TX_WARNING: c_int = 0x08;
25pub const CAN_ERR_CRTL_RX_PASSIVE: c_int = 0x10;
26pub const CAN_ERR_CRTL_TX_PASSIVE: c_int = 0x20;
27pub const CAN_ERR_CRTL_ACTIVE: c_int = 0x40;
28
29pub const CAN_ERR_PROT_UNSPEC: c_int = 0x00;
30pub const CAN_ERR_PROT_BIT: c_int = 0x01;
31pub const CAN_ERR_PROT_FORM: c_int = 0x02;
32pub const CAN_ERR_PROT_STUFF: c_int = 0x04;
33pub const CAN_ERR_PROT_BIT0: c_int = 0x08;
34pub const CAN_ERR_PROT_BIT1: c_int = 0x10;
35pub const CAN_ERR_PROT_OVERLOAD: c_int = 0x20;
36pub const CAN_ERR_PROT_ACTIVE: c_int = 0x40;
37pub const CAN_ERR_PROT_TX: c_int = 0x80;
38
39pub const CAN_ERR_PROT_LOC_UNSPEC: c_int = 0x00;
40pub const CAN_ERR_PROT_LOC_SOF: c_int = 0x03;
41pub const CAN_ERR_PROT_LOC_ID28_21: c_int = 0x02;
42pub const CAN_ERR_PROT_LOC_ID20_18: c_int = 0x06;
43pub const CAN_ERR_PROT_LOC_SRTR: c_int = 0x04;
44pub const CAN_ERR_PROT_LOC_IDE: c_int = 0x05;
45pub const CAN_ERR_PROT_LOC_ID17_13: c_int = 0x07;
46pub const CAN_ERR_PROT_LOC_ID12_05: c_int = 0x0F;
47pub const CAN_ERR_PROT_LOC_ID04_00: c_int = 0x0E;
48pub const CAN_ERR_PROT_LOC_RTR: c_int = 0x0C;
49pub const CAN_ERR_PROT_LOC_RES1: c_int = 0x0D;
50pub const CAN_ERR_PROT_LOC_RES0: c_int = 0x09;
51pub const CAN_ERR_PROT_LOC_DLC: c_int = 0x0B;
52pub const CAN_ERR_PROT_LOC_DATA: c_int = 0x0A;
53pub const CAN_ERR_PROT_LOC_CRC_SEQ: c_int = 0x08;
54pub const CAN_ERR_PROT_LOC_CRC_DEL: c_int = 0x18;
55pub const CAN_ERR_PROT_LOC_ACK: c_int = 0x19;
56pub const CAN_ERR_PROT_LOC_ACK_DEL: c_int = 0x1B;
57pub const CAN_ERR_PROT_LOC_EOF: c_int = 0x1A;
58pub const CAN_ERR_PROT_LOC_INTERM: c_int = 0x12;
59
60pub const CAN_ERR_TRX_UNSPEC: c_int = 0x00;
61pub const CAN_ERR_TRX_CANH_NO_WIRE: c_int = 0x04;
62pub const CAN_ERR_TRX_CANH_SHORT_TO_BAT: c_int = 0x05;
63pub const CAN_ERR_TRX_CANH_SHORT_TO_VCC: c_int = 0x06;
64pub const CAN_ERR_TRX_CANH_SHORT_TO_GND: c_int = 0x07;
65pub const CAN_ERR_TRX_CANL_NO_WIRE: c_int = 0x40;
66pub const CAN_ERR_TRX_CANL_SHORT_TO_BAT: c_int = 0x50;
67pub const CAN_ERR_TRX_CANL_SHORT_TO_VCC: c_int = 0x60;
68pub const CAN_ERR_TRX_CANL_SHORT_TO_GND: c_int = 0x70;
69pub const CAN_ERR_TRX_CANL_SHORT_TO_CANH: c_int = 0x80;
70
71pub const CAN_ERROR_WARNING_THRESHOLD: c_int = 96;
72pub const CAN_ERROR_PASSIVE_THRESHOLD: c_int = 128;
73pub const CAN_BUS_OFF_THRESHOLD: c_int = 256;