|
// Start USB for 5V operation and wait till enumeration is completeUSBFS_Start(0, USB_5V_OPERATION);while(!USBFS_bGetConfiguration());// Load the IN endpoint with data with no toggleUSBFS_LoadInEP(1, Data, 8, USB_NO_TOGGLE);while(1)Above code shows the general program flow when using an USBFS user module to send data to the PC using an IN Endpoint. If you notice, the USBFS_LoadInEP function call before the while loop uses “USB_NO_TOGGLE” and the call inside the while loop uses “USB_TOGGLE”. What is this TOGGLE and NO_TOGGLE? What is the significance of these constants? I can understand from the above code that the first time I call the USBFS_LoadInEP function, I have to use NO_TOGGLE option and TOGGLE for further transactions. Why is it so? These are some of the questions a first time user of USB faces.
|