Lines Matching refs:chnlNumber
93 uint8_t chnlNumber = 0; in FTM_SetPwmSync() local
104 …for (chnlNumber = 0; chnlNumber < ((uint8_t)FSL_FEATURE_FTM_CHANNEL_COUNTn(base) / 2U); chnlNumber… in FTM_SetPwmSync()
107 reg |= (1UL << (FTM_COMBINE_SYNCEN0_SHIFT + (FTM_COMBINE_COMBINE1_SHIFT * chnlNumber))); in FTM_SetPwmSync()
161 uint32_t chnlNumber = 0; in FTM_SetReloadPoints() local
172 for (chnlNumber = 0; chnlNumber < ((uint32_t)chnlCount / 2U); chnlNumber++) in FTM_SetReloadPoints()
175 reg |= (1UL << (FTM_COMBINE_SYNCEN0_SHIFT + (FTM_COMBINE_COMBINE1_SHIFT * chnlNumber))); in FTM_SetReloadPoints()
467 if (((uint8_t)chnlParams->chnlNumber >= (uint8_t)FSL_FEATURE_FTM_CHANNEL_COUNTn(base)) || in FTM_SetupPwm()
491 reg = base->CONTROLS[chnlParams->chnlNumber].CnSC; in FTM_SetupPwm()
501 base->CONTROLS[chnlParams->chnlNumber].CnSC = reg; in FTM_SetupPwm()
503 base->CONTROLS[chnlParams->chnlNumber].CnV = cnv; in FTM_SetupPwm()
506 FTM_SetPwmOutputEnable(base, chnlParams->chnlNumber, true); in FTM_SetupPwm()
512 … if (((uint32_t)chnlParams->chnlNumber) >= ((uint32_t)FSL_FEATURE_FTM_CHANNEL_COUNTn(base) / 2U)) in FTM_SetupPwm()
537 reg = base->CONTROLS[((uint32_t)chnlParams->chnlNumber) * 2U].CnSC; in FTM_SetupPwm()
544 base->CONTROLS[((uint32_t)chnlParams->chnlNumber) * 2U].CnSC = reg; in FTM_SetupPwm()
547 reg = base->CONTROLS[(((uint32_t)chnlParams->chnlNumber) * 2U) + 1U].CnSC; in FTM_SetupPwm()
554 base->CONTROLS[(((uint32_t)chnlParams->chnlNumber) * 2U) + 1U].CnSC = reg; in FTM_SetupPwm()
558 …<< (FTM_COMBINE_COMBINE0_SHIFT + (FTM_COMBINE_COMBINE1_SHIFT * (uint32_t)chnlParams->chnlNumber))); in FTM_SetupPwm()
561 base->CONTROLS[((uint32_t)chnlParams->chnlNumber) * 2U].CnV = cnvFirstEdge; in FTM_SetupPwm()
562 base->CONTROLS[(((uint32_t)chnlParams->chnlNumber) * 2U) + 1U].CnV = cnvFirstEdge + cnv; in FTM_SetupPwm()
566 … FTM_SetPwmOutputEnable(base, (ftm_chnl_t)(uint8_t)((uint8_t)chnlParams->chnlNumber * 2U), true); in FTM_SetupPwm()
567 …FTM_SetPwmOutputEnable(base, (ftm_chnl_t)(uint8_t)((uint8_t)chnlParams->chnlNumber * 2U + 1U), tru… in FTM_SetupPwm()
571 … FTM_SetComplementaryEnable(base, chnlParams->chnlNumber, chnlParams->enableComplementary); in FTM_SetupPwm()
573 FTM_SetDeadTimeEnable(base, chnlParams->chnlNumber, chnlParams->enableDeadtime); in FTM_SetupPwm()
595 ftm_chnl_t chnlNumber, in FTM_UpdatePwmDutycycle() argument
602 if (((uint8_t)chnlNumber >= (uint8_t)FSL_FEATURE_FTM_CHANNEL_COUNTn(base)) || in FTM_UpdatePwmDutycycle()
626 base->CONTROLS[chnlNumber].CnV = cnv; in FTM_UpdatePwmDutycycle()
631 if ((uint32_t)chnlNumber >= ((uint32_t)FSL_FEATURE_FTM_CHANNEL_COUNTn(base) / 2U)) in FTM_UpdatePwmDutycycle()
642 cnvFirstEdge = base->CONTROLS[((uint32_t)chnlNumber) * 2U].CnV; in FTM_UpdatePwmDutycycle()
649 base->CONTROLS[((uint32_t)chnlNumber * 2U)].CnV = cnvFirstEdge; in FTM_UpdatePwmDutycycle()
650 base->CONTROLS[((uint32_t)chnlNumber * 2U) + 1U].CnV = cnvFirstEdge + cnv; in FTM_UpdatePwmDutycycle()
663 void FTM_UpdateChnlEdgeLevelSelect(FTM_Type *base, ftm_chnl_t chnlNumber, uint8_t level) in FTM_UpdateChnlEdgeLevelSelect() argument
665 uint32_t reg = base->CONTROLS[chnlNumber].CnSC; in FTM_UpdateChnlEdgeLevelSelect()
671 base->CONTROLS[chnlNumber].CnSC = reg; in FTM_UpdateChnlEdgeLevelSelect()
728 reg = base->CONTROLS[chnlParams->chnlNumber].CnSC; in FTM_SetupPwmMode()
738 base->CONTROLS[chnlParams->chnlNumber].CnSC = reg; in FTM_SetupPwmMode()
740 base->CONTROLS[chnlParams->chnlNumber].CnV = chnlParams->dutyValue; in FTM_SetupPwmMode()
743 FTM_SetPwmOutputEnable(base, chnlParams->chnlNumber, true); in FTM_SetupPwmMode()
749 … if (((uint32_t)chnlParams->chnlNumber) >= (((uint32_t)FSL_FEATURE_FTM_CHANNEL_COUNTn(base)) / 2U)) in FTM_SetupPwmMode()
780 reg = base->CONTROLS[((uint32_t)chnlParams->chnlNumber) * 2U].CnSC; in FTM_SetupPwmMode()
787 base->CONTROLS[((uint32_t)chnlParams->chnlNumber) * 2U].CnSC = reg; in FTM_SetupPwmMode()
790 reg = base->CONTROLS[(((uint32_t)chnlParams->chnlNumber) * 2U) + 1U].CnSC; in FTM_SetupPwmMode()
797 base->CONTROLS[(((uint32_t)chnlParams->chnlNumber) * 2U) + 1U].CnSC = reg; in FTM_SetupPwmMode()
801 …<< (FTM_COMBINE_COMBINE0_SHIFT + (FTM_COMBINE_COMBINE1_SHIFT * (uint32_t)chnlParams->chnlNumber))); in FTM_SetupPwmMode()
804 base->CONTROLS[((uint32_t)chnlParams->chnlNumber) * 2U].CnV = cnvFirstEdge; in FTM_SetupPwmMode()
805 …base->CONTROLS[(((uint32_t)chnlParams->chnlNumber) * 2U) + 1U].CnV = cnvFirstEdge + chnlParams->du… in FTM_SetupPwmMode()
809 … FTM_SetPwmOutputEnable(base, (ftm_chnl_t)(uint8_t)((uint8_t)chnlParams->chnlNumber * 2U), true); in FTM_SetupPwmMode()
810 …FTM_SetPwmOutputEnable(base, (ftm_chnl_t)(uint8_t)((uint8_t)chnlParams->chnlNumber * 2U + 1U), tru… in FTM_SetupPwmMode()
814 … FTM_SetComplementaryEnable(base, chnlParams->chnlNumber, chnlParams->enableComplementary); in FTM_SetupPwmMode()
816 FTM_SetDeadTimeEnable(base, chnlParams->chnlNumber, chnlParams->enableDeadtime); in FTM_SetupPwmMode()
838 ftm_chnl_t chnlNumber, in FTM_SetupInputCapture() argument
846 …~(1UL << (FTM_COMBINE_COMBINE0_SHIFT + (FTM_COMBINE_COMBINE1_SHIFT * ((uint32_t)chnlNumber >> 1)))… in FTM_SetupInputCapture()
849 …~(1UL << (FTM_COMBINE_DECAPEN0_SHIFT + (FTM_COMBINE_COMBINE1_SHIFT * ((uint32_t)chnlNumber >> 1)))… in FTM_SetupInputCapture()
855 reg = base->CONTROLS[chnlNumber].CnSC; in FTM_SetupInputCapture()
860 base->CONTROLS[chnlNumber].CnSC = reg; in FTM_SetupInputCapture()
862 if (chnlNumber < kFTM_Chnl_4) in FTM_SetupInputCapture()
865 … reg &= ~((uint32_t)FTM_FILTER_CH0FVAL_MASK << (FTM_FILTER_CH1FVAL_SHIFT * (uint32_t)chnlNumber)); in FTM_SetupInputCapture()
866 reg |= (filterValue << (FTM_FILTER_CH1FVAL_SHIFT * (uint32_t)chnlNumber)); in FTM_SetupInputCapture()
871 FTM_SetPwmOutputEnable(base, chnlNumber, false); in FTM_SetupInputCapture()
887 ftm_chnl_t chnlNumber, in FTM_SetupOutputCompare() argument
895 …~(1UL << (FTM_COMBINE_COMBINE0_SHIFT + (FTM_COMBINE_COMBINE1_SHIFT * ((uint32_t)chnlNumber >> 1)))… in FTM_SetupOutputCompare()
898 …~(1UL << (FTM_COMBINE_DECAPEN0_SHIFT + (FTM_COMBINE_COMBINE1_SHIFT * ((uint32_t)chnlNumber >> 1)))… in FTM_SetupOutputCompare()
904 reg = base->CONTROLS[chnlNumber].CnSC; in FTM_SetupOutputCompare()
908 base->CONTROLS[chnlNumber].CnSC = reg; in FTM_SetupOutputCompare()
911 base->CONTROLS[chnlNumber].CnV = compareValue; in FTM_SetupOutputCompare()
915 FTM_SetPwmOutputEnable(base, chnlNumber, true); in FTM_SetupOutputCompare()
1086 uint8_t chnlNumber = 0; in FTM_EnableInterrupts() local
1125 base->CONTROLS[chnlNumber].CnSC |= FTM_CnSC_CHIE_MASK; in FTM_EnableInterrupts()
1127 chnlNumber++; in FTM_EnableInterrupts()
1142 uint8_t chnlNumber = 0; in FTM_DisableInterrupts() local
1180 base->CONTROLS[chnlNumber].CnSC &= ~FTM_CnSC_CHIE_MASK; in FTM_DisableInterrupts()
1182 chnlNumber++; in FTM_DisableInterrupts()