Skip to content

Commit

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


## [0.1.5] - 2023-09-23
- add Wire1 support for ESP32
- update readme.md


## [0.1.4] - 2023-06-20
- add CMakeLists.txt #8
- add debug function **uint8_t getPinMode8()**
- add keywords.txt
- update examples


## [0.1.3] - 2023-02-04
- update readme.md
- update GitHub actions
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ idf_component_register(SRCS "MCP23008.cpp"
INCLUDE_DIRS "."
REQUIRES arduino)

project(MCP23008)
project(MCP23008)

5 changes: 1 addition & 4 deletions MCP23008.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: MCP23008.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.1.4
// VERSION: 0.1.5
// PURPOSE: Arduino library for I2C MCP23008 8 channel port expander
// DATE: 2019-10-12
// URL: https://github.com/RobTillaart/MCP23008
Expand Down Expand Up @@ -35,7 +35,6 @@ MCP23008::MCP23008(uint8_t address, TwoWire *wire)
#if defined(ESP8266) || defined(ESP32)
bool MCP23008::begin(const uint8_t dataPin, const uint8_t clockPin)
{
_wire = &Wire;
_wire->begin(dataPin, clockPin);
// check connected
if (! isConnected()) return false;
Expand Down Expand Up @@ -364,7 +363,6 @@ int MCP23008::lastError()
//
// DEBUG
//

uint8_t MCP23008::getPinMode8()
{
return readReg(0);
Expand All @@ -375,7 +373,6 @@ uint8_t MCP23008::getPinMode8()
//
// PRIVATE
//

bool MCP23008::writeReg(uint8_t reg, uint8_t value)
{
_wire->beginTransmission(_address);
Expand Down
4 changes: 2 additions & 2 deletions MCP23008.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// FILE: MCP23008.h
// AUTHOR: Rob Tillaart
// VERSION: 0.1.4
// VERSION: 0.1.5
// PURPOSE: Arduino library for I2C MCP23008 8 channel port expander
// DATE: 2022-01-10
// URL: https://github.com/RobTillaart/MCP23008
Expand All @@ -12,7 +12,7 @@
#include "Wire.h"


#define MCP23008_LIB_VERSION (F("0.1.4"))
#define MCP23008_LIB_VERSION (F("0.1.5"))

#define MCP23008_OK 0x00
#define MCP23008_PIN_ERROR 0x81
Expand Down
24 changes: 24 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/MCP23008/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
[![Arduino-lint](https://github.com/RobTillaart/MCP23008/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/MCP23008/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/MCP23008/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/MCP23008/actions/workflows/jsoncheck.yml)
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/MCP23008.svg)](https://github.com/RobTillaart/MCP23008/issues)

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


# MCP23008
Expand Down Expand Up @@ -100,5 +103,26 @@ See examples.

## Future

#### Must

- improve documentation

#### Should

- keep in sync with MCP23017


#### Could


#### 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,

4 changes: 3 additions & 1 deletion keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ MCP23008_OK LITERAL1
MCP23008_PIN_ERROR LITERAL1
MCP23008_I2C_ERROR LITERAL1
MCP23008_VALUE_ERROR LITERAL1
MCP23008_PORT_ERROR LITERAL1
MCP23008_PORT_ERROR LITERAL1
MCP23008_INVALID_READ LITERAL1

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/MCP23008.git"
},
"version": "0.1.4",
"version": "0.1.5",
"license": "MIT",
"frameworks": "arduino",
"frameworks": "*",
"platforms": "*",
"headers": "MCP23008.h"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=MCP23008
version=0.1.4
version=0.1.5
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for I2C MCP23008 8 channel port expander 8 IO-lines
Expand Down

0 comments on commit e7a73a7

Please sign in to comment.