Skip to content

Commit

Permalink
Add Wire1 support for ESP32
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Sep 23, 2023
1 parent ba65689 commit 887fed0
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.3.9] - 2023-09-23
- Add Wire1 support for ESP32
- update readme.md
- minor edits


## [0.3.8] - 2023-02-04
- update readme.md
- update GitHub actions
- update license 2023


## [0.3.7] - 2022-11-16
- fix #40 - add interrupt section to readme.md

Expand Down
5 changes: 2 additions & 3 deletions PCF8574.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// FILE: PCF8574.cpp
// AUTHOR: Rob Tillaart
// DATE: 02-febr-2013
// VERSION: 0.3.8
// VERSION: 0.3.9
// 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 @@ -25,7 +25,6 @@ PCF8574::PCF8574(const uint8_t deviceAddress, TwoWire *wire)
#if defined (ESP8266) || defined(ESP32)
bool PCF8574::begin(int dataPin, int clockPin, uint8_t value)
{
_wire = &Wire;
if ((dataPin < 255) && (clockPin < 255))
{
_wire->begin(dataPin, clockPin);
Expand Down Expand Up @@ -230,7 +229,7 @@ void PCF8574::select(const uint8_t pin)
};


void PCF8574::selectN(const uint8_t pin)
void PCF8574::selectN(const uint8_t pin)
{
uint8_t n = 0xFF;
if (pin < 8) n = (2 << pin) - 1;
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.8
// VERSION: 0.3.9
// 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 @@ -13,7 +13,7 @@
#include "Wire.h"


#define PCF8574_LIB_VERSION (F("0.3.8"))
#define PCF8574_LIB_VERSION (F("0.3.9"))

#ifndef PCF8574_INITIAL_VALUE
#define PCF8574_INITIAL_VALUE 0xFF
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
[![Arduino CI](https://github.com/RobTillaart/PCF8574/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
[![Arduino-lint](https://github.com/RobTillaart/PCF8574/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/PCF8574/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/PCF8574/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/PCF8574/actions/workflows/jsoncheck.yml)
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/PCF8574.svg)](https://github.com/RobTillaart/PCF8574/issues)

[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/PCF8574/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RobTillaart/PCF8574.svg?maxAge=3600)](https://github.com/RobTillaart/PCF8574/releases)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/PCF8574.svg)](https://registry.platformio.org/libraries/robtillaart/PCF8574)


# PCF8574
Expand Down Expand Up @@ -195,3 +198,11 @@ It is advised to use pull-up or pull-down resistors so the lines have a defined
#### Wont


## Support

If you appreciate my libraries, you can support the development and maintenance.
Improve the quality of the libraries by providing issues and Pull Requests, or
donate through PayPal or GitHub sponsors.

Thank you,

1 change: 1 addition & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ selectAll KEYWORD2

# Constants ( LITERAL1)
PCF8574_LIB_VERSION LITERAL1

PCF8574_INITIAL_VALUE LITERAL1
PCF8574_OK LITERAL1
PCF8574_PIN_ERROR LITERAL1
Expand Down
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"type": "git",
"url": "https://github.com/RobTillaart/PCF8574.git"
},
"version": "0.3.8",
"version": "0.3.9",
"license": "MIT",
"frameworks": "arduino",
"frameworks": "*",
"platforms": "*",
"headers": "PCF8574.h"
}
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.8
version=0.3.9
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 887fed0

Please sign in to comment.