Skip to content
Snippets Groups Projects
Commit d7f4981b authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added a tx_complete function.

parent 49cda61c
No related branches found
No related tags found
No related merge requests found
...@@ -157,6 +157,7 @@ static int8_t usb_cdc_receive(uint8_t* Buf, uint32_t *Len) ...@@ -157,6 +157,7 @@ static int8_t usb_cdc_receive(uint8_t* Buf, uint32_t *Len)
comm_do_dma_receive(usb_comm_dev); comm_do_dma_receive(usb_comm_dev);
} }
} }
USBD_CDC_SetRxBuffer(&USBHandle, &Buf[0]);
USBD_CDC_ReceivePacket(&USBHandle); USBD_CDC_ReceivePacket(&USBHandle);
HAL_GPIO_WritePin(GPIOD,GPIO_PIN_14,GPIO_PIN_RESET); HAL_GPIO_WritePin(GPIOD,GPIO_PIN_14,GPIO_PIN_RESET);
...@@ -164,12 +165,18 @@ static int8_t usb_cdc_receive(uint8_t* Buf, uint32_t *Len) ...@@ -164,12 +165,18 @@ static int8_t usb_cdc_receive(uint8_t* Buf, uint32_t *Len)
/* USER CODE END 6 */ /* USER CODE END 6 */
} }
static int8_t usb_cdc_tx_complete(uint8_t *pbuf, uint32_t *Len, uint8_t epnum)
{
return (USBD_OK);
}
USBD_CDC_ItfTypeDef usb_cdc_ops = USBD_CDC_ItfTypeDef usb_cdc_ops =
{ {
usb_cdc_init, usb_cdc_init,
usb_cdc_deinit, usb_cdc_deinit,
usb_cdc_control, usb_cdc_control,
usb_cdc_receive usb_cdc_receive,
usb_cdc_tx_complete
}; };
// interrupt handlers // interrupt handlers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment