Lines Matching full:words
452 int words; in udc_stm32_mem_init() local
463 * Allocate a minimum of 0x40 words, which seems to work reliably. in udc_stm32_mem_init()
465 words = MAX(0x40, cfg->ep_mps / 4); in udc_stm32_mem_init()
466 HAL_PCDEx_SetRxFiFo(&priv->pcd, words); in udc_stm32_mem_init()
467 priv->occupied_mem = words * 4; in udc_stm32_mem_init()
485 unsigned int words; in udc_stm32_ep_mem_config() local
491 words = MIN(udc_mps_ep_size(ep), cfg->ep_mps) / 4; in udc_stm32_ep_mem_config()
492 words = (words <= 64) ? words * 2 : words; in udc_stm32_ep_mem_config()
495 if (priv->occupied_mem >= (words * 4)) { in udc_stm32_ep_mem_config()
496 priv->occupied_mem -= (words * 4); in udc_stm32_ep_mem_config()
502 if (cfg->dram_size - priv->occupied_mem < words * 4) { in udc_stm32_ep_mem_config()
507 HAL_PCDEx_SetTxFiFo(&priv->pcd, USB_EP_GET_IDX(ep->addr), words); in udc_stm32_ep_mem_config()
509 priv->occupied_mem += words * 4; in udc_stm32_ep_mem_config()