/* Convert endpoint 0 size to endpoint 0 MPS  */
static uint32_t ep0_mps(uint16_t size)
/* Convert endpoint 0 size to endpoint 0 MPS  */
static uint32_t ep0_mps(uint16_t size)
{
	if (size >= 64) {
		return DWC_OTG_DOEP0CTL_MPSIZ_64;
	} else if (size >= 32) {
		return DWC_OTG_DOEP0CTL_MPSIZ_32;
	} else if (size >= 16) {
		return DWC_OTG_DOEP0CTL_MPSIZ_16;
	} else {
		return DWC_OTG_DOEP0CTL_MPSIZ_8;
	}
}