May 2020
Intermediate to advanced
496 pages
13h 54m
English
usbTask is a private function that takes care of the initial setup of our CDC overrides. It also monitors the stream buffer and task notifications, making the required calls to the CDC implementation provided by STM.
Before starting its main loop, there are a few items that need to be initialized:
USBD_CDC_HandleTypeDef *hcdc = NULL; while(hcdc == NULL) { hcdc = (USBD_CDC_HandleTypeDef*)hUsbDeviceFS.pClassData; vTaskDelay(10); }