mainRawCDC.c contains a minimal amount of code to configure the MCU hardware and USB device stack. It will allow the MCU to enumerate over USB as a virtual COM port when a micro-USB cable is plugged into CN1 (and goes to a USB host such as a PC) and power is applied through CN13. It will attempt to send two messages over USB: test and message:
- The USB stack is initialized by using the MX_USB_Device_Init() function after the hardware is fully initialized:
int main(void){ HWInit();= MX_USB_DEVICE_Init();
- There is a single task that outputs two strings over USB, with a forced 100 tick delay after the second transmission using a naive call to usbd_cdc_if.c: CDC_Transmit_FS:
void usbPrintOutTask( void* NotUsed) ...