This library contains functions for communicating to I2C devices via user specified port pins.
For detailed information on the DS80C400 please see the High-Speed Microcontroller User's Guide: DS80C400 Supplement.
Go to the source code of this file.
Defines | |
| #define | TINI_I2C_VERSION 1 |
| #define | I2C_SDA P3_4 |
| #define | I2C_SCL P3_5 |
| #define | I2C_ENABLE_SCL_WAIT_FOR_SLOW_SLAVES 0 |
| #define | I2C_MAXIMUM_SCL_WAITCOUNT 10000 |
| #define | I2C_DELAY_LOOP_COUNT 0 |
Functions | |
| int | i2c_version () |
| Return the library version. | |
| void | i2c_delay (void) |
| Delay function. | |
| void | i2c_start (void) |
| Performs an I2C start condition. | |
| void | i2c_bit (unsigned char singlebit) |
| Performs an I2C bit write. | |
| unsigned char | i2c_readbit (void) |
| Performs an I2C bit read. | |
| void | i2c_stop (void) |
| Performs an I2C stop condition. | |
| unsigned char | i2c_readbyte (unsigned char doACK) |
| Performs an I2C byte read. | |
| unsigned char | i2c_writebyte (unsigned char singlebyte) |
| Performs an I2C byte write. | |
| unsigned char | i2c_select (unsigned char address) |
| Perform I2C start, address selection. | |
| unsigned char | i2c_writeblock (unsigned char address, unsigned char *barr, int length) |
| Perform I2C start, address selection, write specified bytes and I2C stop. | |
| unsigned char | i2c_readblock (unsigned char address, unsigned char *barr, int length) |
| Perform I2C start, address selection, read specified number of bytes and I2C stop. | |
| unsigned char | i2c_writereadblock (unsigned char address, unsigned char *barr1, int length1, unsigned char *barr2, int length2) |
| Perform I2C start, address selection, write specified bytes, I2C start, address slection, read bytes and I2C stop. | |
|
|
Number of loops to wait between any host SCL and SDA transitions |
|
|
Enable communication with slow slave devices. Value of 1 enables SCL waiting/flow control. |
|
|
Number of loops to wait for SCL to return high if SCL flow control is used. |
|
|
Define SCL (clock) line to talk to the DS1672 on the TINIm400 |
|
|
Define SDA (data) line to talk to the DS1672 on the TINIm400 |
|
|
Version number associated with this header file. Should be the same as the version number returned by the i2c_version function.
|
|
|
Performs an I2C bit write.
|
|
|
Delay function.
|
|
|
Performs an I2C bit read.
|
|
||||||||||||||||
|
Perform I2C start, address selection, read specified number of bytes and I2C stop.
|
|
|
Performs an I2C byte read.
|
|
|
Perform I2C start, address selection.
|
|
|
Performs an I2C start condition.
|
|
|
Performs an I2C stop condition.
|
|
|
Return the library version.
|
|
||||||||||||||||
|
Perform I2C start, address selection, write specified bytes and I2C stop.
|
|
|
Performs an I2C byte write.
|
|
||||||||||||||||||||||||
|
Perform I2C start, address selection, write specified bytes, I2C start, address slection, read bytes and I2C stop.
|
| Copyright 2004 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |