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

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

#include <ssem.h>

Include dependency graph for i2cd.h:

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

Go to the source code of this file.

Compounds

struct  i2c
 i2c bus controller structure. More...

struct  i2cmess
 I2C message structure. More...


Defines

#define I2C_MASTER   0
#define I2C_SLAVE   1
#define I2CA   0x41
#define I2CB   0x42
#define I2C_TIMEOUT_VAL   1000
#define I2CA_SLAVE_ADDR   0x55
#define I2CB_SLAVE_ADDR   0x56
#define I2C_SPEED   0x1c
#define I2C_MASTER_MODE   0
#define I2C_SLAVE_MODE   1
#define MASTER_IDLE   0
#define MASTER_SEND   1
#define MASTER_WAIT_ACK   2
#define MASTER_RECV   3
#define MASTER_RECV_LAST   4
#define SLAVE_IDLE   0
#define SLAVE_SEND   1
#define SLAVE_RECV   2
#define MBUFLEN   10
#define SBUFLEN   10
#define I2C_NOT_PROCESSED   0
#define I2C_OK   1
#define I2C_BUSY   2
#define I2C_ERR   3
#define I2C_NACK_ON_DATA   4
#define I2C_NACK_ON_ADDRESS   5
#define I2C_ARBITRATION_LOST   6
#define I2C_TIME_OUT   7
#define I2C_NO_BUS   8
#define I2C_SLAVE_OBUF_EMPTY   1
#define I2C_SLAVE_IBUF_OVERFLOW   2
#define I2C_SLAVE_ERR   4

Functions

void I2C_inthandler (unsigned long minor)
 internal I2C interrupt handler. More...

void _I2C_master_handler (struct i2c *p)
 internal I2C master queue handler. More...

void _I2C_slave_handler (struct i2c *p)
 internal I2C slave handler. More...

int I2C_init (int which, unsigned long ioaddr)
 Initialize I2C. More...

int I2C_process (unsigned char whichBus, unsigned char whichQueue, struct i2cmess *msg)
 generic I2C processing function. More...

int I2C_messagestatus (struct i2cmess *msg)
 check the message status of an I2C message. More...

int I2C_scanbus (unsigned char whichBus)
 scan the I2C bus for devices. More...

void I2C_int_a (void)
void I2C_int_b (void)

Variables

i2c i2c []
 static host controller structure. More...


Detailed Description

Definition in file i2cd.h.


Define Documentation

#define I2C_ARBITRATION_LOST   6
 

Definition at line 66 of file i2cd.h.

Referenced by _I2C_master_handler, I2C_messagestatus, and I2C_Start_I2C_Transfer.

#define I2C_BUSY   2
 

Definition at line 62 of file i2cd.h.

#define I2C_ERR   3
 

Definition at line 63 of file i2cd.h.

Referenced by _I2C_master_handler, I2C_messagestatus, I2C_slprocess, and I2C_Start_I2C_Transfer.

#define I2C_MASTER   0
 

Definition at line 26 of file i2cd.h.

Referenced by I2C_ConfigureAnalog, I2C_init_analog, I2C_init_digital, I2C_process, I2C_ReadAnalogIn, I2C_ReadBinIn, I2C_scanbus, I2C_WriteAnalogOut, and I2C_WriteBinOut.

#define I2C_MASTER_MODE   0
 

Definition at line 37 of file i2cd.h.

Referenced by _I2C_master_handler, I2C_inthandler, and I2C_Start_I2C_Transfer.

#define I2C_NACK_ON_ADDRESS   5
 

Definition at line 65 of file i2cd.h.

Referenced by _I2C_master_handler, I2C_init_analog, I2C_init_digital, I2C_messagestatus, I2C_scanbus, and I2C_Start_I2C_Transfer.

#define I2C_NACK_ON_DATA   4
 

Definition at line 64 of file i2cd.h.

Referenced by _I2C_master_handler, I2C_messagestatus, I2C_scanbus, and I2C_Start_I2C_Transfer.

#define I2C_NO_BUS   8
 

Definition at line 68 of file i2cd.h.

Referenced by I2C_init_analog, I2C_init_digital, I2C_messagestatus, I2C_scanbus, I2C_slprocess, and I2C_Start_I2C_Transfer.

#define I2C_NOT_PROCESSED   0
 

Definition at line 60 of file i2cd.h.

Referenced by I2C_slprocess, and I2C_Start_I2C_Transfer.

#define I2C_OK   1
 

Definition at line 61 of file i2cd.h.

Referenced by _I2C_master_handler, I2C_ConfigureAnalog, I2C_init_analog, I2C_init_digital, I2C_messagestatus, I2C_scanbus, I2C_slprocess, I2C_Start_I2C_Transfer, I2C_WriteAnalogOut, and I2C_WriteBinOut.

#define I2C_SLAVE   1
 

Definition at line 27 of file i2cd.h.

#define I2C_SLAVE_ERR   4
 

Definition at line 74 of file i2cd.h.

Referenced by _I2C_slave_handler.

#define I2C_SLAVE_IBUF_OVERFLOW   2
 

Definition at line 73 of file i2cd.h.

Referenced by _I2C_slave_handler, and I2C_slprocess.

#define I2C_SLAVE_MODE   1
 

Definition at line 38 of file i2cd.h.

Referenced by _I2C_master_handler, GenerateStop, I2C_init, and I2C_Start_I2C_Transfer.

#define I2C_SLAVE_OBUF_EMPTY   1
 

Definition at line 72 of file i2cd.h.

Referenced by _I2C_slave_handler, and I2C_slprocess.

#define I2C_SPEED   0x1c
 

Definition at line 35 of file i2cd.h.

Referenced by I2C_init.

#define I2C_TIME_OUT   7
 

Definition at line 67 of file i2cd.h.

Referenced by _I2C_master_handler, I2C_init_analog, I2C_init_digital, I2C_messagestatus, I2C_scanbus, and I2C_Start_I2C_Transfer.

#define I2C_TIMEOUT_VAL   1000
 

Definition at line 32 of file i2cd.h.

Referenced by _I2C_master_handler.

#define I2CA   0x41
 

Definition at line 29 of file i2cd.h.

Referenced by I2C_init, I2C_init_analog, I2C_init_digital, I2C_slprocess, and I2C_Start_I2C_Transfer.

#define I2CA_SLAVE_ADDR   0x55
 

Definition at line 33 of file i2cd.h.

Referenced by I2C_init.

#define I2CB   0x42
 

Definition at line 30 of file i2cd.h.

Referenced by I2C_init, I2C_init_analog, and I2C_init_digital.

#define I2CB_SLAVE_ADDR   0x56
 

Definition at line 34 of file i2cd.h.

Referenced by I2C_init.

#define MASTER_IDLE   0
 

Definition at line 42 of file i2cd.h.

Referenced by _I2C_master_handler, GenerateStop, and I2C_init.

#define MASTER_RECV   3
 

Definition at line 45 of file i2cd.h.

Referenced by _I2C_master_handler.

#define MASTER_RECV_LAST   4
 

Definition at line 46 of file i2cd.h.

Referenced by _I2C_master_handler.

#define MASTER_SEND   1
 

Definition at line 43 of file i2cd.h.

Referenced by _I2C_master_handler.

#define MASTER_WAIT_ACK   2
 

Definition at line 44 of file i2cd.h.

Referenced by _I2C_master_handler.

#define MBUFLEN   10
 

Definition at line 55 of file i2cd.h.

Referenced by GenerateStop, I2C_init, and I2C_Start_I2C_Transfer.

#define SBUFLEN   10
 

Definition at line 56 of file i2cd.h.

Referenced by _I2C_slave_handler, and I2C_slprocess.

#define SLAVE_IDLE   0
 

Definition at line 50 of file i2cd.h.

Referenced by _I2C_slave_handler, I2C_init, and I2C_Start_I2C_Transfer.

#define SLAVE_RECV   2
 

Definition at line 52 of file i2cd.h.

Referenced by _I2C_slave_handler.

#define SLAVE_SEND   1
 

Definition at line 51 of file i2cd.h.

Referenced by _I2C_slave_handler.


Function Documentation

void I2C_int_a void   
 

Referenced by I2C_init.

void I2C_int_b void   
 

Referenced by I2C_init.


Variable Documentation

struct i2c i2c[]
 

static host controller structure.

Definition at line 126 of file i2cd.h.


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