From e6040cf012c53adb0ddebcddded3ec59b724df9d Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Sat, 6 Dec 2014 16:09:13 +0100 Subject: [PATCH] [airborne] cleanup USE_USB_SERIAL --- conf/firmwares/setup.makefile | 1 - sw/airborne/arch/lpc21/usb_msc_hw.c | 2 +- sw/airborne/arch/lpc21/usb_ser_hw.c | 7 +------ sw/airborne/arch/lpc21/usb_tunnel.c | 2 -- sw/airborne/firmwares/rotorcraft/main.c | 4 ++-- sw/airborne/mcu.c | 4 ++-- sw/airborne/modules/core/sys_mon.c | 4 ---- sw/airborne/modules/gsm/gsm.c | 3 --- sw/airborne/subsystems/datalink/downlink.h | 2 +- 9 files changed, 7 insertions(+), 22 deletions(-) diff --git a/conf/firmwares/setup.makefile b/conf/firmwares/setup.makefile index 42845071908..978ea1d7a12 100644 --- a/conf/firmwares/setup.makefile +++ b/conf/firmwares/setup.makefile @@ -104,4 +104,3 @@ setup_actuators.CFLAGS += -I$(ARCH) setup_actuators.srcs += $(SRC_ARCH)/led_hw.c setup_actuators.srcs += $(SRC_ARCH)/mcu_periph/gpio_arch.c endif - diff --git a/sw/airborne/arch/lpc21/usb_msc_hw.c b/sw/airborne/arch/lpc21/usb_msc_hw.c index c0e67168d14..81649a2263a 100644 --- a/sw/airborne/arch/lpc21/usb_msc_hw.c +++ b/sw/airborne/arch/lpc21/usb_msc_hw.c @@ -69,7 +69,7 @@ #include "blockdev.h" #include "usb_msc_hw.h" -#ifdef USE_USB_SERIAL +#if USE_USB_SERIAL #if PCLK < 18000000 #error PCLK needs to be higher than 18MHz for USB to work properly #endif diff --git a/sw/airborne/arch/lpc21/usb_ser_hw.c b/sw/airborne/arch/lpc21/usb_ser_hw.c index d4f81b2c000..7c9da9d1d17 100644 --- a/sw/airborne/arch/lpc21/usb_ser_hw.c +++ b/sw/airborne/arch/lpc21/usb_ser_hw.c @@ -56,7 +56,7 @@ #include "lpcusb/usbapi.h" -#ifdef USE_USB_SERIAL +#if USE_USB_SERIAL #if PCLK < 18000000 #error PCLK needs to be higher than 18MHz for USB to work properly #endif @@ -243,8 +243,6 @@ static const uint8_t abDescriptors[] = { }; -#ifdef USE_USB_SERIAL - void fifo_init(fifo_t *fifo, U8 *buf) { fifo->head = 0; @@ -616,6 +614,3 @@ void VCOM_init(void) { usb_serial.device.transmit = (transmit_t) usb_serial_transmit; usb_serial.device.send_message = (send_message_t) usb_serial_send; } - - -#endif /* USE_USB_SERIAL */ diff --git a/sw/airborne/arch/lpc21/usb_tunnel.c b/sw/airborne/arch/lpc21/usb_tunnel.c index c87e331fdc2..cf689f6c71f 100644 --- a/sw/airborne/arch/lpc21/usb_tunnel.c +++ b/sw/airborne/arch/lpc21/usb_tunnel.c @@ -55,9 +55,7 @@ int main( void ) { led_init(); VCOM_allow_linecoding(1); -#ifdef USE_USB_SERIAL VCOM_init(); -#endif mcu_int_enable(); diff --git a/sw/airborne/firmwares/rotorcraft/main.c b/sw/airborne/firmwares/rotorcraft/main.c index 4cc18804155..6f807317f86 100644 --- a/sw/airborne/firmwares/rotorcraft/main.c +++ b/sw/airborne/firmwares/rotorcraft/main.c @@ -83,7 +83,7 @@ PRINT_CONFIG_MSG_VALUE("USE_BARO_BOARD is TRUE, reading onboard baro: ", BARO_BO #include "generated/modules.h" #include "subsystems/abi.h" -#ifdef USE_USB_SERIAL +#if USE_USB_SERIAL #include "mcu_periph/usb_serial.h" #endif @@ -287,7 +287,7 @@ STATIC_INLINE void main_event( void ) { udp_event(); #endif -#ifdef USE_USB_SERIAL +#if USE_USB_SERIAL VCOM_event(); #endif diff --git a/sw/airborne/mcu.c b/sw/airborne/mcu.c index ceff10a868d..ca87015b525 100644 --- a/sw/airborne/mcu.c +++ b/sw/airborne/mcu.c @@ -47,7 +47,7 @@ #if USE_ADC #include "mcu_periph/adc.h" #endif -#ifdef USE_USB_SERIAL +#if USE_USB_SERIAL #include "mcu_periph/usb_serial.h" #endif #ifdef USE_UDP @@ -110,7 +110,7 @@ void mcu_init(void) { #if USE_ADC adc_init(); #endif -#ifdef USE_USB_SERIAL +#if USE_USB_SERIAL VCOM_init(); #endif diff --git a/sw/airborne/modules/core/sys_mon.c b/sw/airborne/modules/core/sys_mon.c index d3e11d92cb6..1d9723a82c7 100644 --- a/sw/airborne/modules/core/sys_mon.c +++ b/sw/airborne/modules/core/sys_mon.c @@ -23,10 +23,6 @@ #include "core/sys_mon.h" #include "mcu_periph/sys_time.h" -#ifdef USE_USB_SERIAL -#include "mcu_periph/usb_serial.h" -#endif - /** Global system monitor data (averaged over 1 sec) */ struct SysMon sys_mon; diff --git a/sw/airborne/modules/gsm/gsm.c b/sw/airborne/modules/gsm/gsm.c index 14e8382b891..7eb1623b6c3 100644 --- a/sw/airborne/modules/gsm/gsm.c +++ b/sw/airborne/modules/gsm/gsm.c @@ -58,9 +58,6 @@ #include "gsm.h" #include "mcu_periph/uart.h" #include "std.h" -#ifdef USE_USB_SERIAL -#include "mcu_periph/usb_serial.h" -#endif #include "mcu_periph/uart.h" #include "subsystems/datalink/downlink.h" #include "ap_subsystems/datalink/downlink.h" diff --git a/sw/airborne/subsystems/datalink/downlink.h b/sw/airborne/subsystems/datalink/downlink.h index 4837c6b28a1..97a98d40965 100644 --- a/sw/airborne/subsystems/datalink/downlink.h +++ b/sw/airborne/subsystems/datalink/downlink.h @@ -59,7 +59,7 @@ #if USE_AUDIO_TELEMETRY #include "subsystems/datalink/audio_telemetry.h" #endif -#ifdef USE_USB_SERIAL +#if USE_USB_SERIAL #include "mcu_periph/usb_serial.h" #endif #ifdef USE_UDP