Lines Matching refs:adc
70 Adc *const adc = cfg->regs; in adc_sam_channel_setup() local
99 adc->ADC_ACR |= ADC_ACR_TSON; in adc_sam_channel_setup()
104 adc->ADC_COR |= (ADC_COR_DIFF0 | ADC_COR_DIFF1) << (channel_id * 2U); in adc_sam_channel_setup()
106 adc->ADC_COR &= ~((ADC_COR_DIFF0 | ADC_COR_DIFF1) << (channel_id * 2U)); in adc_sam_channel_setup()
110 adc->ADC_CGR &= ~(ADC_CGR_GAIN0_Msk << (channel_id * 2U)); in adc_sam_channel_setup()
121 adc->ADC_CGR |= ADC_CGR_GAIN0(1) << (channel_id * 2U); in adc_sam_channel_setup()
124 adc->ADC_CGR |= ADC_CGR_GAIN0(2) << (channel_id * 2U); in adc_sam_channel_setup()
131 adc->ADC_CGR |= ADC_CGR_GAIN0(3) << (channel_id * 2U); in adc_sam_channel_setup()
144 Adc *const adc = cfg->regs; in adc_sam_start_conversion() local
146 adc->ADC_CR = ADC_CR_START; in adc_sam_start_conversion()
157 Adc *const adc = cfg->regs; in adc_context_start_sampling() local
162 adc->ADC_CHDR = 0xffff; in adc_context_start_sampling()
165 adc->ADC_CHER = ctx->sequence.channels; in adc_context_start_sampling()
262 Adc *const adc = cfg->regs; in adc_sam_isr() local
266 if (adc->ADC_ISR & ADC_ISR_DRDY) { in adc_sam_isr()
267 result = adc->ADC_LCDR & ADC_LCDR_LDATA_Msk; in adc_sam_isr()
285 Adc *const adc = cfg->regs; in adc_sam_init() local
313 adc->ADC_CR = ADC_CR_SWRST; in adc_sam_init()
316 adc->ADC_MR = 0U; in adc_sam_init()
319 adc->ADC_PTCR = ADC_PTCR_RXTDIS | ADC_PTCR_TXTDIS; in adc_sam_init()
320 adc->ADC_RCR = 0U; in adc_sam_init()
321 adc->ADC_RNCR = 0U; in adc_sam_init()
324 adc->ADC_MR = ADC_MR_PRESCAL(cfg->prescaler) in adc_sam_init()
336 adc->ADC_ACR = ADC_ACR_IBCTL(frequency < 500000U ? 0U : 1U); in adc_sam_init()
354 adc->ADC_IER = ADC_IER_DRDY; in adc_sam_init()