From 49d21b0f44f0caf1fe10f0782388da914bd20a89 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 10 Aug 2022 09:51:47 +0100 Subject: [PATCH] cdcacm: Made gdb_uart_dtr a bool, saving space and memory --- src/platforms/common/cdcacm.c | 4 ++-- src/platforms/common/cdcacm.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/platforms/common/cdcacm.c b/src/platforms/common/cdcacm.c index ec052e6..69e59fa 100644 --- a/src/platforms/common/cdcacm.c +++ b/src/platforms/common/cdcacm.c @@ -50,7 +50,7 @@ static int configured; -static int gdb_uart_dtr = 1; +static bool gdb_uart_dtr = true; static void cdcacm_set_modem_state(usbd_device *dev, uint16_t iface, uint8_t ep); @@ -108,7 +108,7 @@ int cdcacm_get_config(void) return configured; } -int gdb_uart_get_dtr(void) +bool gdb_uart_get_dtr(void) { return gdb_uart_dtr; } diff --git a/src/platforms/common/cdcacm.h b/src/platforms/common/cdcacm.h index 9a2f571..5e84324 100644 --- a/src/platforms/common/cdcacm.h +++ b/src/platforms/common/cdcacm.h @@ -28,12 +28,13 @@ #ifndef __CDCACM_H #define __CDCACM_H +#include #include "usb.h" void cdcacm_set_config(usbd_device *dev, uint16_t wValue); /* Returns current usb configuration, or 0 if not configured. */ int cdcacm_get_config(void); -int gdb_uart_get_dtr(void); +bool gdb_uart_get_dtr(void); #endif