i2c.c File Reference

#include "i2c.h"

Functions

void i2c_timerproc (void)
uint8_t read_i2c_device (uint8_t address, uint8_t bytes_to_read, uint8_t *data)
 Read 1 or more bytes from an I2C device to memory.
uint8_t write_i2c_device (uint8_t address, uint8_t bytes, uint8_t *data)
 Write 1 or more bytes to an I2C device from memory.

Function Documentation

void i2c_timerproc ( void   ) 

uint8_t read_i2c_device ( uint8_t  address,
uint8_t  bytes,
uint8_t *  data 
)

Read 1 or more bytes from an I2C device to memory.

Parameters:
address Address if I2C device. The bottom bit is set to enfoce an I2C read.
bytes Number of bytes to be returned.
*data Pointer to location to store values returned.
Returns:
returns error code generated from I2C transaction. Currently always returns 0.

uint8_t write_i2c_device ( uint8_t  address,
uint8_t  bytes,
uint8_t *  data 
)

Write 1 or more bytes to an I2C device from memory.

Parameters:
address Address if I2C device. The bottom bit is cleared to enforce an I2C write.
bytes Number of bytes to be sent.
*data Pointer to location in memory of first byte of set of data.
Returns:
returns error code generated from I2C transaction. Currently always returns 0.


Generated on Wed Nov 10 11:54:59 2010 by  doxygen 1.5.8