while (!(Pipe_IsReadWriteAllowed()))\r
        {\r
                /* Check to see if a new frame has been issued (1ms elapsed) */\r
-               if (FrameElapsed)\r
+               if (USB_INT_HasOccurred(USB_INT_HSOFI))\r
                {\r
                        /* Clear the flag and decrement the timeout period counter */\r
-                       FrameElapsed = false;\r
+                       USB_INT_Clear(USB_INT_HSOFI);\r
                        TimeoutMSRem--;\r
 \r
                        /* Check to see if the timeout period for the command has elapsed */\r