C18 LaurTec Library  2.5
Open Source C Library for PIC18 Microcontrollers
LaurTec_c18_libraries_v_2.5/src/PCF8574.c File Reference
#include "PCF8574.h"

Go to the source code of this file.

Functions

signed char PCF8574_write_data (unsigned char control, unsigned char data)
signed char PCF8574_read_data (unsigned char control, unsigned char *data)

Function Documentation

signed char PCF8574_read_data ( unsigned char  control,
unsigned char *  data 
)

This function reads to the data Port of the I2C I/O expander.

Parameters:
controlIs the address of the PCF8574 (Internal Address + Pin address
dataAddress where the data is written into.
Returns:
status 1: The byte has been properly written -1: Bus Collision error -2: Not Ack error condition -3: Write collision

Definition at line 132 of file PCF8574.c.

signed char PCF8574_write_data ( unsigned char  control,
unsigned char  data 
)

This function writes to the data Port of the I2C I/O expander.

Parameters:
controlIs the address of the PCF8574 (Internal Address + Pin address)
dataByte to write [min: 0, max: 255]
Returns:
status 1: The byte has been properly written -1: Bus Collision error -2: Not Ack error condition -3: Write collision

Definition at line 46 of file PCF8574.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines