Lines Matching refs:idx
503 uint8_t idx; in HAL_HCD_DeInit() local
517 for (idx = 0U; idx < hhcd->Init.Host_channels; idx++) in HAL_HCD_DeInit()
519 hhcd->phy_chin_state[idx] = 0U; in HAL_HCD_DeInit()
520 hhcd->phy_chout_state[idx] = 0U; in HAL_HCD_DeInit()
2291 uint8_t idx; in HAL_HCD_Check_usedChannel() local
2294 for (idx = 0U; idx < hhcd->Init.Host_channels; idx++) in HAL_HCD_Check_usedChannel()
2296 if ((((hhcd->phy_chin_state[idx] & 0xF0U) >> 4U) == ((uint16_t)ch_num + 1U)) && in HAL_HCD_Check_usedChannel()
2297 (hhcd->phy_chin_state[idx] != 0U)) in HAL_HCD_Check_usedChannel()
2299 return (1U | (idx << 4U)); in HAL_HCD_Check_usedChannel()
2302 if ((((hhcd->phy_chout_state[idx] & 0xF0U) >> 4U) == ((uint16_t)ch_num + 1U)) && in HAL_HCD_Check_usedChannel()
2303 (hhcd->phy_chout_state[idx] != 0U)) in HAL_HCD_Check_usedChannel()
2305 return (1U | (idx << 4U)); in HAL_HCD_Check_usedChannel()
2374 uint8_t idx; in HAL_HCD_Get_FreePhyChannel() local
2378 idx = 0U; in HAL_HCD_Get_FreePhyChannel()
2382 if (hhcd->phy_chin_state[idx] == 0U) in HAL_HCD_Get_FreePhyChannel()
2386 hhcd->phy_chin_state[idx] = (((uint16_t)ch_num + 1U) << 4U) | in HAL_HCD_Get_FreePhyChannel()
2391 if (hhcd->phy_chout_state[idx] == 0U) in HAL_HCD_Get_FreePhyChannel()
2395 hhcd->phy_chout_state[idx] = (((uint16_t)ch_num + 1U) << 4U) | in HAL_HCD_Get_FreePhyChannel()
2404 if (((hhcd->phy_chin_state[idx] & 0xF0U) >> 4U) != ((uint16_t)ch_num + 1U)) in HAL_HCD_Get_FreePhyChannel()
2408 hhcd->phy_chin_state[idx] = (((uint16_t)ch_num + 1U) << 4U) | in HAL_HCD_Get_FreePhyChannel()
2415 if (((hhcd->phy_chout_state[idx] & 0xF0U) >> 4U) != ((uint16_t)ch_num + 1U)) in HAL_HCD_Get_FreePhyChannel()
2419 hhcd->phy_chout_state[idx] = (((uint16_t)ch_num + 1U) << 4U) | in HAL_HCD_Get_FreePhyChannel()
2426 return idx; in HAL_HCD_Get_FreePhyChannel()
2432 for (idx = 1U; idx < hhcd->Init.Host_channels; idx++) in HAL_HCD_Get_FreePhyChannel()
2435 if ((hhcd->phy_chin_state[idx] == 0U) && in HAL_HCD_Get_FreePhyChannel()
2436 ((((hhcd->phy_chout_state[idx] & 0x000FU) == ((uint16_t)ep_type + 1U)) && in HAL_HCD_Get_FreePhyChannel()
2437 (((hhcd->phy_chout_state[idx] & 0x0F00U) == ((uint16_t)epnum & 0x0FU)))) || in HAL_HCD_Get_FreePhyChannel()
2438 (hhcd->phy_chout_state[idx] == 0U))) in HAL_HCD_Get_FreePhyChannel()
2442 hhcd->phy_chin_state[idx] = (((uint16_t)ch_num + 1U) << 4U) | in HAL_HCD_Get_FreePhyChannel()
2446 return idx; in HAL_HCD_Get_FreePhyChannel()
2453 for (idx = 1U; idx < hhcd->Init.Host_channels; idx++) in HAL_HCD_Get_FreePhyChannel()
2456 if ((hhcd->phy_chout_state[idx] == 0U) && in HAL_HCD_Get_FreePhyChannel()
2457 ((((hhcd->phy_chin_state[idx] & 0x0FU) == ((uint16_t)ep_type + 1U)) && in HAL_HCD_Get_FreePhyChannel()
2458 ((hhcd->phy_chin_state[idx] & 0x0F00U) == ((uint16_t)epnum & 0x0FU))) || in HAL_HCD_Get_FreePhyChannel()
2459 (hhcd->phy_chin_state[idx] == 0U))) in HAL_HCD_Get_FreePhyChannel()
2463 hhcd->phy_chout_state[idx] = (((uint16_t)ch_num + 1U) << 4U) | in HAL_HCD_Get_FreePhyChannel()
2467 return idx; in HAL_HCD_Get_FreePhyChannel()
2483 uint8_t idx; in HAL_HCD_ClearPhyChannel() local
2485 for (idx = 0U; idx < hhcd->Init.Host_channels; idx++) in HAL_HCD_ClearPhyChannel()
2488 hhcd->phy_chout_state[idx] = 0U; in HAL_HCD_ClearPhyChannel()
2489 hhcd->phy_chin_state[idx] = 0U; in HAL_HCD_ClearPhyChannel()