|
- #ifndef ADC_H
- #define ADC_H
-
- /* Initialize ADC */
- void adc_init(void);
-
- /* Start a conversion if it hasn't already been started.
- Wait for conversion to finish.
- Read the result and return the raw 32-bit value. */
- uint32_t adc_read(void);
-
- /* Convert a raw 32-bit value into a signed result.
- The return value range is -(2^31) to (2^31)-1 */
- int32_t adc_convert(uint32_t raw);
-
- /* Start a new conversion. If a conversion was already started
- but the result was not read, this does nothing. */
- void adc_start_conversion(void);
-
- /* Return 1 if a conversion is in progress, 0 otherwise */
- int adc_is_conversion_ready(void);
-
- #endif
|