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

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

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Compounds

struct  _I2C_ad_datas
 i2c a/d data structure. More...


Defines

#define MAXI2CMESSLENGTH   8
#define ANALOG_4SE   0x00;
#define ANALOG_3DI   0x10;
#define ANALOG_2S2D   0x20;
#define ANALOG_2DI   0x30;
#define ANALOG_DACOE   0x40;

Functions

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

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

int I2C_ConfigureAnalog (int chip, char how)
 configure the a/d function of one 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...

char _I2C_analog_mbuf [MAXI2CMESSLENGTH]
i2cmess _I2C_analog_m
int _I2C_adnum


Detailed Description

Definition in file analog.h.


Define Documentation

#define ANALOG_2DI   0x30;
 

Definition at line 28 of file analog.h.

#define ANALOG_2S2D   0x20;
 

Definition at line 27 of file analog.h.

#define ANALOG_3DI   0x10;
 

Definition at line 26 of file analog.h.

#define ANALOG_4SE   0x00;
 

Definition at line 25 of file analog.h.

#define ANALOG_DACOE   0x40;
 

Definition at line 29 of file analog.h.

#define MAXI2CMESSLENGTH   8
 

Definition at line 23 of file analog.h.


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_ad_datas::da.


Variable Documentation

int _I2C_adnum
 

Definition at line 48 of file analog.h.

struct i2cmess _I2C_analog_m
 

Definition at line 47 of file analog.h.

char _I2C_analog_mbuf[MAXI2CMESSLENGTH]
 

Definition at line 46 of file analog.h.


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