platform: Removed usbuart_debug_write() from the headers and fixed its return type

This commit is contained in:
dragonmux 2022-08-17 11:46:41 +01:00 committed by Piotr Esden-Tempski
parent 999ac27172
commit 99e894cd0f
6 changed files with 1 additions and 6 deletions

View File

@ -145,7 +145,6 @@
#ifdef ENABLE_DEBUG
extern bool debug_bmp;
int usbuart_debug_write(const char *buf, size_t len);
# define DEBUG printf
#else
# define DEBUG(...)

View File

@ -138,7 +138,6 @@
#ifdef ENABLE_DEBUG
extern bool debug_bmp;
int usbuart_debug_write(const char *buf, size_t len);
# define DEBUG printf
#else
# define DEBUG(...)

View File

@ -36,7 +36,6 @@
# define PLATFORM_HAS_DEBUG
# define USBUART_DEBUG
extern bool debug_bmp;
int usbuart_debug_write(const char *buf, size_t len);
#endif
#define PLATFORM_IDENT " "

View File

@ -36,7 +36,6 @@
# define PLATFORM_HAS_DEBUG
# define USBUART_DEBUG
extern bool debug_bmp;
int usbuart_debug_write(const char *buf, size_t len);
#endif
#define PLATFORM_HAS_USBUART

View File

@ -319,7 +319,7 @@ void usbuart_usb_out_cb(usbd_device *dev, uint8_t ep)
#endif
#ifdef USBUART_DEBUG
int usbuart_debug_write(const char *buf, size_t len)
size_t usbuart_debug_write(const char *buf, const size_t len)
{
if (nvic_get_active_irq(USB_IRQ) || nvic_get_active_irq(USBUSART_IRQ) || nvic_get_active_irq(USBUSART_DMA_RX_IRQ))
return 0;

View File

@ -33,7 +33,6 @@
# define PLATFORM_HAS_DEBUG
# define USBUART_DEBUG
extern bool debug_bmp;
int usbuart_debug_write(const char *buf, size_t len);
#endif
#define PLATFORM_HAS_USBUART