Lines Matching refs:tmp16
104 uint16_t tmp16; in HSADC_Init() local
112 tmp16 = (uint16_t)(base->CTRL1 & ~HSADC_CTRL1_SMODE_MASK); in HSADC_Init()
113 tmp16 |= HSADC_CTRL1_SMODE(config->dualConverterScanMode); in HSADC_Init()
114 base->CTRL1 = tmp16; in HSADC_Init()
117 tmp16 = (uint16_t)(base->CTRL2 & ~HSADC_CTRL2_SIMULT_MASK); in HSADC_Init()
120 tmp16 |= HSADC_CTRL2_SIMULT_MASK; in HSADC_Init()
122 base->CTRL2 = tmp16; in HSADC_Init()
125 tmp16 = (uint16_t)(base->CTRL3 & ~(HSADC_CTRL3_ADCRES_MASK | HSADC_CTRL3_DMASRC_MASK)); in HSADC_Init()
126 … tmp16 |= (HSADC_CTRL3_ADCRES(config->resolution) | HSADC_CTRL3_DMASRC(config->DMATriggerSoruce)); in HSADC_Init()
127 base->CTRL3 = tmp16; in HSADC_Init()
130 …tmp16 = (uint16_t)(base->PWR & ~(HSADC_PWR_ASB_MASK | HSADC_PWR_APD_MASK | HSADC_PWR_PUDELAY_MASK)… in HSADC_Init()
136 tmp16 |= HSADC_PWR_ASB_MASK; in HSADC_Init()
139 tmp16 |= HSADC_PWR_APD_MASK; in HSADC_Init()
145 tmp16 |= HSADC_PWR_PUDELAY(config->powerUpDelayCount); in HSADC_Init()
146 base->PWR = tmp16; in HSADC_Init()
214 uint16_t tmp16; in HSADC_SetConverterConfig() local
221 tmp16 = (uint16_t)(base->CTRL2 & ~HSADC_CTRL2_DIVA_MASK); in HSADC_SetConverterConfig()
222 tmp16 |= HSADC_CTRL2_DIVA(config->clockDivisor - 1U); in HSADC_SetConverterConfig()
223 base->CTRL2 = tmp16; in HSADC_SetConverterConfig()
226 tmp16 = (uint16_t)(base->SAMPTIM & ~HSADC_SAMPTIM_SAMPT_A_MASK); in HSADC_SetConverterConfig()
227 tmp16 |= HSADC_SAMPTIM_SAMPT_A(config->samplingTimeCount); in HSADC_SetConverterConfig()
228 base->SAMPTIM = tmp16; in HSADC_SetConverterConfig()
231 tmp16 = (uint16_t)(base->CALIB & ~(HSADC_CALIB_REQSINGA_MASK | HSADC_CALIB_REQDIFA_MASK)); in HSADC_SetConverterConfig()
235 tmp16 |= HSADC_CALIB_REQSINGA_MASK; in HSADC_SetConverterConfig()
240 tmp16 |= HSADC_CALIB_REQDIFA_MASK; in HSADC_SetConverterConfig()
242 base->CALIB = tmp16; in HSADC_SetConverterConfig()
250 tmp16 = (uint16_t)(base->PWR2 & ~HSADC_PWR2_DIVB_MASK); in HSADC_SetConverterConfig()
251 tmp16 |= HSADC_PWR2_DIVB(config->clockDivisor - 1U); in HSADC_SetConverterConfig()
252 base->PWR2 = tmp16; in HSADC_SetConverterConfig()
255 tmp16 = (uint16_t)(base->SAMPTIM & ~HSADC_SAMPTIM_SAMPT_B_MASK); in HSADC_SetConverterConfig()
256 tmp16 |= HSADC_SAMPTIM_SAMPT_B(config->samplingTimeCount); in HSADC_SetConverterConfig()
257 base->SAMPTIM = tmp16; in HSADC_SetConverterConfig()
260 tmp16 = (uint16_t)(base->CALIB & ~(HSADC_CALIB_REQSINGB_MASK | HSADC_CALIB_REQDIFB_MASK)); in HSADC_SetConverterConfig()
264 tmp16 |= HSADC_CALIB_REQSINGB_MASK; in HSADC_SetConverterConfig()
269 tmp16 |= HSADC_CALIB_REQDIFB_MASK; in HSADC_SetConverterConfig()
271 base->CALIB = tmp16; in HSADC_SetConverterConfig()
481 uint16_t tmp16; in HSADC_EnableInterrupts() local
484 tmp16 = base->CTRL1; in HSADC_EnableInterrupts()
487 tmp16 |= HSADC_CTRL1_ZCIE_MASK; in HSADC_EnableInterrupts()
491 tmp16 |= HSADC_CTRL1_HLMTIE_MASK; in HSADC_EnableInterrupts()
495 tmp16 |= HSADC_CTRL1_LLMTIE_MASK; in HSADC_EnableInterrupts()
500 tmp16 |= HSADC_CTRL1_EOSIEA_MASK; in HSADC_EnableInterrupts()
502 base->CTRL1 = tmp16; in HSADC_EnableInterrupts()
512 tmp16 = base->CALIB; in HSADC_EnableInterrupts()
516 tmp16 |= HSADC_CALIB_EOCALIEA_MASK; in HSADC_EnableInterrupts()
521 tmp16 |= HSADC_CALIB_EOCALIEB_MASK; in HSADC_EnableInterrupts()
523 base->CALIB = tmp16; in HSADC_EnableInterrupts()
534 uint16_t tmp16; in HSADC_DisableInterrupts() local
537 tmp16 = base->CTRL1; in HSADC_DisableInterrupts()
540 tmp16 &= HSADC_CTRL1_ZCIE_MASK; in HSADC_DisableInterrupts()
544 tmp16 &= HSADC_CTRL1_HLMTIE_MASK; in HSADC_DisableInterrupts()
548 tmp16 &= HSADC_CTRL1_LLMTIE_MASK; in HSADC_DisableInterrupts()
553 tmp16 &= HSADC_CTRL1_EOSIEA_MASK; in HSADC_DisableInterrupts()
555 base->CTRL1 = tmp16; in HSADC_DisableInterrupts()
565 tmp16 = base->CALIB; in HSADC_DisableInterrupts()
569 tmp16 &= HSADC_CALIB_EOCALIEA_MASK; in HSADC_DisableInterrupts()
574 tmp16 &= HSADC_CALIB_EOCALIEB_MASK; in HSADC_DisableInterrupts()
576 base->CALIB = tmp16; in HSADC_DisableInterrupts()
588 uint16_t tmp16; in HSADC_GetStatusFlags() local
592 tmp16 = base->STAT; in HSADC_GetStatusFlags()
593 if (HSADC_STAT_ZCI_MASK == (tmp16 & HSADC_STAT_ZCI_MASK)) in HSADC_GetStatusFlags()
597 if (HSADC_STAT_HLMTI_MASK == (tmp16 & HSADC_STAT_HLMTI_MASK)) in HSADC_GetStatusFlags()
601 if (HSADC_STAT_LLMTI_MASK == (tmp16 & HSADC_STAT_LLMTI_MASK)) in HSADC_GetStatusFlags()
605 if (HSADC_STAT_EOSIA_MASK == (tmp16 & HSADC_STAT_EOSIA_MASK)) in HSADC_GetStatusFlags()
609 if (HSADC_STAT_EOSIB_MASK == (tmp16 & HSADC_STAT_EOSIB_MASK)) in HSADC_GetStatusFlags()
613 if (HSADC_STAT_EOCALIA_MASK == (tmp16 & HSADC_STAT_EOCALIA_MASK)) in HSADC_GetStatusFlags()
617 if (HSADC_STAT_EOCALIB_MASK == (tmp16 & HSADC_STAT_EOCALIB_MASK)) in HSADC_GetStatusFlags()
621 if (HSADC_STAT_CIPA_MASK == (tmp16 & HSADC_STAT_CIPA_MASK)) in HSADC_GetStatusFlags()
625 if (HSADC_STAT_CIPB_MASK == (tmp16 & HSADC_STAT_CIPB_MASK)) in HSADC_GetStatusFlags()
629 if (HSADC_STAT_DUMMYA_MASK == (tmp16 & HSADC_STAT_DUMMYA_MASK)) in HSADC_GetStatusFlags()
633 if (HSADC_STAT_DUMMYB_MASK == (tmp16 & HSADC_STAT_DUMMYB_MASK)) in HSADC_GetStatusFlags()
637 if (HSADC_STAT_CALONA_MASK == (tmp16 & HSADC_STAT_CALONA_MASK)) in HSADC_GetStatusFlags()
641 if (HSADC_STAT_CALONB_MASK == (tmp16 & HSADC_STAT_CALONB_MASK)) in HSADC_GetStatusFlags()
647 tmp16 = base->PWR; in HSADC_GetStatusFlags()
648 if (HSADC_PWR_PSTSA_MASK == (tmp16 & HSADC_PWR_PSTSA_MASK)) in HSADC_GetStatusFlags()
652 if (HSADC_PWR_PSTSB_MASK == (tmp16 & HSADC_PWR_PSTSB_MASK)) in HSADC_GetStatusFlags()
668 uint16_t tmp16; in HSADC_ClearStatusFlags() local
683 tmp16 = base->STAT; in HSADC_ClearStatusFlags()
686 tmp16 |= HSADC_STAT_EOSIA_MASK; in HSADC_ClearStatusFlags()
690 tmp16 |= HSADC_STAT_EOSIB_MASK; in HSADC_ClearStatusFlags()
694 tmp16 |= HSADC_STAT_EOCALIA_MASK; in HSADC_ClearStatusFlags()
698 tmp16 |= HSADC_STAT_EOCALIB_MASK; in HSADC_ClearStatusFlags()
700 base->STAT = tmp16; in HSADC_ClearStatusFlags()
708 uint16_t tmp16; in HSADC_SetChannel67Mux() local
713 tmp16 = base->MUX67_SEL; in HSADC_SetChannel67Mux()
721 … tmp16 &= ~((uint16_t)HSADC_MUX67_SEL_CH6_SELA_MASK | (uint16_t)HSADC_MUX67_SEL_CH7_SELA_MASK); in HSADC_SetChannel67Mux()
722 … tmp16 |= (HSADC_MUX67_SEL_CH6_SELA(muxNumber) | HSADC_MUX67_SEL_CH7_SELA(muxNumber)); in HSADC_SetChannel67Mux()
726 … tmp16 &= ~((uint16_t)HSADC_MUX67_SEL_CH6_SELB_MASK | (uint16_t)HSADC_MUX67_SEL_CH7_SELB_MASK); in HSADC_SetChannel67Mux()
727 … tmp16 |= (HSADC_MUX67_SEL_CH6_SELB(muxNumber) | HSADC_MUX67_SEL_CH7_SELB(muxNumber)); in HSADC_SetChannel67Mux()
730 tmp16 = base->MUX67_SEL; in HSADC_SetChannel67Mux()
739 tmp16 &= ~(uint16_t)HSADC_MUX67_SEL_CH6_SELA_MASK; in HSADC_SetChannel67Mux()
740 tmp16 |= HSADC_MUX67_SEL_CH6_SELA(muxNumber); in HSADC_SetChannel67Mux()
743 tmp16 &= ~(uint16_t)HSADC_MUX67_SEL_CH7_SELA_MASK; in HSADC_SetChannel67Mux()
744 tmp16 |= HSADC_MUX67_SEL_CH7_SELA(muxNumber); in HSADC_SetChannel67Mux()
747 tmp16 &= ~(uint16_t)HSADC_MUX67_SEL_CH6_SELB_MASK; in HSADC_SetChannel67Mux()
748 tmp16 |= HSADC_MUX67_SEL_CH6_SELB(muxNumber); in HSADC_SetChannel67Mux()
751 tmp16 &= ~(uint16_t)HSADC_MUX67_SEL_CH7_SELB_MASK; in HSADC_SetChannel67Mux()
752 tmp16 |= HSADC_MUX67_SEL_CH7_SELB(muxNumber); in HSADC_SetChannel67Mux()
755 tmp16 = base->MUX67_SEL; in HSADC_SetChannel67Mux()
759 base->MUX67_SEL = tmp16; in HSADC_SetChannel67Mux()
792 uint16_t tmp16; in HSADC_SetSampleConfig() local
826 tmp16 = base->ZXCTRL1 & ~HSADC_ZXCTRL_ZCE_MASK(sampleIndex); in HSADC_SetSampleConfig()
827 tmp16 |= HSADC_ZXCTRL_ZCE(sampleIndex, config->zeroCrossingMode); in HSADC_SetSampleConfig()
828 base->ZXCTRL1 = tmp16; 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()
835 base->ZXCTRL2 = tmp16; 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()
848 base->CLIST1 = tmp16; 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()
855 base->CLIST2 = tmp16; 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()
863 base->CLIST3 = tmp16; 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()
871 base->CLIST4 = tmp16; in HSADC_SetSampleConfig()