From 2751a5ac1b7034c2bb4c58631e010a02548aad0c Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Tue, 28 Mar 2023 15:10:33 -0700 Subject: [PATCH] mark external and define in proper header to fix compilation... --- stm32/usb/usb_device.c | 2 ++ stm32/usb/usbd_cdc_if.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stm32/usb/usb_device.c b/stm32/usb/usb_device.c index 6ba479d..d02af42 100755 --- a/stm32/usb/usb_device.c +++ b/stm32/usb/usb_device.c @@ -34,6 +34,8 @@ /* USER CODE BEGIN PV */ /* Private variables ---------------------------------------------------------*/ +FILE *vcp_usb; + /* USER CODE END PV */ /* USER CODE BEGIN PFP */ diff --git a/stm32/usb/usbd_cdc_if.h b/stm32/usb/usbd_cdc_if.h index b46f64e..9e14977 100755 --- a/stm32/usb/usbd_cdc_if.h +++ b/stm32/usb/usbd_cdc_if.h @@ -116,7 +116,7 @@ extern uint16_t CDC_RX_LEN; uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len); /* USER CODE BEGIN EXPORTED_FUNCTIONS */ -FILE *vcp_usb; +extern FILE *vcp_usb; int usb_write(void *cookie, const char *buf, int len); #define usb_printf(...) fprintf(vcp_usb, __VA_ARGS__) uint16_t vcp_status(void);