e_I2C_protocol.c File Reference

Manage I2C protocole. More...

#include "e_I2C_protocol.h"

Functions

void e_i2cp_init (void)
 Initialize the microcontroller for I2C uses.
void e_i2cp_enable (void)
 Enable special I2C interrupt.
void e_i2cp_disable (void)
 Disable special I2C interrupt.
char e_i2cp_read (char device_add, char reg)
 Read a specific register on a device.
char e_i2cp_write (char device_add, char reg, char value)
 Write a specific register on a device.


Detailed Description

Manage I2C protocole.

This module manage the I2C protocole. The function's module are made to directly send or receive data from or to a specified slave.

Warning:
This file must be include to communicate with an PO3030K camera throught the I2C communication protocol
Author:
Code: Davis Daidie
Doc: Jonathan Besuchet

Function Documentation

void e_i2cp_disable ( void   ) 

Disable special I2C interrupt.

Returns:
1 to confirme the oparation and 0 for an error

void e_i2cp_enable ( void   ) 

Enable special I2C interrupt.

Returns:
1 to confirme the oparation and 0 for an error

void e_i2cp_init ( void   ) 

Initialize the microcontroller for I2C uses.

Returns:
1 to confirme the oparation and 0 for an error

char e_i2cp_read ( char  device_add,
char  reg 
)

Read a specific register on a device.

Parameters:
device_add The address of the device you want information
reg The register address you want read on the device
Returns:
The readed value

char e_i2cp_write ( char  device_add,
char  reg,
char  value 
)

Write a specific register on a device.

Parameters:
device_add The address of the device you want information
reg The register address you want read on the device
value The data you want to write
Returns:
1 to confirme the oparation and 0 for an error


Generated on Fri Feb 29 14:26:54 2008 for e-puck by  doxygen 1.5.4