Skip to content

Commit

Permalink
Develop (#33)
Browse files Browse the repository at this point in the history
* add CHANGELOG.md, fix int param in begin()
  • Loading branch information
RobTillaart authored Apr 11, 2022
1 parent ef59705 commit d60077e
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 45 deletions.
102 changes: 102 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Change Log PCF8574

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.3.4] - 2022-04-11

### Added
- add CHANGELOG.md

### Changed

### Fixed
- **begin(int sda, int scl)** int parameters for ESP alike.


## [0.3.3] - 2021-12-23

### Changed
- update library.json, license, readme, minor edits


## [0.3.2] - 2021-07-04

### Added
- fix #25 add setAddress()


## [0.3.1] - 2021-04-23

### Fixed
- Fix for platformIO compatibility


## [0.3.0] - 2021-01-03

### Added
- multiWire support - inspired by mattbue - issue #14


## [0.2.4] - 2020-12-17
- fix #6 tag problem 0.2.3

## [0.2.3] - 2020-12-14
- fix #6 readButton8 ambiguity

## [0.2.2] - 2020-12-07
- add Arduino-ci + start unit test + _wire->h in PCF8574.h

## [0.2.1] - 2020-06-19
- fix library.json

## [0.2.0] - 2020-05-22
- #pragma once; refactor;
- removed pre 1.0 support
- added begin(dsa, scl) for ESP32
- added reverse()

## [0.1.9] - 2017-02-27
- fix warning about return in readButton8()

## [0.1.08] - 2016-05-20'
- Merged work of Septillion
- Fix/refactor ButtonRead8() - see https://github.com/RobTillaart/Arduino/issues/38
- missing begin() => mask parameter

## [0.1.07] - 2016-05-02
- (manually merged) Septillion
- added dataOut so a write() doesn't read first,
possibly corrupting a input pin;
- fixed shift comment, should read 1..7;
- added begin() to be sure it's in a known state,
states could be different if uC is reset and the PCF8574 isn't;
- added buttonRead() and buttonRead8()
which only effect the output while reading

## [0.1.06] - ??
- (intermediate) added defined errors + refactor rotate

## [0.1.05] - 2016-04-30
- refactor, +toggleMask, +rotLeft, +rotRight

## [0.1.04] - 2015-05-09
- removed ambiguity in read8()

## [0.1.03] - 2015-03-02
- address int -> uint8_t

## [0.1.02] - ?
- replaced integers with uint8_t to reduce footprint;
- added default value for shiftLeft() and shiftRight()
- renamed status() to lastError();

## [0.1.01] - ?
- added value(); returns last read 8 bit value (cached);
value() does not always reflect the latest state of the pins!

## [0.1.00] - 2013-02-02
- initial version
40 changes: 2 additions & 38 deletions PCF8574.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,12 @@
// FILE: PCF8574.cpp
// AUTHOR: Rob Tillaart
// DATE: 02-febr-2013
// VERSION: 0.3.3
// VERSION: 0.3.4
// PURPOSE: Arduino library for PCF8574 - 8 channel I2C IO expander
// URL: https://github.com/RobTillaart/PCF8574
// http://forum.arduino.cc/index.php?topic=184800
//
// HISTORY:
//
// 0.3.3 2021-12-23 update library.json, license, readme, minor edits
// 0.3.2 2021-07-04 fix #25 add setAddress()
// 0.3.1 2021-04-23 Fix for platformIO compatibility
// 0.3.0 2021-01-03 multiWire support - inspired by mattbue - issue #14
// 0.2.4 2020-12-17 fix #6 tag problem 0.2.3
// 0.2.3 2020-12-14 fix #6 readButton8 ambiguity
// 0.2.2 2020-12-07 add Arduino-ci + start unit test + _wire->h in PCF8574.h
// 0.2.1 2020-06-19 fix library.json
// 0.2.0 2020-05-22 #pragma once; refactor;
// removed pre 1.0 support
// added begin(dsa, scl) for ESP32
// added reverse()
//
// 0.1.9 2017-02-27 fix warning about return in readButton8()
// 0.1.08 2016-05-20 Merged work of Septillion
// Fix/refactor ButtonRead8() - see https://github.com/RobTillaart/Arduino/issues/38
// missing begin() => mask parameter
// 0.1.07 2016-05-02 (manually merged) Septillion
// added dataOut so a write() doesn't read first,
// possibly corrupting a input pin;
// fixed shift comment, should read 1..7;
// added begin() to be sure it's in a known state,
// states could be different if uC is reset and the PCF8574 isn't;
// added buttonRead() and buttonRead8()
// which only effect the output while reading
// 0.1.06 (intermediate) added defined errors + refactor rotate
// 0.1.05 2016-04-30 refactor, +toggleMask, +rotLeft, +rotRight
// 0.1.04 2015-05-09 removed ambiguity in read8()
// 0.1.03 2015-03-02 address int -> uint8_t
// 0.1.02 replaced integers with uint8_t to reduce footprint;
// added default value for shiftLeft() and shiftRight()
// renamed status() to lastError();
// 0.1.01 added value(); returns last read 8 bit value (cached);
// value() does not always reflect the latest state of the pins!
// 0.1.00 initial version
// HISTORY: See CHANGELOG.md
//

#include "PCF8574.h"
Expand Down
4 changes: 2 additions & 2 deletions PCF8574.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FILE: PCF8574.h
// AUTHOR: Rob Tillaart
// DATE: 02-febr-2013
// VERSION: 0.3.3
// VERSION: 0.3.4
// PURPOSE: Arduino library for PCF8574 - 8 channel I2C IO expander
// URL: https://github.com/RobTillaart/PCF8574
// http://forum.arduino.cc/index.php?topic=184800
Expand All @@ -17,7 +17,7 @@
#include "Wire.h"


#define PCF8574_LIB_VERSION (F("0.3.3"))
#define PCF8574_LIB_VERSION (F("0.3.4"))

#ifndef PCF8574_INITIAL_VALUE
#define PCF8574_INITIAL_VALUE 0xFF
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ the include of "pcf8574.h" to overrule the default value used with the **begin()
- **PCF8574(uint8_t deviceAddress = 0x20, TwoWire \*wire = &Wire)** Constructor with optional device address, default 0x20,
and the optional Wire interface as parameter.
- **bool begin(uint8_t value = PCF8574_INITIAL_VALUE)** set the initial value for the pins and masks.
- **bool begin(uint8_t sda, uint8_t scl, uint8_t value = PCF8574_INITIAL_VALUE)** idem, for the ESP32 where one can choose the I2C pins.
- **bool begin(int sda, int scl, uint8_t value = PCF8574_INITIAL_VALUE)** idem, for the ESP32 where one can choose the I2C pins.
- **bool isConnected()** checks if the address set in the constructor or by **setAddress()** is visible on the I2C bus.
- **bool setAddress(const uint8_t deviceAddress)** sets the device address after construction.
Can be used to switch between PCF8574 modules runtime. Note this corrupts internal buffered values,
Expand Down Expand Up @@ -116,6 +116,6 @@ It is advised to use pull-up or pull-down resistors so the lines have a defined

## Future

- update documentation
- link to related libraries.
-


2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/PCF8574.git"
},
"version": "0.3.3",
"version": "0.3.4",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=PCF8574
version=0.3.3
version=0.3.4
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=Arduino library for PCF8574 - 8 channel I2C IO expander
Expand Down

0 comments on commit d60077e

Please sign in to comment.