/* This function returns the QH associated with particular endpoint and it's direction.  */
static struct ept_queue_item* ci_get_qtd(int ep_num, int dir_in)
/* This function returns the QH associated with particular endpoint and it's direction.  */
static struct ept_queue_item* ci_get_qtd(int ep_num, int dir_in)
{
	int index = (ep_num * 2) + dir_in;
	uint8_t *imem = controller.items_mem + (index * ILIST_ENT_SZ);
	return (struct ept_queue_item *)imem;
}