Friedrich-Alexander-Universität Erlangen-Nürnberg  /   Technische Fakultät  /   Department Informatik

SPiCboard library (libspicboard, revision 14673M) API documentation

Found a bug or something ambiguous? Mail us to get it fixed!

adc.h
Go to the documentation of this file.
1 #ifndef ADC_H
2 #define ADC_H
3 
4 #include <stdint.h>
5 
6 
7 /**
8  * \addtogroup ADC ADC (Analog to Digital Converter)
9  * \brief Interface to the AD-converter of the ATmega32, which allows to
10  * query the potentiometer and the photosensor of the board.
11  *
12  * @{
13  * \file adc.h
14  * \version \$Rev: 7715 $
15  */
16 
17 /**
18  * \brief device ids of available periphery connected to ADC channels.
19  */
20 typedef enum {
21  PHOTO = 0, /**< the photosensor (brighter ambience yields higher numbers) **/
22  POTI = 1 /**< the potentiometer (rotation towards LEDs yields higher numbers) **/
23 } ADCDEV;
24 
25 /**
26  * \brief perform a 10-bit A/D conversion for a specific channel/device.
27  *
28  * \param dev id of a device connected to the ADC
29  *
30  * \retval >0 10-bit result of the conversion
31  * \retval -1 invalid device id
32  */
33 int16_t sb_adc_read(ADCDEV dev);
34 
35 /** @}*/
36 
37 #endif
38 
ADCDEV
device ids of available periphery connected to ADC channels.
Definition: adc.h:20
Definition: adc.h:21
Definition: adc.h:22
int16_t sb_adc_read(ADCDEV dev)
perform a 10-bit A/D conversion for a specific channel/device.