Skip to content

Commit

Permalink
Allow use of usb_serial_debug even if usb_serial is not used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-B committed Jan 30, 2023
1 parent 31a1465 commit d33579f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sw/airborne/arch/chibios/halconf.h
Expand Up @@ -173,7 +173,7 @@
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
#if USE_USB_SERIAL
#if USE_USB_SERIAL || USE_USB_SERIAL_DEBUG
#define HAL_USE_SERIAL_USB TRUE
#else
#define HAL_USE_SERIAL_USB FALSE
Expand Down
7 changes: 4 additions & 3 deletions sw/airborne/mcu.c
Expand Up @@ -54,7 +54,8 @@
#if USE_ADC
#include "mcu_periph/adc.h"
#endif
#if USE_USB_SERIAL
#if USE_USB_SERIAL || USE_USB_SERIAL_DEBUG
#define USING_USB_SERIAL 1
#include "mcu_periph/usb_serial.h"
#endif
#ifdef USE_UDP
Expand Down Expand Up @@ -197,7 +198,7 @@ void mcu_init(void)
#if USE_ADC
adc_init();
#endif
#if USE_USB_SERIAL
#if USING_USB_SERIAL
VCOM_init();
#endif

Expand Down Expand Up @@ -272,7 +273,7 @@ void mcu_event(void)
softi2c_event();
#endif

#if USE_USB_SERIAL
#if USING_USB_SERIAL
VCOM_event();
#endif
}

0 comments on commit d33579f

Please sign in to comment.