]> rtime.felk.cvut.cz Git - linux-lin.git/blob - lin_config/src/lin_config.h
linconf: Modular architecture.
[linux-lin.git] / lin_config / src / lin_config.h
1 #ifndef _LIN_CONFIG_H_
2 #define _LIN_CONFIG_H_
3
4 #define FLASH_CONF_fl                           (1 << 0)
5 #define RESET_DEVICE_fl                         (1 << 1)
6
7 #define MAX_LIN_ID                              0x3F
8 #define PCL_DEFAULT_CONFIG                      "config.pclin"
9
10 struct linc_scheduler_entry {
11         int lin_id;
12         int interval_ms;
13 };
14
15 /* Index in this array = LIN ID */
16 struct linc_frame_entry {
17         int status; /* 1 = active; 0 = unactive */
18         int data_len;
19         char data[8];
20 };
21
22 struct linc_lin_state {
23         int is_active;
24         int baudrate;
25         int master_status;
26         int bus_termination;
27
28         struct linc_frame_entry frame_entry[MAX_LIN_ID];
29         struct linc_scheduler_entry scheduler_entry[100]; // FIXME max value
30         int scheduler_entries_cnt;
31
32         char *dev;
33 };
34 struct linc_lin_state linc_lin_state;
35
36
37 #endif /* _LIN_CONFIG_H_ */