#include <i2c.h>
Public Member Functions | |
| i2c (i2cio *io) | |
| ~i2c () | |
| bool | write (int addr, const unsigned char *buf, int nbytes) |
| true iff successful | |
| int | read (int addr, unsigned char *buf, int max_bytes) |
| number of bytes read or -1 if error | |
Private Member Functions | |
| void | start () |
| void | stop () |
| void | write_bit (bool bit) |
| bool | write_byte (char byte) |
| void | set_sda (bool bit) |
| void | set_scl (bool bit) |
| bool | get_sda () |
Private Attributes | |
| i2cio * | d_io |
|
|
i2c does not control lifetime of a_io |
|
|
|
|
|
|
|
||||||||||||||||
|
number of bytes read or -1 if error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
true iff successful
|
|
|
|
|
|
|
|
|
|
1.3.8