2013-11-27 17:54:30 +01:00
|
|
|
/**
|
|
|
|
* @defgroup drivers_adc ADC
|
|
|
|
* @ingroup drivers
|
|
|
|
* @brief Generic ADC driver
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file adc.h
|
|
|
|
*/
|
|
|
|
|
2012-02-16 22:14:47 +01:00
|
|
|
#ifndef ADC_H
|
2013-06-21 22:36:48 +02:00
|
|
|
#define ADC_H
|
2012-02-16 22:14:47 +01:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
/**
|
2013-11-27 17:54:30 +01:00
|
|
|
* @brief Initialize ADC.
|
2012-02-16 22:14:47 +01:00
|
|
|
*/
|
|
|
|
void adc_init(void);
|
|
|
|
|
|
|
|
/**
|
2013-11-27 17:54:30 +01:00
|
|
|
* @brief Read ADC value of selected channel.
|
2012-02-16 22:14:47 +01:00
|
|
|
*
|
|
|
|
* Valid channel numbers are from 0 to 2.
|
|
|
|
*
|
2013-11-27 17:54:30 +01:00
|
|
|
* @return ADC value of selected channel.
|
2012-02-16 22:14:47 +01:00
|
|
|
*/
|
|
|
|
uint16_t adc_read(uint8_t channel);
|
|
|
|
|
2013-11-27 17:54:30 +01:00
|
|
|
/** @} */
|
2012-02-16 22:14:47 +01:00
|
|
|
#endif /* ADC_H */
|