#include <PCF8574.h>
Definition at line 236 of file PCF8574.h.
PCF8574A::PCF8574A |
( |
TWI & |
twi, |
|
|
uint8_t |
subaddr = 7 |
|
) |
| |
|
inline |
Construct connection to PCF8574A Remote 8-bit I/O expander with given sub-address.
- Parameters
-
[in] | twi | bus manager. |
[in] | subaddr | sub-address (0..7, default 7). |
Definition at line 244 of file PCF8574.h.
bool TWI::Device::acquire |
( |
| ) |
|
|
inlineinherited |
Start transaction. Return true(1) if successful otherwise false(0).
- Returns
- bool.
Definition at line 52 of file TWI.h.
Get data direction for port; 0 for output, 1 for input.
- Returns
- data direction.
Definition at line 64 of file PCF8574.h.
void PCF8574::ddr |
( |
uint8_t |
ddr | ) |
|
|
inlineinherited |
Set data direction for port pin P0..P7; 0 for output, 1 for input.
- Parameters
-
[in] | ddr | data direction mask. |
Definition at line 73 of file PCF8574.h.
uint8_t PCF8574::port |
( |
| ) |
|
|
inlineinherited |
Get data port values.
- Returns
- port value.
Definition at line 99 of file PCF8574.h.
int TWI::Device::read |
( |
void * |
buf, |
|
|
size_t |
count |
|
) |
| |
|
inlineinherited |
Read data from device to given buffer.
- Parameters
-
[in] | buf | buffer pointer. |
[in] | count | buffer size in bytes. |
- Returns
- number of bytes read or negative error code.
Definition at line 73 of file TWI.h.
uint8_t PCF8574::read |
( |
| ) |
|
|
inlineinherited |
Read pins and return current values.
- Returns
- input pin values.
Definition at line 86 of file PCF8574.h.
bool TWI::Device::release |
( |
| ) |
|
|
inlineinherited |
Stop transaction. Return true(1) if successful otherwise false(0).
- Returns
- bool.
Definition at line 62 of file TWI.h.
int TWI::Device::write |
( |
const void * |
buf, |
|
|
size_t |
count |
|
) |
| |
|
inlineinherited |
Write data from the given buffer to device.
- Parameters
-
[in] | buf | buffer pointer. |
[in] | count | buffer size in bytes. |
- Returns
- number of bytes written or negative error code.
Definition at line 84 of file TWI.h.
int TWI::Device::write |
( |
iovec_t * |
vp | ) |
|
|
inlineinherited |
Write data to device with from given io vector.
- Parameters
-
- Returns
- number of bytes written or negative error code.
Definition at line 94 of file TWI.h.
void PCF8574::write |
( |
uint8_t |
value | ) |
|
|
inlineinherited |
Write given value to the output pins.
- Parameters
-
[in] | value | to write to port. |
Definition at line 108 of file PCF8574.h.
void PCF8574::write |
( |
void * |
buf, |
|
|
size_t |
size |
|
) |
| |
|
inlineinherited |
Write given values to the output pins.
- Parameters
-
[in] | buf | pointer to data to write to device. |
[in] | size | of buffer. |
Definition at line 121 of file PCF8574.h.
uint8_t TWI::Device::m_addr |
|
protectedinherited |
Data Direction Register, 0 = output, 1 = input.
Definition at line 217 of file PCF8574.h.
Port Register to mask and maintain output pin values.
Definition at line 220 of file PCF8574.h.
Two-Wire Interface Manager.
Definition at line 101 of file TWI.h.
The documentation for this class was generated from the following file: