Lines Matching full:afec

12  * @brief Atmel SAM MCU family ADC (AFEC) driver.
15 * Front-End Controller (AFEC) peripheral.
65 Afec *regs;
75 Afec *const afec = cfg->regs; in adc_sam_channel_setup() local
80 afec->AFEC_CGR &= ~(3 << channel_id * 2U); in adc_sam_channel_setup()
87 afec->AFEC_CGR |= (1 << (channel_id * 2U)); in adc_sam_channel_setup()
90 afec->AFEC_CGR |= (2 << (channel_id * 2U)); in adc_sam_channel_setup()
116 afec->AFEC_EMR &= ~(AFEC_EMR_SIGNMODE( in adc_sam_channel_setup()
127 Afec *const afec = cfg->regs; in adc_sam_start_conversion() local
134 afec->AFEC_CHDR = 0xfff; in adc_sam_start_conversion()
135 afec->AFEC_IDR = 0xfff; in adc_sam_start_conversion()
138 * an input to the AFEC (50.5.1 SAM E70 datasheet). in adc_sam_start_conversion()
140 afec->AFEC_CHER = (1 << data->channel_id); in adc_sam_start_conversion()
143 afec->AFEC_IER = (1 << data->channel_id); in adc_sam_start_conversion()
146 afec->AFEC_CR = AFEC_CR_START; in adc_sam_start_conversion()
270 Afec *const afec = cfg->regs; in adc_sam_init() local
273 /* Reset the AFEC. */ in adc_sam_init()
274 afec->AFEC_CR = AFEC_CR_SWRST; in adc_sam_init()
276 afec->AFEC_MR = AFEC_MR_TRGEN_DIS in adc_sam_init()
287 afec->AFEC_CSELR = i; in adc_sam_init()
288 afec->AFEC_COCR = 512; in adc_sam_init()
292 afec->AFEC_ACR = AFEC_ACR_IBCTL(1) in adc_sam_init()
299 /* Enable AFEC clock in PMC */ in adc_sam_init()
346 Afec *const afec = cfg->regs; in adc_sam_isr() local
349 afec->AFEC_CHDR |= BIT(data->channel_id); in adc_sam_isr()
350 afec->AFEC_IDR |= BIT(data->channel_id); in adc_sam_isr()
352 afec->AFEC_CSELR = AFEC_CSELR_CSEL(data->channel_id); in adc_sam_isr()
353 result = (uint16_t)(afec->AFEC_CDR); in adc_sam_isr()
371 .regs = (Afec *)DT_INST_REG_ADDR(n), \