무늬만학생 2012. 9. 24. 14:26
반응형

while(TRUE)               // Main Loop

   {

      TD_Poll();


      if(GotSUD)

      {

         SetupCommand();         

         GotSUD = FALSE;          

      }


      if (Sleep)

      {

         if(TD_Suspend())

         { 

            Sleep = FALSE;    

 

            do

            {

               EZUSB_Susp();         

            }

            while(!Rwuen && EZUSB_EXTWAKEUP());

            // above.  Must continue to go back into suspend if the host has disabled remote wakeup

            // *and* the wakeup was caused by the external wakeup pin.


            EZUSB_Resume();   

            TD_Resume();

         }   

      }


   }// END OF  while(TRUE) 

반응형