|
| TWI () |
|
void | acquire (TWI::Driver *dev) |
|
void | release () |
|
bool | write_request (void *buf, size_t size) |
|
bool | write_request (uint8_t header, void *buf, size_t size) |
|
bool | write_request (uint16_t header, void *buf, size_t size) |
|
bool | read_request (void *buf, size_t size) |
|
int | write (void *buf, size_t size) |
|
int | write (uint8_t header, void *buf=0, size_t size=0) |
|
int | write (uint16_t header, void *buf=0, size_t size=0) |
|
int | read (void *buf, size_t size) |
|
int | await_completed () |
|
void | set_freq (uint32_t hz) |
|
void | powerup () |
|
void | powerdown () |
|
Two wire library. Support for the I2C/TWI bus Master and Slave device drivers. Single-ton, twi, holds bus interaction state. Supporting classes TWI::Driver for device drivers, TWI::Slave for slave devices.
Circuit
TWI slave circuit with internal pullup resistors (4K7). Note that Tiny uses USI but the software interface is the same.
+------------+
(A4/SDA)------------1-|SDA |
(A5/SCL)------------2-|SCL |
(EXTn/PCIn)---------3-|IRQ(opt) |
(VCC)---------------4-|VCC |
(GND)---------------5-|GND |
+------------+
Definition at line 51 of file TWI.hh.