none

Embed: (wiki syntax)

« Back to documentation index

PCF8575 Class Reference

PCF8575 Class Reference

Interface to the PCF8575 I2C 16 Bit IO expander. More...

#include <PCF8575.h>

Public Member Functions

 PCF8575 (PinName sda, PinName scl, int address)
 Create an instance of the PCF8575 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 PCF8575 I2C 16 Bit IO expander.

Definition at line 29 of file PCF8575.h.


Constructor & Destructor Documentation

PCF8575 ( PinName  sda,
PinName  scl,
int  address 
)

Create an instance of the PCF8575 connected to specfied I2C pins, with the specified address.

Parameters:
sdaThe I2C data pin
sclThe I2C clock pin
addressThe I2C address for this PCF8575

Definition at line 26 of file PCF8575.cpp.


Member Function Documentation

int read (  )

Read the IO pin level.

Returns:
The two bytes read

Definition at line 31 of file PCF8575.cpp.

void write ( int  data )

Write to the IO pins.

Parameters:
dataThe 16 bits to write to the IO port

Definition at line 38 of file PCF8575.cpp.