/* Get the offset of DQH from the QH buffer base */
static unsigned int usbd_get_dqh(uint_8 controller_ID, unsigned char endpt_number, unsigned char direction)
/* Get the offset of DQH from the QH buffer base */
static unsigned int usbd_get_dqh(uint_8 controller_ID, unsigned char endpt_number, unsigned char direction)
{
    unsigned char *qh_buf = g_usbd_qh_bufs[controller_ID];
    return (unsigned int)(qh_buf + (SIZE_OF_QHD * (endpt_number * 2 + direction)));
}