diff --git a/conf/boards/ardrone2_raw.makefile b/conf/boards/ardrone2_raw.makefile index 31f7789638..a747b653af 100644 --- a/conf/boards/ardrone2_raw.makefile +++ b/conf/boards/ardrone2_raw.makefile @@ -36,10 +36,6 @@ GPS_BAUD ?= B57600 # The datalink default uses UDP MODEM_HOST ?= 192.168.1.255 -# Here we define what the UART1_DEV device mapping -$(TARGET).CFLAGS += -DUART1_DEV=\"/dev/ttyUSB0\" -#$(TARGET).CFLAGS += -DUART0_DEV=\"/dev/ttyO3\" - # for distinction between RAW and SDK version $(TARGET).CFLAGS +=-DARDRONE2_RAW diff --git a/conf/boards/ardrone2_sdk.makefile b/conf/boards/ardrone2_sdk.makefile index f03a148f1b..27852f94e8 100644 --- a/conf/boards/ardrone2_sdk.makefile +++ b/conf/boards/ardrone2_sdk.makefile @@ -36,9 +36,6 @@ GPS_BAUD ?= B57600 # The datalink default uses UDP MODEM_HOST ?= 192.168.1.255 -# Here we define what the UART1_DEV device mapping -$(TARGET).CFLAGS += -DUART1_DEV=\"/dev/ttyUSB0\" - # for distinction between SDK and RAW version ap.CFLAGS +=-DARDRONE2_SDK diff --git a/conf/boards/beagle_bone_black.makefile b/conf/boards/beagle_bone_black.makefile index 351b637713..fa9571f335 100644 --- a/conf/boards/beagle_bone_black.makefile +++ b/conf/boards/beagle_bone_black.makefile @@ -26,7 +26,6 @@ MODEM_HOST ?= 192.168.1.255 # MODEM_PORT ?= UART4 MODEM_BAUD ?= B57600 -$(TARGET).CFLAGS += -DUART4_DEV=\"/dev/ttyO4\" # handle linux signals by hand (CTRL-C twice to stop) diff --git a/conf/boards/bebop.makefile b/conf/boards/bebop.makefile index 005c5f60eb..01790b2cdf 100644 --- a/conf/boards/bebop.makefile +++ b/conf/boards/bebop.makefile @@ -27,7 +27,6 @@ MODEM_HOST ?= 192.168.42.255 # The GPS sensor is connected internally GPS_PORT ?= UART1 GPS_BAUD ?= B230400 -$(TARGET).CFLAGS += -DUART1_DEV=\"/dev/ttyPA1\" # handle linux signals by hand $(TARGET).CFLAGS += -DUSE_LINUX_SIGNAL diff --git a/sw/airborne/arch/linux/mcu_periph/uart_arch.c b/sw/airborne/arch/linux/mcu_periph/uart_arch.c index afe3c5aef0..504006d387 100644 --- a/sw/airborne/arch/linux/mcu_periph/uart_arch.c +++ b/sw/airborne/arch/linux/mcu_periph/uart_arch.c @@ -23,6 +23,8 @@ * linux uart handling */ +#include BOARD_CONFIG + #include "mcu_periph/uart.h" #include diff --git a/sw/airborne/boards/ardrone2_raw.h b/sw/airborne/boards/ardrone2_raw.h index b60b41efc4..957e3d9c88 100644 --- a/sw/airborne/boards/ardrone2_raw.h +++ b/sw/airborne/boards/ardrone2_raw.h @@ -3,6 +3,8 @@ #define BOARD_ARDRONE2_RAW +#define UART1_DEV "/dev/ttyUSB0" + /* Default actuators driver */ #define DEFAULT_ACTUATORS "boards/ardrone/actuators_ardrone2_raw.h" #define ActuatorDefaultSet(_x,_y) ActuatorArdroneSet(_x,_y) diff --git a/sw/airborne/boards/ardrone2_sdk.h b/sw/airborne/boards/ardrone2_sdk.h index 923cc22037..12b7237ef5 100644 --- a/sw/airborne/boards/ardrone2_sdk.h +++ b/sw/airborne/boards/ardrone2_sdk.h @@ -3,6 +3,8 @@ #define BOARD_ARDRONE2_SDK +#define UART1_DEV "/dev/ttyUSB0" + /* Internal communication */ #define ARDRONE_NAVDATA_PORT 5554 #define ARDRONE_AT_PORT 5556 diff --git a/sw/airborne/boards/beagle_bone_black.h b/sw/airborne/boards/beagle_bone_black.h index 8a8f20617c..e39bc7d86b 100644 --- a/sw/airborne/boards/beagle_bone_black.h +++ b/sw/airborne/boards/beagle_bone_black.h @@ -1,6 +1,9 @@ #ifndef CONFIG_BEAGLE_BONE_BLACK #define CONFIG_BEAGLE_BONE_BLACK -// these are not the defines you are looking for... +#define UART1_DEV "/dev/ttyO1" +#define UART2_DEV "/dev/ttyO2" +#define UART4_DEV "/dev/ttyO4" + #endif /* CONFIG_BEAGLE_BONE_BLACK */ diff --git a/sw/airborne/boards/bebop.h b/sw/airborne/boards/bebop.h index c0d1135ce9..340585df4f 100644 --- a/sw/airborne/boards/bebop.h +++ b/sw/airborne/boards/bebop.h @@ -25,6 +25,9 @@ #define BOARD_BEBOP +/** uart connected to GPS internally */ +#define UART1_DEV "/dev/ttyPA1" + /* Default actuators driver */ #define DEFAULT_ACTUATORS "boards/bebop/actuators.h" #define ActuatorDefaultSet(_x,_y) ActuatorsBebopSet(_x,_y)