From 6b75581d9ab02ba309b0409eedf32687a6389a3e Mon Sep 17 00:00:00 2001 From: Kurt Kiefer Date: Sat, 10 Dec 2016 13:23:55 -0800 Subject: [PATCH] Update ifdef USART_DEBUG macros to support semihosting as well --- .../ST/STM32_USB_Device_Library/Class/video/Src/usbd_uvc.c | 2 +- Middlewares/lepton_sdk/Src/stm32_i2c.c | 2 +- Src/button_task.c | 2 +- Src/lepton.c | 2 +- Src/lepton_i2c.c | 2 +- Src/lepton_task.c | 2 +- Src/tmp007_i2c.c | 2 +- Src/uart_task.c | 2 +- Src/usb_task.c | 2 +- Src/usbd_uvc_if.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Middlewares/ST/STM32_USB_Device_Library/Class/video/Src/usbd_uvc.c b/Middlewares/ST/STM32_USB_Device_Library/Class/video/Src/usbd_uvc.c index 9fc9ad9..fd1d081 100644 --- a/Middlewares/ST/STM32_USB_Device_Library/Class/video/Src/usbd_uvc.c +++ b/Middlewares/ST/STM32_USB_Device_Library/Class/video/Src/usbd_uvc.c @@ -64,7 +64,7 @@ #include "usbd_ctlreq.h" #include "usbd_types.h" -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Middlewares/lepton_sdk/Src/stm32_i2c.c b/Middlewares/lepton_sdk/Src/stm32_i2c.c index fa86684..1dd9147 100644 --- a/Middlewares/lepton_sdk/Src/stm32_i2c.c +++ b/Middlewares/lepton_sdk/Src/stm32_i2c.c @@ -65,7 +65,7 @@ #define MAX_TXRX_SIZE_BYTES (1024) #define COMM_TIMEOUT_MS (500) -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Src/button_task.c b/Src/button_task.c index fc49290..c6053d1 100644 --- a/Src/button_task.c +++ b/Src/button_task.c @@ -16,7 +16,7 @@ #include "project_config.h" -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Src/lepton.c b/Src/lepton.c index b6b01a9..b6f57c9 100644 --- a/Src/lepton.c +++ b/Src/lepton.c @@ -7,7 +7,7 @@ #include "project_config.h" -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Src/lepton_i2c.c b/Src/lepton_i2c.c index 1483b3f..a4bdffa 100644 --- a/Src/lepton_i2c.c +++ b/Src/lepton_i2c.c @@ -12,7 +12,7 @@ #include "LEPTON_OEM.h" #include "LEPTON_RAD.h" -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Src/lepton_task.c b/Src/lepton_task.c index 5f84dab..6b57ad5 100644 --- a/Src/lepton_task.c +++ b/Src/lepton_task.c @@ -29,7 +29,7 @@ struct rgb_to_yuv_state { yuv422_buffer_t *restrict buffer; }; -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Src/tmp007_i2c.c b/Src/tmp007_i2c.c index 4f3f73a..4872856 100644 --- a/Src/tmp007_i2c.c +++ b/Src/tmp007_i2c.c @@ -8,7 +8,7 @@ #include "project_config.h" -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Src/uart_task.c b/Src/uart_task.c index 1491fc1..375707d 100644 --- a/Src/uart_task.c +++ b/Src/uart_task.c @@ -20,7 +20,7 @@ uint8_t lepton_raw[60*80*2]; extern volatile int restart_frame; -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Src/usb_task.c b/Src/usb_task.c index 44163dc..9b5c18b 100644 --- a/Src/usb_task.c +++ b/Src/usb_task.c @@ -34,7 +34,7 @@ static yuv422_buffer_t *last_buffer; static lepton_buffer *last_buffer_rgb; #endif -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...) diff --git a/Src/usbd_uvc_if.c b/Src/usbd_uvc_if.c index d16f8d0..aa9cc69 100644 --- a/Src/usbd_uvc_if.c +++ b/Src/usbd_uvc_if.c @@ -34,7 +34,7 @@ #include "usbd_uvc_if.h" #include "usbd_uvc_lepton_xu.h" -#ifdef USART_DEBUG +#if defined(USART_DEBUG) || defined(GDB_SEMIHOSTING) #define DEBUG_PRINTF(...) printf( __VA_ARGS__); #else #define DEBUG_PRINTF(...)