]> rtime.felk.cvut.cz Git - linux-lin.git/blob - sllin/linux/lin_bus.h
sllin: add single-response flag
[linux-lin.git] / sllin / linux / lin_bus.h
1 #ifndef _LIN_BUS_H_
2 #define _LIN_BUS_H_
3
4 #define LIN_ID_MASK             0x3f
5 #define LIN_ID_MAX              LIN_ID_MASK
6 #define LIN_CTRL_FRAME          CAN_EFF_FLAG
7
8 #define LIN_DEFAULT_BAUDRATE    19200
9
10 #define LIN_CANFR_FLAGS_OFFS    6 /* Lower 6 bits in can_id correspond to LIN ID */
11
12 #define LIN_CACHE_RESPONSE      (1 << (LIN_CANFR_FLAGS_OFFS))
13 #define LIN_CHECKSUM_EXTENDED   (1 << (LIN_CANFR_FLAGS_OFFS + 1))
14 #define LIN_SINGLE_RESPONSE (1 << (LIN_CANFR_FLAGS_OFFS + 2))
15
16
17 /* Error flags */
18 #define LIN_ERR_RX_TIMEOUT      (1 << (LIN_CANFR_FLAGS_OFFS + 8))
19 #define LIN_ERR_CHECKSUM        (1 << (LIN_CANFR_FLAGS_OFFS + 9))
20 #define LIN_ERR_FRAMING         (1 << (LIN_CANFR_FLAGS_OFFS + 10))
21
22 #endif /* _LIN_BUS_H_ */