1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

usart: move default port numbers from pios_config.h to pios_board.c

This commit is contained in:
Oleg Semyonov 2011-06-22 01:32:18 +03:00
parent d372c615ed
commit fba201c8b3
2 changed files with 32 additions and 32 deletions

View File

@ -43,38 +43,6 @@
#define PIOS_INCLUDE_IRQ
#define PIOS_INCLUDE_LED
/*
* Serial port configuration.
* TODO: This should be dynamic in the future.
* But for now define any compatile combination of:
* USE_I2C (shared with USART3)
* USE_TELEMETRY
* USE_GPS
* USE_SPEKTRUM
* USE_SBUS (USART1 only, it needs an invertor)
* and optionally define PIOS_PORT_* to USART port numbers
*/
/* Serial telemetry: USART1 or USART3 */
#if !defined(PIOS_PORT_TELEMETRY)
#define PIOS_PORT_TELEMETRY 1
#endif
/* GPS receiver: USART1 or USART3 */
#if !defined(PIOS_PORT_GPS)
#define PIOS_PORT_GPS 3
#endif
/* Spektrum satellite receiver: USART1 or USART3 */
#if !defined(PIOS_PORT_SPEKTRUM)
#define PIOS_PORT_SPEKTRUM 3
#endif
/* Futaba S.Bus receiver: USART1 only (needs invertor) */
#if !defined(PIOS_PORT_SBUS)
#define PIOS_PORT_SBUS 1
#endif
/* Receiver interfaces - only one allowed */
#if !defined(USE_SPEKTRUM) && !defined(USE_SBUS)
//#define PIOS_INCLUDE_PPM

View File

@ -199,6 +199,38 @@ void PIOS_ADC_handler() {
#include "pios_usart_priv.h"
/*
* Serial port configuration.
* TODO: This should be dynamic in the future.
* But for now define any compatile combination of:
* USE_I2C (shared with USART3)
* USE_TELEMETRY
* USE_GPS
* USE_SPEKTRUM
* USE_SBUS (USART1 only, it needs an invertor)
* and optionally define PIOS_PORT_* to USART port numbers
*/
/* Serial telemetry: USART1 or USART3 */
#if !defined(PIOS_PORT_TELEMETRY)
#define PIOS_PORT_TELEMETRY 1
#endif
/* GPS receiver: USART1 or USART3 */
#if !defined(PIOS_PORT_GPS)
#define PIOS_PORT_GPS 3
#endif
/* Spektrum satellite receiver: USART1 or USART3 */
#if !defined(PIOS_PORT_SPEKTRUM)
#define PIOS_PORT_SPEKTRUM 3
#endif
/* Futaba S.Bus receiver: USART1 only (needs invertor) */
#if !defined(PIOS_PORT_SBUS)
#define PIOS_PORT_SBUS 1
#endif
/*
* Define USART port configurations and check for conflicts
* making sure they do not conflict with each other and with I2C.