2011-06-25 15:27:28 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
* @addtogroup OpenPilotSystem OpenPilot System
|
|
|
|
* @{
|
|
|
|
* @addtogroup OpenPilotCore OpenPilot Core
|
|
|
|
* @{
|
|
|
|
*
|
2011-07-12 19:34:40 +02:00
|
|
|
* @file pios_config.h
|
2011-06-25 15:27:28 +02:00
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
2011-07-12 19:34:40 +02:00
|
|
|
* @brief PiOS configuration header.
|
2011-06-25 15:27:28 +02:00
|
|
|
* Central compile time config for the project.
|
|
|
|
* In particular, pios_config.h is where you define which PiOS libraries
|
|
|
|
* and features are included in the firmware.
|
|
|
|
* @see The GNU Public License (GPL) Version 3
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
2011-07-12 19:34:40 +02:00
|
|
|
/*
|
|
|
|
* 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
|
2011-06-25 15:27:28 +02:00
|
|
|
* (at your option) any later version.
|
2011-07-12 19:34:40 +02:00
|
|
|
*
|
|
|
|
* 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
|
2011-06-25 15:27:28 +02:00
|
|
|
* for more details.
|
2011-07-12 19:34:40 +02:00
|
|
|
*
|
|
|
|
* 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.,
|
2011-06-25 15:27:28 +02:00
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PIOS_CONFIG_H
|
|
|
|
#define PIOS_CONFIG_H
|
|
|
|
|
|
|
|
/* Enable/Disable PiOS Modules */
|
2012-05-01 07:30:41 +02:00
|
|
|
#define PIOS_INCLUDE_ADC
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_INCLUDE_DELAY
|
2012-01-24 17:32:42 +01:00
|
|
|
//#if defined(USE_I2C)
|
|
|
|
//#define PIOS_INCLUDE_I2C
|
|
|
|
//#define PIOS_INCLUDE_I2C_ESC
|
|
|
|
//#endif
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_INCLUDE_IRQ
|
|
|
|
#define PIOS_INCLUDE_LED
|
2012-01-15 23:56:42 +01:00
|
|
|
#define PIOS_INCLUDE_IAP
|
2012-01-23 01:41:41 +01:00
|
|
|
#define PIOS_INCLUDE_TIM
|
2011-06-25 15:27:28 +02:00
|
|
|
|
|
|
|
#define PIOS_INCLUDE_RCVR
|
|
|
|
|
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
|
|
|
/* Supported receiver interfaces */
|
2011-11-04 20:40:34 +01:00
|
|
|
#define PIOS_INCLUDE_DSM
|
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-08-13 05:23:16 +02:00
|
|
|
#define PIOS_INCLUDE_PPM
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_INCLUDE_PWM
|
2011-07-28 14:22:47 +02:00
|
|
|
#define PIOS_INCLUDE_GCSRCVR
|
2011-06-25 15:27:28 +02:00
|
|
|
|
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
|
|
|
/* Supported USART-based PIOS modules */
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_INCLUDE_TELEMETRY_RF
|
2011-08-20 01:25:49 +02:00
|
|
|
#define PIOS_INCLUDE_GPS
|
2011-08-25 15:44:49 +02:00
|
|
|
#define PIOS_GPS_MINIMAL
|
2012-06-28 09:02:14 +02:00
|
|
|
#define PIOS_INCLUDE_GPS_NMEA_PARSER /* Include the NMEA protocol parser */
|
|
|
|
#define PIOS_INCLUDE_GPS_UBX_PARSER /* Include the UBX protocol parser */
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_INCLUDE_SERVO
|
|
|
|
#define PIOS_INCLUDE_SPI
|
|
|
|
#define PIOS_INCLUDE_SYS
|
|
|
|
#define PIOS_INCLUDE_USART
|
2012-01-02 20:03:15 +01:00
|
|
|
#define PIOS_INCLUDE_USB
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_INCLUDE_USB_HID
|
2012-08-06 03:45:27 +02:00
|
|
|
#define PIOS_INCLUDE_USB_RCTX
|
2012-01-02 20:03:15 +01:00
|
|
|
#define PIOS_INCLUDE_USB_CDC
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_INCLUDE_COM
|
|
|
|
#define PIOS_INCLUDE_SETTINGS
|
|
|
|
#define PIOS_INCLUDE_FREERTOS
|
|
|
|
#define PIOS_INCLUDE_GPIO
|
|
|
|
#define PIOS_INCLUDE_EXTI
|
|
|
|
#define PIOS_INCLUDE_RTC
|
|
|
|
#define PIOS_INCLUDE_WDG
|
|
|
|
#define PIOS_INCLUDE_BL_HELPER
|
|
|
|
|
|
|
|
#define PIOS_INCLUDE_ADXL345
|
2012-01-24 17:32:42 +01:00
|
|
|
#define PIOS_INCLUDE_FLASH
|
2012-03-26 07:22:59 +02:00
|
|
|
#define PIOS_INCLUDE_MPU6000
|
|
|
|
#define PIOS_MPU6000_ACCEL
|
2012-01-14 21:17:24 +01:00
|
|
|
|
2011-06-25 15:27:28 +02:00
|
|
|
/* A really shitty setting saving implementation */
|
|
|
|
#define PIOS_INCLUDE_FLASH_SECTOR_SETTINGS
|
|
|
|
|
|
|
|
/* Alarm Thresholds */
|
|
|
|
#define HEAP_LIMIT_WARNING 220
|
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 HEAP_LIMIT_CRITICAL 40
|
2011-07-08 15:29:34 +02:00
|
|
|
#define IRQSTACK_LIMIT_WARNING 100
|
2011-06-22 15:32:27 +02:00
|
|
|
#define IRQSTACK_LIMIT_CRITICAL 60
|
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 CPULOAD_LIMIT_WARNING 85
|
2011-06-25 15:27:28 +02:00
|
|
|
#define CPULOAD_LIMIT_CRITICAL 95
|
|
|
|
|
|
|
|
/* Task stack sizes */
|
|
|
|
#define PIOS_ACTUATOR_STACK_SIZE 1020
|
2012-08-03 16:36:59 +02:00
|
|
|
#define PIOS_MANUAL_STACK_SIZE 800
|
2012-07-28 00:43:47 +02:00
|
|
|
#define PIOS_SYSTEM_STACK_SIZE 660
|
2011-06-25 15:27:28 +02:00
|
|
|
#define PIOS_STABILIZATION_STACK_SIZE 524
|
|
|
|
#define PIOS_TELEM_STACK_SIZE 500
|
2011-08-14 02:21:30 +02:00
|
|
|
#define PIOS_EVENTDISPATCHER_STACK_SIZE 130
|
2011-06-25 15:27:28 +02:00
|
|
|
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 1995998
|
|
|
|
//#define PIOS_QUATERNION_STABILIZATION
|
|
|
|
|
2011-08-14 02:21:30 +02:00
|
|
|
// This can't be too high to stop eventdispatcher thread overflowing
|
|
|
|
#define PIOS_EVENTDISAPTCHER_QUEUE 10
|
|
|
|
|
2011-09-28 21:57:18 +02:00
|
|
|
/* PIOS Initcall infrastructure */
|
|
|
|
#define PIOS_INCLUDE_INITCALL
|
|
|
|
|
2011-06-25 15:27:28 +02:00
|
|
|
#endif /* PIOS_CONFIG_H */
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
* @}
|
|
|
|
*/
|