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