2009-12-02 06:33:29 +01:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
2010-07-28 09:28:21 +02:00
|
|
|
* @addtogroup OpenPilotSystem OpenPilot System
|
|
|
|
* @{
|
|
|
|
* @addtogroup OpenPilotCore OpenPilot Core
|
|
|
|
* @{
|
2009-12-02 06:33:29 +01:00
|
|
|
*
|
|
|
|
* @file pios_config.h
|
2010-01-31 18:56:54 +01:00
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
2009-12-15 13:17:11 +01:00
|
|
|
* @brief PiOS configuration header.
|
2010-03-10 10:12:31 +01:00
|
|
|
* Central compile time config for the project.
|
2010-07-28 09:28:21 +02:00
|
|
|
* In particular, pios_config.h is where you define which PiOS libraries
|
|
|
|
* and features are included in the firmware.
|
2009-12-02 06:33:29 +01:00
|
|
|
* @see The GNU Public License (GPL) Version 3
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef PIOS_CONFIG_H
|
|
|
|
#define PIOS_CONFIG_H
|
|
|
|
|
2009-12-23 05:03:21 +01:00
|
|
|
|
2010-02-28 07:47:49 +01:00
|
|
|
/* Enable/Disable PiOS Modules */
|
2010-03-11 13:38:51 +01:00
|
|
|
#define PIOS_INCLUDE_ADC
|
|
|
|
#define PIOS_INCLUDE_DELAY
|
|
|
|
#define PIOS_INCLUDE_I2C
|
|
|
|
#define PIOS_INCLUDE_IRQ
|
|
|
|
#define PIOS_INCLUDE_LED
|
2011-02-13 18:43:44 +01:00
|
|
|
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_INCLUDE_RCVR
|
|
|
|
|
2011-02-13 18:43:44 +01:00
|
|
|
#define PIOS_INCLUDE_SPEKTRUM
|
bootcfg: use UAVobj to control boot-time HW config
This should mark an end to the compile-time selection of HW
configurations.
Minor changes in board initialization for all platforms:
- Most config structs are marked static to prevent badly written
drivers from directly referring to config data.
- Adapt to changes in .irq fields in config data.
- Adapt to changes in USART IRQ handling.
Major changes in board initialization for CC:
- Use HwSettings UAVObj to decide which drivers to attach to
the "main" port and the flexi port, and select the appropriate
device configuration data.
- HwSettings allows choosing between Disabled, Telemetry, SBUS,
Spektrum,GPS, and I2C for each of the two ports.
- Use ManualControlSettings.InputMode to init/configure the
appropriate receiver module, and register its available rx channels
with the PIOS_RCVR layer. Can choose between PWM, Spektrum and PPM
at board init time. PPM driver is broken, and SBUS will work once
it is added to this UAVObj as an option.
- CC build now includes code for SBUS, Spektrum and PWM receivers in
every firmware image.
PIOS_USART driver:
- Now handles its own low-level IRQs internally
- If NULL upper-level IRQ handler is bound in at board init time
then rx/tx is satisfied by internal PIOS_USART buffered IO routines
which are (typically) attached to the COM layer.
- If an alternate upper-level IRQ handler is bound in at board init
then that handler is called and expected to clear down the USART
IRQ sources. This is used by Spektrum and SBUS drivers.
PIOS_SBUS and PIOS_SPEKTRUM drivers:
- Improved data/API hiding
- No longer assume they know where their config data is stored which
allows for boot-time alternate configurations for the driver.
- Now registers an upper-level IRQ handlerwith the USART layer to
decouple the driver from which USART it is actually attached to.
2011-07-06 02:21:00 +02:00
|
|
|
//#define PIOS_INCLUDE_SBUS
|
2011-02-20 14:40:19 +01:00
|
|
|
#define PIOS_INCLUDE_PWM
|
bootcfg: use UAVobj to control boot-time HW config
This should mark an end to the compile-time selection of HW
configurations.
Minor changes in board initialization for all platforms:
- Most config structs are marked static to prevent badly written
drivers from directly referring to config data.
- Adapt to changes in .irq fields in config data.
- Adapt to changes in USART IRQ handling.
Major changes in board initialization for CC:
- Use HwSettings UAVObj to decide which drivers to attach to
the "main" port and the flexi port, and select the appropriate
device configuration data.
- HwSettings allows choosing between Disabled, Telemetry, SBUS,
Spektrum,GPS, and I2C for each of the two ports.
- Use ManualControlSettings.InputMode to init/configure the
appropriate receiver module, and register its available rx channels
with the PIOS_RCVR layer. Can choose between PWM, Spektrum and PPM
at board init time. PPM driver is broken, and SBUS will work once
it is added to this UAVObj as an option.
- CC build now includes code for SBUS, Spektrum and PWM receivers in
every firmware image.
PIOS_USART driver:
- Now handles its own low-level IRQs internally
- If NULL upper-level IRQ handler is bound in at board init time
then rx/tx is satisfied by internal PIOS_USART buffered IO routines
which are (typically) attached to the COM layer.
- If an alternate upper-level IRQ handler is bound in at board init
then that handler is called and expected to clear down the USART
IRQ sources. This is used by Spektrum and SBUS drivers.
PIOS_SBUS and PIOS_SPEKTRUM drivers:
- Improved data/API hiding
- No longer assume they know where their config data is stored which
allows for boot-time alternate configurations for the driver.
- Now registers an upper-level IRQ handlerwith the USART layer to
decouple the driver from which USART it is actually attached to.
2011-07-06 02:21:00 +02:00
|
|
|
//#define PIOS_INCLUDE_PPM
|
2011-02-13 18:43:44 +01:00
|
|
|
|
2010-03-11 13:38:51 +01:00
|
|
|
#define PIOS_INCLUDE_SERVO
|
|
|
|
#define PIOS_INCLUDE_SPI
|
|
|
|
#define PIOS_INCLUDE_SYS
|
|
|
|
#define PIOS_INCLUDE_USART
|
|
|
|
#define PIOS_INCLUDE_USB_HID
|
|
|
|
#define PIOS_INCLUDE_BMP085
|
2011-01-28 20:21:22 +01:00
|
|
|
//#define PIOS_INCLUDE_HCSR04
|
2010-05-24 18:33:36 +02:00
|
|
|
#define PIOS_INCLUDE_OPAHRS
|
2010-03-11 13:38:51 +01:00
|
|
|
#define PIOS_INCLUDE_COM
|
|
|
|
#define PIOS_INCLUDE_SDCARD
|
|
|
|
#define PIOS_INCLUDE_SETTINGS
|
2010-03-13 07:44:15 +01:00
|
|
|
#define PIOS_INCLUDE_FREERTOS
|
2010-03-14 13:00:43 +01:00
|
|
|
#define PIOS_INCLUDE_GPIO
|
2010-03-21 01:49:48 +01:00
|
|
|
#define PIOS_INCLUDE_EXTI
|
2011-03-03 05:28:38 +01:00
|
|
|
#define PIOS_INCLUDE_RTC
|
2011-01-10 01:16:30 +01:00
|
|
|
#define PIOS_INCLUDE_WDG
|
2011-01-10 02:11:44 +01:00
|
|
|
#define PIOS_INCLUDE_I2C_ESC
|
2011-04-23 19:40:41 +02:00
|
|
|
#define PIOS_INCLUDE_BL_HELPER
|
2009-12-02 06:33:29 +01:00
|
|
|
|
2009-12-23 05:03:21 +01:00
|
|
|
/* Defaults for Logging */
|
2010-01-25 17:30:31 +01:00
|
|
|
#define LOG_FILENAME "PIOS.LOG"
|
2010-01-24 09:13:48 +01:00
|
|
|
#define STARTUP_LOG_ENABLED 1
|
2009-12-23 05:03:21 +01:00
|
|
|
|
2011-02-05 11:52:52 +01:00
|
|
|
/* Enable a priority queue in telemetry */
|
|
|
|
#define PIOS_TELEM_PRIORITY_QUEUE
|
|
|
|
|
2009-12-21 04:57:30 +01:00
|
|
|
/* COM Module */
|
|
|
|
#define GPS_BAUDRATE 19200
|
|
|
|
#define TELEM_BAUDRATE 19200
|
|
|
|
#define AUXUART_ENABLED 0
|
|
|
|
#define AUXUART_BAUDRATE 19200
|
|
|
|
|
2011-02-26 12:46:39 +01:00
|
|
|
/* Alarm Thresholds */
|
|
|
|
#define HEAP_LIMIT_WARNING 4000
|
|
|
|
#define HEAP_LIMIT_CRITICAL 1000
|
2011-06-14 02:10:14 +02:00
|
|
|
#define IRQSTACK_LIMIT_WARNING 150
|
|
|
|
#define IRQSTACK_LIMIT_CRITICAL 80
|
2011-02-26 12:46:39 +01:00
|
|
|
#define CPULOAD_LIMIT_WARNING 80
|
|
|
|
#define CPULOAD_LIMIT_CRITICAL 95
|
|
|
|
|
2011-03-02 02:25:34 +01:00
|
|
|
/* Stabilization options */
|
|
|
|
#define PIOS_QUATERNION_STABILIZATION
|
|
|
|
|
2011-04-23 16:49:07 +02:00
|
|
|
/* GPS options */
|
|
|
|
#define PIOS_GPS_SETS_HOMELOCATION
|
|
|
|
|
2011-03-02 02:25:34 +01:00
|
|
|
|
2009-12-02 06:33:29 +01:00
|
|
|
#endif /* PIOS_CONFIG_H */
|
2010-07-28 09:28:21 +02:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
* @}
|
2011-01-10 01:16:30 +01:00
|
|
|
*/
|