Skip to content

Commit

Permalink
[airborne] cleanup USE_USB_SERIAL
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Dec 6, 2014
1 parent 45c6b9c commit e6040cf
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 22 deletions.
1 change: 0 additions & 1 deletion conf/firmwares/setup.makefile
Expand Up @@ -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

2 changes: 1 addition & 1 deletion sw/airborne/arch/lpc21/usb_msc_hw.c
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions sw/airborne/arch/lpc21/usb_ser_hw.c
Expand Up @@ -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
Expand Down Expand Up @@ -243,8 +243,6 @@ static const uint8_t abDescriptors[] = {
};


#ifdef USE_USB_SERIAL

void fifo_init(fifo_t *fifo, U8 *buf)
{
fifo->head = 0;
Expand Down Expand Up @@ -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 */
2 changes: 0 additions & 2 deletions sw/airborne/arch/lpc21/usb_tunnel.c
Expand Up @@ -55,9 +55,7 @@ int main( void ) {
led_init();
VCOM_allow_linecoding(1);

#ifdef USE_USB_SERIAL
VCOM_init();
#endif

mcu_int_enable();

Expand Down
4 changes: 2 additions & 2 deletions sw/airborne/firmwares/rotorcraft/main.c
Expand Up @@ -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

Expand Down Expand Up @@ -287,7 +287,7 @@ STATIC_INLINE void main_event( void ) {
udp_event();
#endif

#ifdef USE_USB_SERIAL
#if USE_USB_SERIAL
VCOM_event();
#endif

Expand Down
4 changes: 2 additions & 2 deletions sw/airborne/mcu.c
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions sw/airborne/modules/core/sys_mon.c
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions sw/airborne/modules/gsm/gsm.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/subsystems/datalink/downlink.h
Expand Up @@ -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
Expand Down

0 comments on commit e6040cf

Please sign in to comment.