i2c.c File Reference

I2C generic driver functions (implementation). More...

#include "i2c.h"

Go to the source code of this file.


Functions

bool i2c_send (const void *_buf, size_t count)
 Send a sequence of bytes in master transmitter mode to the selected slave device through the I2C bus.
bool i2c_recv (void *_buf, size_t count)
 Receive a sequence of one or more bytes from the selected slave device in master receive mode through the I2C bus.

Detailed Description

I2C generic driver functions (implementation).

Version:
Id
i2c.c 2506 2009-04-15 08:29:07Z duplo
Author:
Francesco Sacchi <batt@develer.com>

Definition in file i2c.c.


Function Documentation

bool i2c_recv ( void *  _buf,
size_t  count 
)

Receive a sequence of one or more bytes from the selected slave device in master receive mode through the I2C bus.

Received data is placed in buf.

Note:
a NACK is automatically given on the last received byte.
Returns:
true on success, false on error

Definition at line 71 of file i2c.c.

bool i2c_send ( const void *  _buf,
size_t  count 
)

Send a sequence of bytes in master transmitter mode to the selected slave device through the I2C bus.

Returns:
true on success, false on error.

Definition at line 47 of file i2c.c.