2 ******************************************************************************
4 * @author MCD Application Team
7 * @brief Header for usbd_cdc_vcp.c file.
8 ******************************************************************************
11 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
19 ******************************************************************************
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef __USBD_CDC_VCP_H
24 #define __USBD_CDC_VCP_H
26 /* Includes ------------------------------------------------------------------*/
27 #include "stm32f4xx_conf.h"
29 #include "usbd_cdc_core.h"
30 #include "usbd_conf.h"
33 #include "usbd_core.h"
35 #include "usbd_desc.h"
37 extern USB_OTG_CORE_HANDLE USB_OTG_dev
;
39 uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer
, uint32_t sendLength
);
40 uint32_t CDC_Send_FreeBytes(void);
41 uint32_t CDC_Receive_DATA(uint8_t* recvBuf
, uint32_t len
); // HJI
42 uint32_t CDC_Receive_BytesAvailable(void);
44 uint8_t usbIsConfigured(void); // HJI
45 uint8_t usbIsConnected(void); // HJI
46 uint32_t CDC_BaudRate(void);
47 void CDC_SetCtrlLineStateCb(void (*cb
)(void *context
, uint16_t ctrlLineState
), void *context
);
48 void CDC_SetBaudRateCb(void (*cb
)(void *context
, uint32_t baud
), void *context
);
50 /* External variables --------------------------------------------------------*/
51 extern __IO
uint32_t bDeviceState
; /* USB device status */
53 typedef enum _DEVICE_STATE
{
62 /* Exported typef ------------------------------------------------------------*/
63 /* The following structures groups all needed parameters to be configured for the
64 ComPort. These parameters can modified on the fly by the host through CDC class
65 command class requests. */
66 typedef struct __attribute__ ((packed
))
75 #endif /* __USBD_CDC_VCP_H */