2 * This file is part of INAV Project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * Alternatively, the contents of this file may be used under the terms
9 * of the GNU General Public License Version 3, as described below:
11 * This file is free software: you may copy, redistribute and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or (at your
14 * option) any later version.
16 * This file is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 * Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
30 #include <sys/socket.h>
34 #define TARGET_BOARD_IDENTIFIER "SITL"
35 #define USBD_PRODUCT_STRING "SITL"
37 #define REQUIRE_PRINTF_LONG_SUPPORT
39 // file name to save config
40 #define EEPROM_FILENAME "eeprom.bin"
41 #define CONFIG_IN_FILE
42 #define EEPROM_SIZE 32768
44 #undef SCHEDULER_DELAY_LIMIT
45 #define SCHEDULER_DELAY_LIMIT 1
56 #define SERIAL_PORT_COUNT 8
57 #define SITL_SERIAL_TASK_US (500)
59 #define DEFAULT_RX_FEATURE FEATURE_RX_MSP
60 #define DEFAULT_FEATURES (FEATURE_GPS | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT)
65 #define USE_PITOT_FAKE
70 #define USE_RANGEFINDER_FAKE
72 #undef MAX_MIXER_PROFILE_COUNT
73 #define MAX_MIXER_PROFILE_COUNT 2
77 #define USE_SERIAL_GIMBAL
78 #define USE_HEADTRACKER
79 #define USE_HEADTRACKER_SERIAL
80 #define USE_HEADTRACKER_MSP
84 #undef USE_GYRO_KALMAN // Strange behaviour under x86/x64 ?!?
89 #undef USE_MSP_OVER_TELEMETRY
90 #undef USE_TELEMETRY_FRSKY_HUB
91 #undef USE_TELEMETRY_HOTT
92 #undef USE_TELEMETRY_SMARTPORT
93 #undef USE_RESOURCE_MGMT
94 #undef USE_TELEMETRY_CRSF
95 #undef USE_TELEMETRY_IBUS
96 #undef USE_TELEMETRY_JETIEXBUS
97 #undef USE_TELEMETRY_SRXL
98 #undef USE_TELEMETRY_GHST
100 #undef USE_CAMERA_CONTROL
101 #undef USE_BRUSHED_ESC_AUTODETECT
102 #undef USE_SERIAL_4WAY_BLHELI_BOOTLOADER
103 #undef USE_SERIAL_4WAY_SK_BOOTLOADER
104 #undef USE_ADAPTIVE_FILTER
110 #define TARGET_FLASH_SIZE 2048
112 #define LED_STRIP_TIMER 1
113 #define SOFTSERIAL_1_TIMER 2
114 #define SOFTSERIAL_2_TIMER 3
116 #define DEFIO_NO_PORTS
118 extern uint32_t SystemCoreClock
;
140 } DMA_Channel_TypeDef
;
152 typedef enum {RESET
= 0, SET
= !RESET
} FlagStatus
, ITStatus
;
153 typedef enum {DISABLE
= 0, ENABLE
= !DISABLE
} FunctionalState
;
154 typedef enum {TEST_IRQ
= 0 } IRQn_Type
;
156 EXTI_Trigger_Rising
= 0x08,
157 EXTI_Trigger_Falling
= 0x0C,
158 EXTI_Trigger_Rising_Falling
= 0x10
159 } EXTITrigger_TypeDef
;
169 #define GPIOA_BASE ((intptr_t)0x0001)
176 #define USART1 ((USART_TypeDef *)0x0001)
177 #define USART2 ((USART_TypeDef *)0x0002)
178 #define USART3 ((USART_TypeDef *)0x0003)
179 #define USART4 ((USART_TypeDef *)0x0004)
180 #define USART5 ((USART_TypeDef *)0x0005)
181 #define USART6 ((USART_TypeDef *)0x0006)
182 #define USART7 ((USART_TypeDef *)0x0007)
183 #define USART8 ((USART_TypeDef *)0x0008)
185 #define UART4 ((USART_TypeDef *)0x0004)
186 #define UART5 ((USART_TypeDef *)0x0005)
187 #define UART7 ((USART_TypeDef *)0x0007)
188 #define UART8 ((USART_TypeDef *)0x0008)
199 extern bool lockMainPID(void);
200 extern void unlockMainPID(void);
201 extern void parseArguments(int argc
, char *argv
[]);
202 extern char *strnstr(const char *s
, const char *find
, size_t slen
);
203 extern int lookupAddress (char *, int, int, struct sockaddr
*, socklen_t
*);
205 #define IPADDRESS_PRINT_BUFLEN (INET6_ADDRSTRLEN + 16)
206 extern char *prettyPrintAddress(struct sockaddr
*, char*, size_t);