/* Returns the current Halt status of an endpoint.  */
unsigned char USBD_IsHalted(unsigned char bEndpoint)
/* Returns the current Halt status of an endpoint.  */
unsigned char USBD_IsHalted(unsigned char bEndpoint)
{
    Endpoint *pEndpoint = &(endpoints[bEndpoint]);
    unsigned char status = 0;
    if (pEndpoint->state == UDP_ENDPOINT_HALTED) {
        status = 1;
    }
    return( status );
}