Browse Source

mark external and define in proper header to fix compilation...

main
John-Mark Gurney 1 year ago
parent
commit
2751a5ac1b
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      stm32/usb/usb_device.c
  2. +1
    -1
      stm32/usb/usbd_cdc_if.h

+ 2
- 0
stm32/usb/usb_device.c View File

@@ -34,6 +34,8 @@
/* USER CODE BEGIN PV */ /* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/


FILE *vcp_usb;

/* USER CODE END PV */ /* USER CODE END PV */


/* USER CODE BEGIN PFP */ /* USER CODE BEGIN PFP */


+ 1
- 1
stm32/usb/usbd_cdc_if.h View File

@@ -116,7 +116,7 @@ extern uint16_t CDC_RX_LEN;
uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len); uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len);


/* USER CODE BEGIN EXPORTED_FUNCTIONS */ /* USER CODE BEGIN EXPORTED_FUNCTIONS */
FILE *vcp_usb;
extern FILE *vcp_usb;
int usb_write(void *cookie, const char *buf, int len); int usb_write(void *cookie, const char *buf, int len);
#define usb_printf(...) fprintf(vcp_usb, __VA_ARGS__) #define usb_printf(...) fprintf(vcp_usb, __VA_ARGS__)
uint16_t vcp_status(void); uint16_t vcp_status(void);


Loading…
Cancel
Save