Lines Matching refs:sampleIndex

787 void HSADC_SetSampleConfig(HSADC_Type *base, uint16_t sampleIndex, const hsadc_sample_config_t *con…  in HSADC_SetSampleConfig()  argument
789 assert(sampleIndex < HSADC_RSLT_COUNT); in HSADC_SetSampleConfig()
824 if (sampleIndex < 8U) in HSADC_SetSampleConfig()
826 tmp16 = base->ZXCTRL1 & ~HSADC_ZXCTRL_ZCE_MASK(sampleIndex); in HSADC_SetSampleConfig()
827 tmp16 |= HSADC_ZXCTRL_ZCE(sampleIndex, config->zeroCrossingMode); in HSADC_SetSampleConfig()
830 else if (sampleIndex < 16U) in HSADC_SetSampleConfig()
832 sampleIndex -= 8U; in HSADC_SetSampleConfig()
833 tmp16 = base->ZXCTRL2 & ~HSADC_ZXCTRL_ZCE_MASK(sampleIndex); in HSADC_SetSampleConfig()
834 tmp16 |= HSADC_ZXCTRL_ZCE(sampleIndex, config->zeroCrossingMode); in HSADC_SetSampleConfig()
836 sampleIndex += 8U; in HSADC_SetSampleConfig()
844 if (sampleIndex < 4U) in HSADC_SetSampleConfig()
846 tmp16 = base->CLIST1 & ~HSADC_CLIST_SAMPLE_MASK(sampleIndex); in HSADC_SetSampleConfig()
847 tmp16 |= HSADC_CLIST_SAMPLE(sampleIndex, config->channelNumber); in HSADC_SetSampleConfig()
850 else if (sampleIndex < 8U) in HSADC_SetSampleConfig()
852 sampleIndex -= 4U; in HSADC_SetSampleConfig()
853 tmp16 = base->CLIST2 & ~HSADC_CLIST_SAMPLE_MASK(sampleIndex); in HSADC_SetSampleConfig()
854 tmp16 |= HSADC_CLIST_SAMPLE(sampleIndex, config->channelNumber); in HSADC_SetSampleConfig()
856 sampleIndex += 4U; in HSADC_SetSampleConfig()
858 else if (sampleIndex < 12U) in HSADC_SetSampleConfig()
860 sampleIndex -= 8U; in HSADC_SetSampleConfig()
861 tmp16 = base->CLIST3 & ~HSADC_CLIST_SAMPLE_MASK(sampleIndex); in HSADC_SetSampleConfig()
862 tmp16 |= HSADC_CLIST_SAMPLE(sampleIndex, config->channelNumber); in HSADC_SetSampleConfig()
864 sampleIndex += 8U; in HSADC_SetSampleConfig()
866 else if (sampleIndex < 16U) in HSADC_SetSampleConfig()
868 sampleIndex -= 12U; in HSADC_SetSampleConfig()
869 tmp16 = base->CLIST4 & ~HSADC_CLIST_SAMPLE_MASK(sampleIndex); in HSADC_SetSampleConfig()
870 tmp16 |= HSADC_CLIST_SAMPLE(sampleIndex, config->channelNumber); in HSADC_SetSampleConfig()
872 sampleIndex += 12U; in HSADC_SetSampleConfig()
880 base->LOLIM[sampleIndex] = config->lowLimitValue; in HSADC_SetSampleConfig()
881 base->HILIM[sampleIndex] = config->highLimitValue; in HSADC_SetSampleConfig()
882 base->OFFST[sampleIndex] = config->offsetValue; in HSADC_SetSampleConfig()
888 base->SCTRL |= ((uint16_t)1U << sampleIndex); in HSADC_SetSampleConfig()
892 base->SCTRL &= ~((uint16_t)1U << sampleIndex); in HSADC_SetSampleConfig()