-
1. Re: USB interrupt
udayan.umapathi Feb 18, 2011 12:54 AM (in response to john.neilson)Hi,
It's a very valid question that you have asked. The USB Example projects on the web are projects dedicated to demonstarte the USB capability. Hence there is a while loop which is not exited untill USB enumeration is complete.
Once your USB device(any USB chip, here it is PSoC) is inserted, the host(PC or similar device) assigns a configuration to the USB device. The API USBFS_bGetConfiguration ( ), checks if a valid configuration has been assigned. Hence as you pointed out, PSoC device will stay in the while loop, while( ! USBFS_bGetConfiguration ( ) ), untill PSoC device enumerates as a USB device and gets a valid device configuration.
However in general application this is not necessary, you can develop your custom project code and add a condition that checks to see if a valid configuration has been assigned "if( USBFS_bGetConfiguration ( ) )". You can set a flag once the USB device has got valid configuration an then start all your USB transactions.
Feel free to ask any questions. Everybody has to go through the learning curve, we are there to help you !
-Udayan