/* Sends the current status of an endpoints to the USB host.  */
static void GetEndpointStatus(unsigned char bEndpoint)
/* Sends the current status of an endpoints to the USB host.  */
static void GetEndpointStatus(unsigned char bEndpoint)
{
    static unsigned short data;
    data = 0;
    if (bEndpoint > CHIP_USB_NUMENDPOINTS) {
        USBD_Stall(0);
    }
    else {
        if (USBD_IsHalted(bEndpoint)) {
            data = 1;
        }
        USBD_Write(0, &data, 2, 0, 0);
    }
}