Main Page | Modules | Data Structures | File List | Data Fields | Globals

adc.h File Reference

Low-level analog-to-digital conversion functions. More...

#include <68332/types.h>

Go to the source code of this file.

Enumerations

enum  adc_channel_t {
  ADC_CHANNEL0 = 0, ADC_CHANNEL1, ADC_CHANNEL2, ADC_CHANNEL3,
  ADC_CHANNEL4, ADC_CHANNEL5, ADC_CHANNEL6, ADC_CHANNEL7
}

Functions

int adc_all (uint8 adc[])
uint8 adc_channel (adc_channel_t channel_num)


Detailed Description

This file contains the global function prototypes and data structures for the low level ADC support in libadc.

To use the functions defined in this file, include <68332/mrm/adc.h> and link libadc.a.


Enumeration Type Documentation

enum adc_channel_t
 

ADC channel numbers

Enumeration values:
ADC_CHANNEL0 
ADC_CHANNEL1 
ADC_CHANNEL2 
ADC_CHANNEL3 
ADC_CHANNEL4 
ADC_CHANNEL5 
ADC_CHANNEL6 
ADC_CHANNEL7 


Function Documentation

int adc_all uint8  adc[]  ) 
 

Read all eight ADC channels. Note: The adc[] array must contain at least eight array locations. Only the first eight locations in adc[] are modified.

Parameters:
adc[] An array of eight bytes to contain the analog to digital conversion results.
Returns:
0 on success, nonzero on failure.

uint8 adc_channel adc_channel_t  channel_num  ) 
 

Read an ADC channel.

Parameters:
channel_num Specifies which channel to convert.
Returns:
The eight bit analog to digital conversion result.


Generated on Wed Sep 6 03:02:22 2006 for MotoRobots by doxygen 1.3.6