Cookie Guest
|
USB interrupts |
Posted: Thu Mar 08, 2007 4:50 am |
|
|
Hello every one.
I have a simple question. I am working on a USB application with a 18F2455, i got everything right in my code. But there is something i would like to change . To get data from usb , in the main program , in the while(1 ) you check if you have data. Is there a way to use a n interrupt to avoid this test ?
Main
{
while ( true )
{
if (usb_kbhit(1))
{
usb_get_packet(1, in_data, 8);
}
}
}
i am asking this question because i have seen the Microchip datasheets that there is Interrupts dedicated to USB .
thank you. |
|