22 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 23 #pragma data_alignment = 4 60 static uint16_t
VCP_Ctrl(uint32_t Cmd, uint8_t* Buf, uint32_t Len);
61 static uint16_t
VCP_DataTx(
const uint8_t* Buf, uint32_t Len);
62 static uint16_t
VCP_DataRx(uint8_t* Buf, uint32_t Len);
68 #pragma GCC diagnostic push 69 #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" 71 #pragma GCC diagnostic pop 102 plc2->bitrate = plc1->bitrate;
103 plc2->format = plc1->format;
104 plc2->paritytype = plc1->paritytype;
105 plc2->datatype = plc1->datatype;
116 static uint16_t
VCP_Ctrl(uint32_t Cmd, uint8_t* Buf, uint32_t Len)
138 if (plc && (Len ==
sizeof (*plc))) {
148 if (plc && (Len ==
sizeof (*plc))) {
156 if (plc && (Len ==
sizeof (uint16_t))) {
216 for (uint32_t
i = 0;
i < Len;
i++) {
274 for (uint32_t
i = 0;
i < Len;
i++) {
static uint32_t APP_Tx_ptr_out
CDC_IF_Prop_TypeDef VCP_fops
void CDC_SetBaudRateCb(void(*cb)(void *context, uint32_t baud), void *context)
uint32_t CDC_Send_FreeBytes(void)
#define GET_ENCAPSULATED_RESPONSE
void ust_cpy(LINE_CODING *plc2, const LINE_CODING *plc1)
static void * ctrlLineStateCbContext
static void * baudRateCbContext
void assert_param(int val)
static uint8_t APP_Tx_Buffer[APP_TX_DATA_SIZE]
static uint16_t VCP_DataRx(uint8_t *Buf, uint32_t Len)
VCP_DataRx Data received over USB OUT endpoint are sent over CDC interface through this function...
static uint16_t VCP_DeInit(void)
VCP_DeInit DeInitializes the Media on the STM32.
static void(* baudRateCb)(void *context, uint32_t baud)
static void(* ctrlLineStateCb)(void *context, uint16_t ctrlLineState)
#define SEND_ENCAPSULATED_COMMAND
void CDC_SetCtrlLineStateCb(void(*cb)(void *context, uint16_t ctrlLineState), void *context)
static uint16_t VCP_DataTx(const uint8_t *Buf, uint32_t Len)
VCP_DataTx CDC data to be sent to the Host (app) over USB.
uint8_t usbIsConnected(void)
uint32_t CDC_Receive_DATA(uint8_t *recvBuf, uint32_t len)
#define CLEAR_COMM_FEATURE
__IO uint32_t bDeviceState
uint32_t CDC_Receive_BytesAvailable(void)
uint32_t CDC_BaudRate(void)
Header for usbd_cdc_vcp.c file.
static uint16_t VCP_Ctrl(uint32_t Cmd, uint8_t *Buf, uint32_t Len)
VCP_Ctrl Manage the CDC class requests.
static uint16_t VCP_Init(void)
VCP_Init Initializes the Media on the STM32.
__IO uint8_t USB_Tx_State
#define SET_CONTROL_LINE_STATE
static uint32_t APP_Tx_ptr_in
uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength)
USB_OTG_CORE_HANDLE USB_OTG_dev
uint8_t usbIsConfigured(void)