pcf8574.h File Reference

PCF8574 i2c port expander driver (interface). More...

#include <cfg/compiler.h>

Go to the source code of this file.


Data Structures

struct  Pcf8574
 Context for accessing a PCF8574. More...

Defines

#define PCF8574ID   0x40
 I2C address.

Functions

int pcf8574_get (Pcf8574 *pcf)
 Read PCF8574 pcf bit status.
bool pcf8574_put (Pcf8574 *pcf, uint8_t data)
 Write to PCF8574 pcf port data.
bool pcf8574_init (Pcf8574 *pcf, pcf8574_addr addr)
 Init a PCF8574 on the bus with addr addr.

Detailed Description

PCF8574 i2c port expander driver (interface).

Version:
Id
ft245rl.c 22301 2008-09-09 16:53:17Z batt
Author:
Francesco Sacchi <batt@develer.com>

Definition in file pcf8574.h.


Function Documentation

int pcf8574_get ( Pcf8574 pcf  ) 

Read PCF8574 pcf bit status.

Returns:
the pins status or EOF on errors.

Definition at line 55 of file pcf8574.c.

bool pcf8574_init ( Pcf8574 pcf,
pcf8574_addr  addr 
)

Init a PCF8574 on the bus with addr addr.

Returns:
true if device is found, false otherwise.

Definition at line 80 of file pcf8574.c.

bool pcf8574_put ( Pcf8574 pcf,
uint8_t  data 
)

Write to PCF8574 pcf port data.

Returns:
true if ok, false on errors.

Definition at line 69 of file pcf8574.c.