Lehrstuhl für Informatik 4
SPiC
Vorlesung
-
UnivIS-Infos
-
Inhalt
-
Folien
Übungen
-
Inhalt
-
Folien
-
Aufgaben
-
UnivIS-Infos
-
SPiCboard
-
libspicboard-Doku
-
FAQ
-
FSI-Forum für Fragen
Prüfung
Evaluation
Intern
Department Informatik
>
Informatik 4
>
Lehre
>
SS 2016
>
SPiC
>
Übungen
>
libspicboard-Doku
>
adc.h Source File
SPiCboard library (libspicboard, revision 12428) API documentation
Found a bug or something ambiguous?
Mail us
to get it fixed!
Main Page
Related Pages
Modules
Files
File List
Globals
libspicboard
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
ADCDEV
device ids of available periphery connected to ADC channels.
Definition:
adc.h:20
PHOTO
Definition:
adc.h:21
POTI
Definition:
adc.h:22
sb_adc_read
int16_t sb_adc_read(ADCDEV dev)
perform a 10-bit A/D conversion for a specific channel/device.
Impressum
Datenschutz
Stand: 2016-04-26 17:58
MS