This function sets the analog-in pins to inputs and configures the ADC. This function should be called before any other functions of this module.
Definition at line 91 of file adc.c. References AD_REF_EXT, CSBASE_BIT, CSBASE_DDR, R3_BIT, R3_DDR, SWITCH_BIT, SWITCH_DDR, VREF_BIT, VREF_DDR, VTH_BIT, and VTH_DDR. Referenced by init_InitModules(). { SWITCH_DDR &= ~(1U << SWITCH_BIT); VTH_DDR &= ~(1U << VTH_BIT); R3_DDR &= ~(1U << R3_BIT); CSBASE_DDR &= ~(1U << CSBASE_BIT); VREF_DDR &= ~(1U << VREF_BIT); ADMUX = AD_REF_EXT; ADCSRA = (0<<ADEN) /* AD Enable */ | (0<<ADSC) /* start conversion */ // | (0<<ADFR) /* free run */ | (0<<ADIE) /* interrupt enable */ | (1<<ADPS2) | (1<<ADPS1) | (1<<ADPS0); } /* End: adc_Init() */
Here is the caller graph for this function:
![]() |