Lines Matching refs:chnlId
284 uint8_t chnlId; in TPM_SetupSinglePwmChannel() local
293 chnlId = (uint8_t)chnlParams.chnlNumber; in TPM_SetupSinglePwmChannel()
301 if ((chnlId >= (uint8_t)FSL_FEATURE_TPM_CHANNEL_COUNTn(base)) || in TPM_SetupSinglePwmChannel()
329 if ((chnlId >= ((uint8_t)FSL_FEATURE_TPM_CHANNEL_COUNTn(base) / 2U)) || in TPM_SetupSinglePwmChannel()
366 base->COMBINE |= 1UL << (TPM_COMBINE_SHIFT * chnlId); in TPM_SetupSinglePwmChannel()
368 chnlId *= 2U; in TPM_SetupSinglePwmChannel()
373 …~(((uint32_t)TPM_FILTER_CH0FVAL_MASK | TPM_FILTER_CH1FVAL_MASK) << (chnlId * TPM_FILTER_CH1FVAL_SH… in TPM_SetupSinglePwmChannel()
376 << (chnlId * TPM_FILTER_CH1FVAL_SHIFT); in TPM_SetupSinglePwmChannel()
380 TPM_DisableChannel(base, (tpm_chnl_t)chnlId); in TPM_SetupSinglePwmChannel()
383 TPM_EnableChannel(base, (tpm_chnl_t)chnlId, controlBits ^ TPM_CnSC_ELSA_MASK); in TPM_SetupSinglePwmChannel()
387 base->CONTROLS[chnlId].CnV = cnvFirstEdge; in TPM_SetupSinglePwmChannel()
392 } while (cnvFirstEdge != base->CONTROLS[chnlId].CnV); in TPM_SetupSinglePwmChannel()
394 chnlId += 1U; in TPM_SetupSinglePwmChannel()
396 TPM_DisableChannel(base, (tpm_chnl_t)chnlId); in TPM_SetupSinglePwmChannel()
406 TPM_EnableChannel(base, (tpm_chnl_t)chnlId, controlBits); in TPM_SetupSinglePwmChannel()
411 TPM_EnableChannel(base, (tpm_chnl_t)chnlId, controlBits ^ TPM_CnSC_ELSA_MASK); in TPM_SetupSinglePwmChannel()
417 base->CONTROLS[chnlId].CnV = cnvFirstEdge + cnv; in TPM_SetupSinglePwmChannel()
422 } while ((cnvFirstEdge + cnv) != base->CONTROLS[chnlId].CnV); in TPM_SetupSinglePwmChannel()
442 TPM_DisableChannel(base, (tpm_chnl_t)chnlId); in TPM_SetupSinglePwmChannel()
444 TPM_EnableChannel(base, (tpm_chnl_t)chnlId, controlBits); in TPM_SetupSinglePwmChannel()
447 base->CONTROLS[chnlId].CnV = cnv; in TPM_SetupSinglePwmChannel()
452 } while (cnv != base->CONTROLS[chnlId].CnV); in TPM_SetupSinglePwmChannel()
585 uint8_t chnlId = (uint8_t)chnlNumber; in TPM_UpdatePwmDutycycle() local
589 if ((chnlId >= (uint8_t)FSL_FEATURE_TPM_CHANNEL_COUNTn(base)) || in TPM_UpdatePwmDutycycle()
611 if ((chnlId >= ((uint8_t)FSL_FEATURE_TPM_CHANNEL_COUNTn(base) / 2U)) || in TPM_UpdatePwmDutycycle()
619 if ((base->CONTROLS[chnlId * 2U].CnV & counterMax) > mod) in TPM_UpdatePwmDutycycle()
625 cnvFirstEdge = base->CONTROLS[chnlId * 2U].CnV & counterMax; in TPM_UpdatePwmDutycycle()
653 base->CONTROLS[chnlId * 2U].CnV = cnvFirstEdge; in TPM_UpdatePwmDutycycle()
658 } while (cnvFirstEdge != base->CONTROLS[chnlId * 2U].CnV); in TPM_UpdatePwmDutycycle()
661 base->CONTROLS[(chnlId * 2U) + 1U].CnV = cnvFirstEdge + cnv; in TPM_UpdatePwmDutycycle()
662 } while ((cnvFirstEdge + cnv) != base->CONTROLS[(chnlId * 2U) + 1U].CnV); in TPM_UpdatePwmDutycycle()
683 base->CONTROLS[chnlId].CnV = cnv; in TPM_UpdatePwmDutycycle()
688 } while (cnv != base->CONTROLS[chnlId].CnV); in TPM_UpdatePwmDutycycle()
842 uint8_t chnlId = (uint8_t)chnlPairNumber * 2U; in TPM_SetupDualEdgeCapture() local
849 if (chnlId == 0u) in TPM_SetupDualEdgeCapture()
857 TPM_DisableChannel(base, (tpm_chnl_t)chnlId); in TPM_SetupDualEdgeCapture()
858 chnlId++; in TPM_SetupDualEdgeCapture()
859 TPM_DisableChannel(base, (tpm_chnl_t)chnlId); in TPM_SetupDualEdgeCapture()
860 chnlId--; in TPM_SetupDualEdgeCapture()
871 reg &= ~((uint32_t)TPM_FILTER_CH0FVAL_MASK << (TPM_FILTER_CH1FVAL_SHIFT * (chnlId + 1U))); in TPM_SetupDualEdgeCapture()
872 reg |= (filterValue << (TPM_FILTER_CH1FVAL_SHIFT * (chnlId + 1U))); in TPM_SetupDualEdgeCapture()
888 reg &= ~((uint32_t)TPM_FILTER_CH0FVAL_MASK << (TPM_FILTER_CH1FVAL_SHIFT * chnlId)); in TPM_SetupDualEdgeCapture()
889 reg |= (filterValue << (TPM_FILTER_CH1FVAL_SHIFT * chnlId)); in TPM_SetupDualEdgeCapture()
894 TPM_EnableChannel(base, (tpm_chnl_t)chnlId, (uint8_t)edgeParam->currChanEdgeMode); in TPM_SetupDualEdgeCapture()
895 chnlId++; in TPM_SetupDualEdgeCapture()
896 TPM_EnableChannel(base, (tpm_chnl_t)chnlId, (uint8_t)edgeParam->nextChanEdgeMode); in TPM_SetupDualEdgeCapture()