/* Get the number of device endpoint the periph support (including ep0)  */
static uint8_t get_ep_count(usbd_device *dev)
/* Get the number of device endpoint the periph support (including ep0)  */
static uint8_t get_ep_count(usbd_device *dev)
{
	uint8_t value = dev->config->ep_count;
	if (!value) {
		value = DWC_OTG_GHWCFG2_NUMDEVEPS_GET(REBASE(DWC_OTG_GHWCFG2));
		value += 1;
	}
	return value;
}