/* This function returns the BD element index based on endpoint address and the odd bit.  */
static uint8_t get_bdt_idx(uint8_t ep, uint8_t odd)
/* This function returns the BD element index based on endpoint address and the odd bit.  */
static uint8_t get_bdt_idx(uint8_t ep, uint8_t odd)
{
	if (ep & USB_EP_DIR_IN) {
		return ((((KINETIS_ADDR2IDX(ep)) * 4) + 2  + (odd & 1)));
	}
	return ((((KINETIS_ADDR2IDX(ep)) * 4) + (odd & 1)));
}