cdcacm: Made gdb_uart_dtr a bool, saving space and memory

This commit is contained in:
dragonmux 2022-08-10 09:51:47 +01:00 committed by Piotr Esden-Tempski
parent 109f661e31
commit 49d21b0f44
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -28,12 +28,13 @@
#ifndef __CDCACM_H
#define __CDCACM_H
#include <stdbool.h>
#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