dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_config.h
Go to the documentation of this file.
1 
12 /*
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful, but
19  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  * for more details.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with this program; if not, see <http://www.gnu.org/licenses/>
25  *
26  * Additional note on redistribution: The copyright and license notices above
27  * must be maintained in each individual source file that is a derivative work
28  * of this source file; otherwise redistribution is prohibited.
29  */
30 
31 #ifndef PIOS_CONFIG_H
32 #define PIOS_CONFIG_H
33 
34 /* Major features */
35 #define PIOS_INCLUDE_CHIBIOS
36 #define PIOS_INCLUDE_BL_HELPER
37 
38 /* Enable/Disable PiOS Modules */
39 #define WDG_STATS_DIAGNOSTICS
40 #define PIOS_INCLUDE_ANNUNC
41 #define PIOS_INCLUDE_IAP
42 #define PIOS_INCLUDE_TIM
43 #define PIOS_INCLUDE_SYS
44 #define PIOS_INCLUDE_USART
45 #define PIOS_INCLUDE_USB
46 #define PIOS_INCLUDE_USB_HID
47 #define PIOS_INCLUDE_USB_CDC
48 #define PIOS_INCLUDE_EXTI
49 #define PIOS_INCLUDE_RTC
50 #define PIOS_INCLUDE_WDG
51 #define PIOS_INCLUDE_SPI
52 #define PIOS_INCLUDE_FASTHEAP
53 #define PIOS_INCLUDE_TBSVTXCONFIG
54 
55 /* Com systems to include */
56 #define PIOS_INCLUDE_COM
57 #define PIOS_INCLUDE_MSP_BRIDGE
58 
59 #define PIOS_INCLUDE_GPS
60 #define PIOS_INCLUDE_GPS_NMEA_PARSER
61 #define PIOS_INCLUDE_GPS_UBX_PARSER
62 
63 #define PIOS_INCLUDE_FLASH
64 #define PIOS_INCLUDE_LOGFS_SETTINGS
65 #define PIOS_INCLUDE_FLASH_INTERNAL
66 
67 /* OSD stuff */
68 #define PIOS_VIDEO_TIM4_COUNTER
69 #define PIOS_INCLUDE_VIDEO
70 #define PIOS_VIDEO_SPLITBUFFER
71 #define MODULE_FLIGHTSTATS_BUILTIN
72 #define PIOS_INCLUDE_DEBUG_CONSOLE
73 #define PIOS_INCLUDE_MAX7456
74 #define PIOS_OMIT_TIM2IRQ
75 
76 /* Flags that alter behaviors */
77 #define PIOS_INCLUDE_INITCALL /* Include init call structures */
78 
79 /* Alarm Thresholds */
80 #define HEAP_LIMIT_WARNING 1000
81 #define HEAP_LIMIT_CRITICAL 500
82 #define IRQSTACK_LIMIT_WARNING 150
83 #define IRQSTACK_LIMIT_CRITICAL 80
84 #define CPULOAD_LIMIT_WARNING 80
85 #define CPULOAD_LIMIT_CRITICAL 95
86 
87 /*
88  * This has been calibrated 2014/03/01 using chibios @ fbd194c026098076bddd9e45e147828000f39d89
89  * Calibration has been done by disabling the init task, breaking into debugger after
90  * approximately after 60 seconds, then doing the following math:
91  *
92  * IDLE_COUNTS_PER_SEC_AT_NO_LOAD = (uint32_t)((double)idleCounter / xTickCount * 1000 + 0.5)
93  *
94  * This has to be redone every time the toolchain, toolchain flags or RTOS
95  * configuration like number of task priorities or similar changes.
96  * A change in the cpu load calculation or the idle task handler will invalidate this as well.
97  */
98 #define IDLE_COUNTS_PER_SEC_AT_NO_LOAD (9873737)
99 
100 #endif /* PIOS_CONFIG_H */
101