Browse Source

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

fix/newlib-file-io-hooks
dragonmux 2 years ago
parent
commit
cefae28c27
No known key found for this signature in database GPG Key ID: 64861EA89B35507A
  1. 1
      src/platforms/f072/platform.h
  2. 1
      src/platforms/f3/platform.h
  3. 1
      src/platforms/native/platform.h
  4. 1
      src/platforms/stlink/platform.h
  5. 2
      src/platforms/stm32/usbuart.c
  6. 1
      src/platforms/swlink/platform.h

1
src/platforms/f072/platform.h

@ -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(...)

1
src/platforms/f3/platform.h

@ -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(...)

1
src/platforms/native/platform.h

@ -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 " "

1
src/platforms/stlink/platform.h

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

2
src/platforms/stm32/usbuart.c

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

1
src/platforms/swlink/platform.h

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

Loading…
Cancel
Save