/* Get the number of host channels the periph support  */
static uint8_t get_chan_count(usbh_host *host)
/* Get the number of host channels the periph support  */
static uint8_t get_chan_count(usbh_host *host)
{
	uint8_t value = host->config->chan_count;
	if (!value) {
		value = DWC_OTG_GHWCFG2_NUMHSTCHNL_GET(REBASE(DWC_OTG_GHWCFG2));
	}
	if (value > host->backend->channels_count) {
		value = host->backend->channels_count;
	}
	return value;
}