Little-Wire
Functions
I2C

Functions

void littleWire::i2c_init ()
void littleWire::i2c_beginTransmission (unsigned char address)
void littleWire::i2c_send (unsigned char message)
void littleWire::i2c_endTransmission ()
void littleWire::i2c_requestFrom (unsigned char address, unsigned char numBytes, unsigned char *responseBuffer)

Detailed Description

I2C functions.


Function Documentation

void littleWire::i2c_beginTransmission ( unsigned char  address)

Begin a read/write operation on I2C bus.

Parameters:
address7 bit slave address.
Returns:
(none)

End the I2C transmission.
Actually, all the messages will be sent at once when you call this function.

Returns:
(none)

Initialize the I2C module on the Little-Wire

Returns:
(none)
void littleWire::i2c_requestFrom ( unsigned char  address,
unsigned char  numBytes,
unsigned char *  responseBuffer 
)

Request a response from a slave device.

Parameters:
address7 bit slave address.
numBytesLength of the response you expect from the slave device.
responseBufferPointer of the array which you want to store I2C response messages.
Returns:
(none)
void littleWire::i2c_send ( unsigned char  message)

Add a message to output buffer.

Parameters:
messageMessage to send.
Returns:
(none)
 All Classes Functions