From 41ebc1a3f1e0adfce65643cb67577979ccb02043 Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Sat, 23 Sep 2023 20:13:03 +0200 Subject: [PATCH] 0.1.5 MCP23008 --- libraries/MCP23008/CHANGELOG.md | 6 +++++- libraries/MCP23008/CMakeLists.txt | 3 ++- libraries/MCP23008/MCP23008.cpp | 5 +---- libraries/MCP23008/MCP23008.h | 4 ++-- libraries/MCP23008/README.md | 24 ++++++++++++++++++++++++ libraries/MCP23008/keywords.txt | 4 +++- libraries/MCP23008/library.json | 4 ++-- libraries/MCP23008/library.properties | 2 +- 8 files changed, 40 insertions(+), 12 deletions(-) diff --git a/libraries/MCP23008/CHANGELOG.md b/libraries/MCP23008/CHANGELOG.md index 7feb6d6c..5a03b1be 100644 --- a/libraries/MCP23008/CHANGELOG.md +++ b/libraries/MCP23008/CHANGELOG.md @@ -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 diff --git a/libraries/MCP23008/CMakeLists.txt b/libraries/MCP23008/CMakeLists.txt index 8ade5ff7..e75cc43e 100644 --- a/libraries/MCP23008/CMakeLists.txt +++ b/libraries/MCP23008/CMakeLists.txt @@ -7,4 +7,5 @@ idf_component_register(SRCS "MCP23008.cpp" INCLUDE_DIRS "." REQUIRES arduino) -project(MCP23008) \ No newline at end of file +project(MCP23008) + diff --git a/libraries/MCP23008/MCP23008.cpp b/libraries/MCP23008/MCP23008.cpp index 7626771a..033b6ae3 100644 --- a/libraries/MCP23008/MCP23008.cpp +++ b/libraries/MCP23008/MCP23008.cpp @@ -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 @@ -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; @@ -364,7 +363,6 @@ int MCP23008::lastError() // // DEBUG // - uint8_t MCP23008::getPinMode8() { return readReg(0); @@ -375,7 +373,6 @@ uint8_t MCP23008::getPinMode8() // // PRIVATE // - bool MCP23008::writeReg(uint8_t reg, uint8_t value) { _wire->beginTransmission(_address); diff --git a/libraries/MCP23008/MCP23008.h b/libraries/MCP23008/MCP23008.h index c97434b8..9583e918 100644 --- a/libraries/MCP23008/MCP23008.h +++ b/libraries/MCP23008/MCP23008.h @@ -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 @@ -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 diff --git a/libraries/MCP23008/README.md b/libraries/MCP23008/README.md index 2e06c716..e40faf99 100644 --- a/libraries/MCP23008/README.md +++ b/libraries/MCP23008/README.md @@ -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 @@ -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, + diff --git a/libraries/MCP23008/keywords.txt b/libraries/MCP23008/keywords.txt index ef20294e..556a63bd 100644 --- a/libraries/MCP23008/keywords.txt +++ b/libraries/MCP23008/keywords.txt @@ -41,4 +41,6 @@ MCP23008_OK LITERAL1 MCP23008_PIN_ERROR LITERAL1 MCP23008_I2C_ERROR LITERAL1 MCP23008_VALUE_ERROR LITERAL1 -MCP23008_PORT_ERROR LITERAL1 \ No newline at end of file +MCP23008_PORT_ERROR LITERAL1 +MCP23008_INVALID_READ LITERAL1 + diff --git a/libraries/MCP23008/library.json b/libraries/MCP23008/library.json index 3cf58518..b9592bfa 100644 --- a/libraries/MCP23008/library.json +++ b/libraries/MCP23008/library.json @@ -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" } diff --git a/libraries/MCP23008/library.properties b/libraries/MCP23008/library.properties index cb71e8ea..8a5f6780 100644 --- a/libraries/MCP23008/library.properties +++ b/libraries/MCP23008/library.properties @@ -1,5 +1,5 @@ name=MCP23008 -version=0.1.4 +version=0.1.5 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino library for I2C MCP23008 8 channel port expander 8 IO-lines