Lines Matching refs:ctrAddr
39 static cy_en_profile_status_t Cy_Profile_IsPtrValid(const cy_stc_profile_ctr_ptr_t ctrAddr);
61 static cy_en_profile_status_t Cy_Profile_IsPtrValid(const cy_stc_profile_ctr_ptr_t ctrAddr) in Cy_Profile_IsPtrValid() argument
67 …if ((p_epCtrs <= (uint32_t)ctrAddr) && ((uint32_t)ctrAddr < (p_epCtrs + (uint32_t)sizeof(cy_ep_ctr… in Cy_Profile_IsPtrValid()
69 if (ctrAddr->used != 0u) /* check for counter being used */ in Cy_Profile_IsPtrValid()
265 cy_en_profile_status_t Cy_Profile_FreeCounter(cy_stc_profile_ctr_ptr_t ctrAddr) in Cy_Profile_FreeCounter() argument
269 retStatus = Cy_Profile_IsPtrValid(ctrAddr); in Cy_Profile_FreeCounter()
272 ctrAddr->used = 0u; in Cy_Profile_FreeCounter()
297 cy_en_profile_status_t Cy_Profile_EnableCounter(cy_stc_profile_ctr_ptr_t ctrAddr) in Cy_Profile_EnableCounter() argument
299 cy_en_profile_status_t retStatus = Cy_Profile_IsPtrValid(ctrAddr); in Cy_Profile_EnableCounter()
304 ctrAddr->cntAddr->CTL |= _VAL2FLD(PROFILE_CNT_STRUCT_CTL_ENABLED, 1UL); in Cy_Profile_EnableCounter()
306 PROFILE_INTR_MASK |= (1UL << (ctrAddr->ctrNum)); in Cy_Profile_EnableCounter()
332 cy_en_profile_status_t Cy_Profile_DisableCounter(cy_stc_profile_ctr_ptr_t ctrAddr) in Cy_Profile_DisableCounter() argument
334 cy_en_profile_status_t retStatus = Cy_Profile_IsPtrValid(ctrAddr); in Cy_Profile_DisableCounter()
339 ctrAddr->cntAddr->CTL &= ~(_VAL2FLD(PROFILE_CNT_STRUCT_CTL_ENABLED, 1UL)); in Cy_Profile_DisableCounter()
341 PROFILE_INTR_MASK &= ~(1UL << (ctrAddr->ctrNum)); in Cy_Profile_DisableCounter()
369 cy_en_profile_status_t Cy_Profile_GetRawCount(cy_stc_profile_ctr_ptr_t ctrAddr, uint64_t *result) in Cy_Profile_GetRawCount() argument
371 cy_en_profile_status_t retStatus = Cy_Profile_IsPtrValid(ctrAddr); in Cy_Profile_GetRawCount()
376 ctrAddr->ctlReg = ctrAddr->cntAddr->CTL; in Cy_Profile_GetRawCount()
377 ctrAddr->cntReg = ctrAddr->cntAddr->CNT; in Cy_Profile_GetRawCount()
380 *result = ((uint64_t)(ctrAddr->overflow) << 32) | (uint64_t)(ctrAddr->cntReg); in Cy_Profile_GetRawCount()
405 cy_en_profile_status_t Cy_Profile_GetWeightedCount(cy_stc_profile_ctr_ptr_t ctrAddr, uint64_t *resu… in Cy_Profile_GetWeightedCount() argument
408 cy_en_profile_status_t retStatus = Cy_Profile_GetRawCount(ctrAddr, &temp); in Cy_Profile_GetWeightedCount()
413 *result = temp * (uint64_t)(ctrAddr->weight); in Cy_Profile_GetWeightedCount()