Lines Matching refs:periph
34 static status_t FLEXCOMM_SetPeriph(FLEXCOMM_Type *base, FLEXCOMM_PERIPH_T periph, int lock);
37 static bool FLEXCOMM_PeripheralIsPresent(FLEXCOMM_Type *base, FLEXCOMM_PERIPH_T periph);
70 static bool FLEXCOMM_PeripheralIsPresent(FLEXCOMM_Type *base, FLEXCOMM_PERIPH_T periph) in FLEXCOMM_PeripheralIsPresent() argument
72 if (periph == FLEXCOMM_PERIPH_NONE) in FLEXCOMM_PeripheralIsPresent()
76 else if (periph <= FLEXCOMM_PERIPH_I2S_TX) in FLEXCOMM_PeripheralIsPresent()
78 return (base->PSELID & (1UL << ((uint32_t)periph + 3U))) > 0UL ? true : false; in FLEXCOMM_PeripheralIsPresent()
80 else if (periph == FLEXCOMM_PERIPH_I2S_RX) in FLEXCOMM_PeripheralIsPresent()
111 static status_t FLEXCOMM_SetPeriph(FLEXCOMM_Type *base, FLEXCOMM_PERIPH_T periph, int lock) in FLEXCOMM_SetPeriph() argument
114 if (!FLEXCOMM_PeripheralIsPresent(base, periph)) in FLEXCOMM_SetPeriph()
121 ((base->PSELID & FLEXCOMM_PSELID_PERSEL_MASK) != (uint32_t)periph)) in FLEXCOMM_SetPeriph()
129 base->PSELID = (uint32_t)periph | FLEXCOMM_PSELID_LOCK_MASK; in FLEXCOMM_SetPeriph()
133 base->PSELID = (uint32_t)periph; in FLEXCOMM_SetPeriph()
140 status_t FLEXCOMM_Init(void *base, FLEXCOMM_PERIPH_T periph) in FLEXCOMM_Init() argument
155 return FLEXCOMM_SetPeriph((FLEXCOMM_Type *)base, periph, 0); in FLEXCOMM_Init()