3.1 USB Stack Handling
When all initialization steps are done, the USB_Start()
function starts
the USB stack’s routine. This function handles the start-up of the USB configuration and
seamlessly attaches the selected USB mode onto the Bus.
If no interrupts are enabled, it is also necessary to run USB_Handle()
regularly to handle USB events, ensuring a smooth and uninterrupted operation of the USB
processes.
Following this initialization stage, it is possible to set up any required USB
interrupts. Check the USB section in the device’s data sheet to get an overview
of which USB Interrupt registers and bit-mask might be necessary. In this case, there is
no need to call USB_Handle()
regularly, instead the Transaction
Complete Interrupt Service Routine (ISR) must call the
USB_TransferHandler()
function and the Bus Event ISR must call the
USB_EventHandler()
function. When using MCC this is generated
automatically.