PU2CLR PCF8574 Arduino Library  1.0.3
Arduino Library for PCF8574 Device - By Ricardo Lima Caratti
PCF8574 input/output functions

Functions

bool PCF::error ()
 Returns the last wrire or read status. More...
 
uint8_t PCF::read ()
 Gets the corrent register information. More...
 
void PCF::write (uint8_t value)
 Sets a value to a given register. More...
 
uint8_t PCF::digitalRead (uint8_t port)
 Reads a given port content (HIGH or LOW) More...
 
void PCF::digitalWrite (uint8_t port, uint8_t value)
 Writes HIGH or LOW in a given port (pin) More...
 

Detailed Description

Function Documentation

◆ error()

bool PCF::error ( )
inline

Returns the last wrire or read status.

Return false when the last read or write operation is not ok

Returns
true or false

References PCF::io_error.

◆ read()

uint8_t PCF::read ( )

Gets the corrent register information.

Gets the current register content.

Returns
uint8_t current gpio value

References PCF::io_error.

◆ write()

void PCF::write ( uint8_t  value)

Sets a value to a given register.

Sets a given 8 bit value to a given register.

Parameters
valuevalue (8 bits)

References PCF::io_error.

◆ digitalRead()

uint8_t PCF::digitalRead ( uint8_t  port)

Reads a given port content (HIGH or LOW)

Returns the value or the bit in a given pin (port)

Parameters
port
Returns
uint8_t

◆ digitalWrite()

void PCF::digitalWrite ( uint8_t  port,
uint8_t  value 
)

Writes HIGH or LOW in a given port (pin)

Turns a given port High or LOW

Parameters
port
value