You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

adcext.h 659 B

11 years ago
1234567891011121314151617181920212223
  1. #ifndef ADCEXT_H
  2. #define ADCEXT_H
  3. /* Initialize ADC */
  4. void adcext_init(void);
  5. /* Start a conversion if it hasn't already been started.
  6. Wait for conversion to finish.
  7. Read the result and return the raw 32-bit value. */
  8. uint32_t adcext_read(void);
  9. /* Convert a raw 32-bit value into a signed result.
  10. The return value range is -(2^31) to (2^31)-1 */
  11. int32_t adcext_convert(uint32_t raw);
  12. /* Start a new conversion. If a conversion was already started
  13. but the result was not read, this does nothing. */
  14. void adcext_start_conversion(void);
  15. /* Return 1 if a conversion is in progress, 0 otherwise */
  16. int adcext_is_conversion_ready(void);
  17. #endif