Guillaume Fricker / KS0108_PCF8574

Dependencies:   BusEnums

Dependents:   Menu

Embed: (wiki syntax)

« Back to documentation index

PCF8574_DataBus Class Reference

PCF8574_DataBus Class Reference

Create an PCF8574_DataBus object connected to the specified I2C object and using the specified deviceAddress. More...

#include <PCF8574_DataBus.h>

Public Member Functions

 PCF8574_DataBus (I2C &i2c, char deviceAddress)
 Create an PCF8574_DataBus object connected to the specified I2C object and using the specified deviceAddress.
char read ()
 Optimised DataBus read operation.
void write (char byte)
 Optimised DataBus write operation.
void busdir (Bus_Dir bus_dir)
 Enable databus for Write or Read.

Protected Member Functions

void _init ()
 Init PCF8574_DataBus.

Detailed Description

Create an PCF8574_DataBus object connected to the specified I2C object and using the specified deviceAddress.

Parameters:
I2C&i2c the I2C port to connect to
chardeviceAddress the address of the PCF8574

Definition at line 32 of file PCF8574_DataBus.h.


Constructor & Destructor Documentation

PCF8574_DataBus ( I2C &  i2c,
char  deviceAddress 
)

Create an PCF8574_DataBus object connected to the specified I2C object and using the specified deviceAddress.

Parameters:
I2C&i2c the I2C port to connect to
chardeviceAddress the address of the PCF8574

Definition at line 17 of file PCF8574_DataBus.cpp.


Member Function Documentation

void _init (  ) [protected]

Init PCF8574_DataBus.

Parameters:
@returns

Definition at line 87 of file PCF8574_DataBus.cpp.

void busdir ( Bus_Dir  bus_dir )

Enable databus for Write or Read.

Parameters:
Bus_Dirbus_dir

Definition at line 60 of file PCF8574_DataBus.cpp.

char read (  )

Optimised DataBus read operation.

Returns:
current data from Databus

Definition at line 40 of file PCF8574_DataBus.cpp.

void write ( char  byte )

Optimised DataBus write operation.

Parameters:
bytethe datavalue to output on the bus

Definition at line 26 of file PCF8574_DataBus.cpp.