ChibiOS/RT  5.1.0
chrestrictions.h
Go to the documentation of this file.
1 /*
2  ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
3 
4  This file is part of ChibiOS.
5 
6  ChibiOS is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 3 of the License, or
9  (at your option) any later version.
10 
11  ChibiOS is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 /**
21  * @file chrestrictions.h
22  * @brief Licensing restrictions header.
23  */
24 
25 #ifndef CHRESTRICTIONS_H
26 #define CHRESTRICTIONS_H
27 
28 /*===========================================================================*/
29 /* Module constants. */
30 /*===========================================================================*/
31 
32 /*===========================================================================*/
33 /* Module pre-compile time settings. */
34 /*===========================================================================*/
35 
36 /*===========================================================================*/
37 /* Derived constants and error checks. */
38 /*===========================================================================*/
39 
40 #if CH_CUSTOMER_LIC_RT == FALSE
41 #error "ChibiOS/RT not licensed"
42 #endif
43 
44 #if (CH_LICENSE_FEATURES != CH_FEATURES_FULL) && \
45  (CH_LICENSE_FEATURES != CH_FEATURES_INTERMEDIATE) && \
46  (CH_LICENSE_FEATURES != CH_FEATURES_BASIC)
47 #error "invalid CH_LICENSE_FEATURES setting"
48 #endif
49 
50 /* Restrictions in basic and intermediate modes.*/
51 #if (CH_LICENSE_FEATURES == CH_FEATURES_INTERMEDIATE) || \
52  (CH_LICENSE_FEATURES == CH_FEATURES_BASIC)
53 
54 /* System tick limited to 1000hz.*/
55 #if CH_CFG_ST_FREQUENCY > 1000
56 #undef CH_CFG_ST_FREQUENCY
57 #define CH_CFG_ST_FREQUENCY 1000
58 #endif
59 
60 /* Restricted subsystems.*/
61 #undef CH_DBG_STATISTICS
62 #undef CH_DBG_TRACE_MASK
63 
64 #define CH_DBG_STATISTICS FALSE
65 #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
66 
67 #endif /* (CH_LICENSE_FEATURES == CH_FEATURES_INTERMEDIATE) ||
68  (CH_LICENSE_FEATURES == CH_FEATURES_BASIC) */
69 
70 /* Restrictions in basic mode.*/
71 #if CH_LICENSE_FEATURES == CH_FEATURES_BASIC
72 
73 /* Tick-Less mode restricted.*/
74 #undef CH_CFG_ST_TIMEDELTA
75 #define CH_CFG_ST_TIMEDELTA 0
76 
77 /* Restricted subsystems.*/
78 #undef CH_CFG_USE_TM
79 #undef CH_CFG_USE_MUTEXES
80 #undef CH_CFG_USE_CONDVARS
81 #undef CH_CFG_USE_DYNAMIC
82 
83 #define CH_CFG_USE_TM FALSE
84 #define CH_CFG_USE_MUTEXES FALSE
85 #define CH_CFG_USE_CONDVARS FALSE
86 #define CH_CFG_USE_DYNAMIC FALSE
87 
88 #endif /* CH_LICENSE_FEATURES == CH_FEATURES_BASIC */
89 
90 /*===========================================================================*/
91 /* Module data structures and types. */
92 /*===========================================================================*/
93 
94 /*===========================================================================*/
95 /* Module macros. */
96 /*===========================================================================*/
97 
98 /*===========================================================================*/
99 /* External declarations. */
100 /*===========================================================================*/
101 
102 /*===========================================================================*/
103 /* Module inline functions. */
104 /*===========================================================================*/
105 
106 #endif /* CHRESTRICTIONS_H */