Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

/projects/cubeos/src_current/drivers/i2c/analog.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <analog.h>
#include <i2cd.h>

Include dependency graph for analog.c:

Go to the source code of this file.

Functions

int I2C_ReadAnalogIn (int chip, int channel)
 read one A/D input channel of a PCF8591 device. More...

int I2C_ConfigureAnalog (int chip, char how)
 configure the a/d function of one PCF8591 chip. More...

int I2C_WriteAnalogOut (int chip, int value)
 sets the D/A output channel of a PCF8591 chip. More...

int I2C_init_analog ()
 configure all PCF8591 A/D-D/A devices. More...


Variables

_I2C_ad_datas _I2C_ad_data [16]
 keeps information about the PCF8591 A/D - D/A converters in the system. More...

int _I2C_adnum
char _I2C_analog_mbuf [MAXI2CMESSLENGTH]
i2cmess _I2C_analog_m


Detailed Description

Definition in file analog.c.


Function Documentation

int I2C_ReadAnalogIn int    chip,
int    channel
 

read one A/D input channel of a PCF8591 device.

Parameters:
chip  is the chip ID as set by init_analog()
channel  is the A/D channel to read

Definition at line 40 of file analog.c.

References _I2C_analog_mbuf, _I2C_ad_datas::active, _I2C_ad_datas::address, i2cmess::address, i2cmess::buf, I2C_MASTER, I2C_process, i2cmess::nrBytes, and _I2C_ad_datas::status.


Variable Documentation

int _I2C_adnum
 

Definition at line 30 of file analog.c.

Referenced by I2C_init_analog.

struct i2cmess _I2C_analog_m
 

Definition at line 33 of file analog.c.

char _I2C_analog_mbuf[MAXI2CMESSLENGTH]
 

Definition at line 32 of file analog.c.

Referenced by I2C_ConfigureAnalog, I2C_init_analog, I2C_ReadAnalogIn, and I2C_WriteAnalogOut.


Generated on Thu Feb 20 15:38:48 2003 for cubeOS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002