forked from RevolutionPi/piControl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.h
117 lines (102 loc) · 3.5 KB
/
project.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*=======================================================================================
*
* KK KK UU UU NN NN BBBBBB UU UU SSSSSS
* KK KK UU UU NNN NN BB BB UU UU SS
* KK KK UU UU NNNN NN BB BB UU UU SS
* +----- KKKKK UU UU NN NN NN BBBBB UU UU SSSSS
* | KK KK UU UU NN NNNN BB BB UU UU SS
* | KK KK UU UU NN NNN BB BB UU UU SS
* | KK KKK UUUUUU NN NN BBBBBB UUUUUU SSSSSS GmbH
* |
* | [#] I N D U S T R I A L C O M M U N I C A T I O N
* | |
* +-------------+
*
*---------------------------------------------------------------------------------------
*
* (C) KUNBUS GmbH, Heerweg 15C, 73770 Denkendorf, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License V2 as published by
* the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For licencing details see COPYING
*
*=======================================================================================
*/
#ifndef BSPCONFIG_H_INC
#define BSPCONFIG_H_INC
//#define ENDTEST_DIO
#if 0
#define DEBUG_CONFIG
#define pr_info_config(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#else
#define pr_info_config(fmt, ...)
#endif
#if 0
#define DEBUG_MASTER_STATE
#define pr_info_master(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#define pr_info_master2(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#elif 1
#define DEBUG_MASTER_STATE
#define pr_info_master(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#define pr_info_master2(fmt, ...)
#else
#define pr_info_master(fmt, ...)
#define pr_info_master2(fmt, ...)
#endif
#if 0
#define DEBUG_DEVICE_DIO
#define pr_info_dio(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#else
#define pr_info_dio(fmt, ...)
#endif
#if 0
#define DEBUG_DEVICE_AIO
#define pr_info_aio(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#else
#define pr_info_aio(fmt, ...)
#endif
#if 0
#define DEBUG_LINUX_DRV
#define pr_info_drv(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#else
#define pr_info_drv(fmt, ...)
#endif
#if 0
#define DEBUG_SERIALCOMM
#define pr_info_serial(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#define pr_info_serial2(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#define pr_info_io(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#else
#define pr_info_serial(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
#define pr_info_serial2(fmt, ...)
#define pr_info_io(fmt, ...)
#endif
//#define DEBUG_GPIO
#define DEBUG_DEVICE
#define DEBUG_DEVICE_IO
#define RT_PRIO_UART 39
#define RT_PRIO_BRIDGE 38
#define RT_PRIO_GATE 37
#ifdef DEBUG_SERIALCOMM
// use longer intervals to reduce the number of messages
#define INTERVAL_RS485 ( 1*1000*1000) // 100 ms piRs485
#define INTERVAL_IO_COMM ( 5*1000*1000) // 500 ms piIoComm
#define INTERVAL_ADDITIONAL ( 500*1000) // 500 ms piIoComm
#else
#define INTERVAL_RS485 ( 1*1000*1000) // 1 ms piRs485
#define INTERVAL_IO_COMM ( 5*1000*1000) // 5 ms piIoComm
#define INTERVAL_ADDITIONAL ( 500*1000) // 0.5 ms piIoComm
#endif
#define KB_PD_LEN (u16)512
#define KB_PI_LEN 4096
//#define VERBOSE
#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#endif // BSPCONFIG_H_INC