Friedrich-Alexander-Universität UnivisSuche FAU-Logo
Techn. Fakultät Willkommen am Department Informatik FAU-Logo
Logo I4
Lehrstuhl für Informatik 4
SPiC
 
  Übungen
  Dokumentation
  Evaluation
  Prüfungsinformationen
  protected area Intern
Übungen
  Anmeldung
  Folien
  Aufgaben
Department Informatik  >  Informatik 4  >  Lehre  >  WS 2009/10  >  SPiC  >  Übung  >  Doku  >  libspicboard: adc.h File Reference

libspicboard (Revision 149) API documentation

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

adc.h File Reference

Interface to the AD-converter of the ATmega32, which allows to query the potentiometer and the photosensor of the board. More...

#include <stdint.h>

Go to the source code of this file.

Enumerations

enum  ADCDEV { PHOTO = 0, POTI = 1 }
 device ids of available periphery connected to ADC channels. More...

Functions

int16_t sb_adc_read (ADCDEV dev)
 perform a 10-bit A/D conversion for a specific channel/device.


Detailed Description

Interface to the AD-converter of the ATmega32, which allows to query the potentiometer and the photosensor of the board.

Version:
$Rev: 149 $

Enumeration Type Documentation

enum ADCDEV

device ids of available periphery connected to ADC channels.

Enumerator:
PHOTO  the photosensor (brighter ambience yields higher numbers)
POTI  the potentiometer (rotation towards LEDs yields higher numbers)


Function Documentation

int16_t sb_adc_read ( ADCDEV  dev  ) 

perform a 10-bit A/D conversion for a specific channel/device.

Parameters:
dev id of a device connected to the ADC
Returns:
the positive 10-bit result of the conversion, or a negative value on error
Return values:
-1 invalid device id

  Impressum   Datenschutz Stand: 2009-05-18 11:24   MS