New LiquidCrystal library 1.3.2 Generic LCD control library

- Main Page
- Related Pages
- Classes
- Files

- File List

/Users/fmalpartida/Documents/development/mercurial repos/SW/NewliquidCrystal/SI2CIO.h
1 // ---------------------------------------------------------------------------
2 // Created by Francisco Malpartida on 20/08/11.
3 // Copyright 2011 - Under creative commons license 3.0:
4 // Attribution-ShareAlike CC BY-SA
5 //
6 // This software is furnished "as is", without technical support, and with no
7 // warranty, express or implied, as to its usefulness for any purpose.
8 //
9 // Thread Safe: No
10 // Extendable: Yes
11 //
12 // @file SI2CIO.h
13 // This file implements a basic IO library using the PCF8574 I2C IO Expander
14 // chip, but using software I2C.
15 //
16 // @brief
17 // Implement a basic IO library to drive the PCF8574* I2C IO Expander ASIC.
18 // The library implements basic IO general methods to configure IO pin direction
19 // read and write uint8_t operations and basic pin level routines to set or read
20 // a particular IO port.
21 //
22 // @version API 1.0.0
23 //
24 // @author F. Malpartida - fmalpartida@gmail.com
25 // Adapted to SoftIC2 by Adrian Piccioli - adrianpiccioli@gmail.com
26 // ---------------------------------------------------------------------------
27
28 #ifndef _SI2CIO_H_
29 #define _SI2CIO_H_
30
31 #include <inttypes.h>
32
33 #define _SI2CIO_VERSION "1.0.0"
34
42 class SI2CIO
43 {
44 public:
50 SI2CIO ( );
51
63 int begin ( uint8_t i2cAddr );
64
74 void pinMode ( uint8_t pin, uint8_t dir );
75
84 void portMode ( uint8_t dir );
85
95 uint8_t read ( void );
96
109 uint8_t digitalRead ( uint8_t pin );
110
124 int write ( uint8_t value );
125
137 int digitalWrite ( uint8_t pin, uint8_t level );
138
139
140
141 private:
142 uint8_t _shadow; // Shadow output
143 uint8_t _dirMask; // Direction mask
144 uint8_t _i2cAddr; // I2C address
145 bool _initialised; // Initialised object
146
147 };
148
149 #endif
SI2CIO::digitalWrite
int digitalWrite(uint8_t pin, uint8_t level)
SI2CIO::write
int write(uint8_t value)
SI2CIO
Definition: SI2CIO.h:42
SI2CIO::portMode
void portMode(uint8_t dir)
SI2CIO::SI2CIO
SI2CIO()
SI2CIO::read
uint8_t read(void)
SI2CIO::pinMode
void pinMode(uint8_t pin, uint8_t dir)
SI2CIO::begin
int begin(uint8_t i2cAddr)
SI2CIO::digitalRead
uint8_t digitalRead(uint8_t pin)