Contiki 3.x
Functions
i2c.h File Reference

I2C bus master driver for mbxxx platform. More...

Go to the source code of this file.

Functions

void i2c_enable (void)
 Configure serial controller in I2C mode and set I2C speed.
 
void i2c_disable (void)
 Configure serial controller in disabled mode.
 
void i2c_start (void)
 Generate I2C START condition.
 
void i2c_stop (void)
 Generate I2C STOP condition.
 
void i2c_write (uint8_t data)
 Send a byte to I2C bus. More...
 
uint8_t i2c_read (int ack)
 Read a byte from I2C bus. More...
 

Detailed Description

I2C bus master driver for mbxxx platform.

Author
Maria Laura Stefanizzi laura.nosp@m.2858.nosp@m.2@gma.nosp@m.il.c.nosp@m.om
Date
2013-11-20

Definition in file i2c.h.

Function Documentation

uint8_t i2c_read ( int  ack)

Read a byte from I2C bus.

Parameters
ackIf true enable ACK generation after byte reception
Returns
The received byte

Definition at line 121 of file i2c.c.

void i2c_write ( uint8_t  data)

Send a byte to I2C bus.

Parameters
dataThe data that must be sent

Definition at line 106 of file i2c.c.

Referenced by eeprom_read(), and eeprom_write().