EmbeddedEtcher
ossettings.h
Go to the documentation of this file.
1 
9 #ifndef OS_SETTINGS_H
10 #define OS_SETTINGS_H
11 
12 /* Error */
13 #define MAX_MESSAGE_SIZE 255
14 
15 /* X86 */
16 //#define X86_TEST_ENVIRONMENT
17 /* Only needed for X86 simulation. */
18 #define MAX_LEVEL_INT_NESTING 3
19 
20 /* Timing */
21 // TODO: Adjust this:
22 #define SYS_TICK_MS 100
23 /* Don't adjust this ;) */
24 #if (SYS_TICK_MS <= 100)
25 #define SYS_TICK_PERIOD_MS SYS_TICK_MS
26 #else
27 #define SYS_TICK_PERIOD_MS 100
28 #endif
29 #define MS_2_TICKS(MS)\
30  (MS/SYS_TICK_MS)
31 #if (SYS_TICK_MS < 0)
32  #error "SYS_TICK_MS can not be smaller than 1."
33 #endif
34 #if ( (SYS_TICK_MS%1) != 0)
35  #error "SYS_TICK_MS has to be a natural number."
36 #endif
37 
38 /* Scheduler */
39 // TODO: Adjust this:
40 #define MAX_SIZE_TASK_NAME 20
41 #define MAX_NUMBER_OF_TASKS 4
42 #define HEAP_SIZE 4
43 /* Don't adjust this ;) */
44 #if (MAX_NUMBER_OF_TASKS > HEAP_SIZE)
45  #warning "HEAP_SIZE < MAX_NUMER_OF_TASKS: This might lead to problems."
46 #endif
47 
48 /* Alive LED */
49 #define ALIVE_PULSE_LENGTH MS_2_TICKS(200)
50 
51 /* printf */
52 /* Convert every \n to \n\r */
53 #define CONVERT_NEWLINE
54 /* Size of a standard string printed with printf. */
55 #define STD_STRING_BUFFER_SIZE 128
56 
57 /* Debugging ON == 1 or OFF == 0 */
58 #define DEBUG_MODE 1
59 
60 #endif /* OS_SETTINGS_H */