brickOS Kernel Developer
v0.9.0
config.h
Go to the documentation of this file.
1
6
/*
7
* The contents of this file are subject to the Mozilla Public License
8
* Version 1.0 (the "License"); you may not use this file except in
9
* compliance with the License. You may obtain a copy of the License at
10
* http://www.mozilla.org/MPL/
11
*
12
* Software distributed under the License is distributed on an "AS IS"
13
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
14
* License for the specific language governing rights and limitations
15
* under the License.
16
*
17
* The Original Code is legOS code, released October 17, 1999.
18
*
19
* The Initial Developer of the Original Code is Markus L. Noga.
20
* Portions created by Markus L. Noga are Copyright (C) 1999
21
* Markus L. Noga. All Rights Reserved.
22
*
23
* Contributor(s): Markus L. Noga <markus@noga.de>
24
*/
25
26
#ifndef __config_h__
27
#define __config_h__
28
29
// compilation environment
30
//
31
// #define CONF_RCX_COMPILER //!< a special RCX compiler is used.
32
33
// core system services
34
//
35
#define CONF_TIME
36
#define CONF_MM
37
#define CONF_TM
38
#define CONF_AUTOSHUTOFF
39
//#define CONF_TM_DEBUG //!< view key shows current instruction pointer
40
#define CONF_SETJMP
41
#define CONF_ATOMIC
42
#define CONF_SEMAPHORES
43
#define CONF_CRITICAL_SECTIONS
44
#define CONF_PROGRAM
45
#define CONF_VIS
46
//#define CONF_ROM_MEMCPY //!< Use the ROM memcpy routine
47
48
// networking services
49
//
50
#define CONF_LNP
51
// #define CONF_LNP_FAST //!< enable 4800 bps LNP
52
// Can override with compile-time option
53
#if !defined(CONF_LNP_HOSTADDR)
54
#define CONF_LNP_HOSTADDR 0
55
#endif
56
57
// 16 nodes x 16 ports (affects size of lnp_addressing_handler[] table)
58
#define CONF_LNP_HOSTMASK 0xf0
59
60
// remote control services
61
//
62
#define CONF_RCX_PROTOCOL
63
#define CONF_LR_HANDLER
64
#define CONF_RCX_MESSAGE
65
66
// drivers
67
//
68
#define CONF_DKEY
69
#define CONF_BATTERY_INDICATOR
70
#define CONF_LCD_REFRESH
71
#define CONF_CONIO
72
#define CONF_ASCII
73
#define CONF_DSOUND
74
#define CONF_ON_OFF_SOUND
75
#define CONF_DMOTOR
76
// #define CONF_DMOTOR_HOLD //!< experimental: use hold mode PWM instead of coast mode.
77
#define CONF_DSENSOR
78
#define CONF_DSENSOR_ROTATION
79
//#define CONF_DSENSOR_VELOCITY //!< rotation sensor velocity
80
//#define CONF_DSENSOR_MUX //!< sensor multiplexor
81
//#define CONF_DSENSOR_SWMUX //!< techno-stuff swmux sensor
82
83
// dependencies
84
//
85
#if defined(CONF_ASCII) && !defined(CONF_CONIO)
86
#error "Ascii needs console IO"
87
#endif
88
89
#if defined(CONF_DKEY) && !defined(CONF_TIME)
90
#error "Key debouncing needs system time."
91
#endif
92
93
#if defined(CONF_TM) && !defined(CONF_TIME)
94
#error "Task management needs system time."
95
#endif
96
97
#if defined(CONF_TM) && !defined(CONF_MM)
98
#error "Task management needs memory management."
99
#endif
100
101
#if defined(CONF_TM) && !defined(CONF_ATOMIC)
102
#error "Task management needs atomic counters for kernel lock"
103
#endif
104
105
#if defined(CONF_LNP) && defined(CONF_TM) && !defined(CONF_SEMAPHORES)
106
#error "Tasksafe networking needs semaphores."
107
#endif
108
109
#if defined(CONF_SEMAPHORES) && !defined(CONF_ATOMIC)
110
#error "Semphores need atomic counters"
111
#endif
112
113
#if defined(CONF_CRITICAL_SECTIONS) && !defined(CONF_ATOMIC)
114
#error "Critical sections need atomic counters"
115
#endif
116
117
#if defined(CONF_RCX_PROTOCOL) && !defined(CONF_LNP)
118
#error "RCX protocol needs networking."
119
#endif
120
121
#if defined(CONF_LR_HANDLER) && !defined(CONF_RCX_PROTOCOL)
122
#error "Remote control handler needs remote control protocol."
123
#endif
124
125
#if defined(CONF_RCX_MESSAGE) && !defined(CONF_LNP)
126
#error "Standard firmware message needs networking."
127
#endif
128
129
#if defined(CONF_LR_HANDLER) && !defined(CONF_TM)
130
#error "Remote support needs task managment"
131
#endif
132
133
#if defined(CONF_PROGRAM) && (!defined(CONF_TM) || !defined(CONF_LNP) || !defined(CONF_DKEY) || !defined(CONF_ASCII))
134
#error "Program support needs task management, networking, key debouncing, and ASCII."
135
#endif
136
137
#if defined(CONF_DSENSOR_ROTATION) && !defined(CONF_DSENSOR)
138
#error "Rotation sensor needs general sensor code."
139
#endif
140
141
#if defined(CONF_DSENSOR_VELOCITY) && !defined(CONF_DSENSOR_ROTATION)
142
#error "Velocity sensor needs rotation sensor code."
143
#endif
144
146
#define __TEXT_HI__ __attribute__ ((__section__ (".text.hi")))
147
148
#endif
// __config_h__
boot
config.h
Generated by
1.9.8