PCF8574 I2C IO Expander Interface
Dependents: PCF8574_HelloWorld PCF8574_I2C_4x4_Keypad PCF8574_I2C_4x4_Keypad_interface PCF8574_ButtonPress
PCF8574 Class Reference
Interface to the popular PCF8574 I2C 8 Bit IO expander. More...
#include <PCF8574.h>
Public Member Functions | |
PCF8574 (PinName sda, PinName scl, int address) | |
Create an instance of the PCF8574 connected to specfied I2C pins, with the specified address. | |
int | read () |
Read the IO pin level. | |
void | write (int data) |
Write to the IO pins. |
Detailed Description
Interface to the popular PCF8574 I2C 8 Bit IO expander.
Definition at line 29 of file PCF8574.h.
Constructor & Destructor Documentation
PCF8574 | ( | PinName | sda, |
PinName | scl, | ||
int | address | ||
) |
Create an instance of the PCF8574 connected to specfied I2C pins, with the specified address.
- Parameters:
-
sda The I2C data pin scl The I2C clock pin address The I2C address for this PCF8574
Definition at line 26 of file PCF8574.cpp.
Member Function Documentation
int read | ( | ) |
void write | ( | int | data ) |
Write to the IO pins.
- Parameters:
-
data The 8 bits to write to the IO port
Definition at line 37 of file PCF8574.cpp.
Generated on Thu Jul 14 2022 04:44:38 by 1.7.2