From d80140f4ec037023b5896309631191550e9e7da5 Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Wed, 15 Nov 2023 11:50:44 +0100 Subject: [PATCH] 0.1.9 PinInGroup --- libraries/PinInGroup/CHANGELOG.md | 11 +++++--- libraries/PinInGroup/PinInGroup.cpp | 2 +- libraries/PinInGroup/PinInGroup.h | 6 ++--- libraries/PinInGroup/README.md | 34 ++++++++++++++++++++----- libraries/PinInGroup/library.json | 4 +-- libraries/PinInGroup/library.properties | 4 +-- 6 files changed, 43 insertions(+), 18 deletions(-) diff --git a/libraries/PinInGroup/CHANGELOG.md b/libraries/PinInGroup/CHANGELOG.md index 199b65f9..cdb67fc9 100644 --- a/libraries/PinInGroup/CHANGELOG.md +++ b/libraries/PinInGroup/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.1.9] - 2023-11-15 +- update readme.md + + ## [0.1.8] - 2022-11-22 - add changelog.md - add RP2040 in build @@ -14,8 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - update unit test - add PININGROUP_ERROR_PIN - -## [0.1.7] - 2022-08-04 +## [0.1.7] - 2022-08-04 - fix getIdx() to fix build-CI. ## [0.1.6] - 2021-12-23 @@ -23,7 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - update license - minor edits. -## [0.1.5] - 2021-11-12 +## [0.1.5] - 2021-11-12 - update build-CI - update readme, badges - rename variables for readability, @@ -43,7 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [0.1.1] - 2020-05-19 - refactor - add clear() -- add param for INPUT or INPUT_PULLUP +- add parameter for INPUT or INPUT_PULLUP ## [0.1.0] - 2017-08-20 - initial version (based upon pinGroup) diff --git a/libraries/PinInGroup/PinInGroup.cpp b/libraries/PinInGroup/PinInGroup.cpp index bbc60ef8..82060660 100644 --- a/libraries/PinInGroup/PinInGroup.cpp +++ b/libraries/PinInGroup/PinInGroup.cpp @@ -1,7 +1,7 @@ // // FILE: PinInGroup.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.1.8 +// VERSION: 0.1.9 // DATE: 2017-04-26 // PURPOSE: PinInGroup library for Arduino // goal is to easily read a group of pins that logically diff --git a/libraries/PinInGroup/PinInGroup.h b/libraries/PinInGroup/PinInGroup.h index 45aa4a1e..e61dca20 100644 --- a/libraries/PinInGroup/PinInGroup.h +++ b/libraries/PinInGroup/PinInGroup.h @@ -1,7 +1,7 @@ #pragma once // FILE: PinInGroup.h -// AUTHOR: Rob dot Tillaart at gmail dot com -// VERSION: 0.1.8 +// AUTHOR: Rob Tillaart +// VERSION: 0.1.9 // DATE: 2017-04-26 // PURPOSE: PinInGroup library for Arduino // @@ -12,7 +12,7 @@ #include "Arduino.h" -#define PININGROUP_LIB_VERSION (F("0.1.8")) +#define PININGROUP_LIB_VERSION (F("0.1.9")) // smaller MAXSIZE will reduce memory footprint with ditto bytes. diff --git a/libraries/PinInGroup/README.md b/libraries/PinInGroup/README.md index b06fe5e0..a7a11b3e 100644 --- a/libraries/PinInGroup/README.md +++ b/libraries/PinInGroup/README.md @@ -2,8 +2,11 @@ [![Arduino CI](https://github.com/RobTillaart/PinInGroup/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci) [![Arduino-lint](https://github.com/RobTillaart/PinInGroup/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/PinInGroup/actions/workflows/arduino-lint.yml) [![JSON check](https://github.com/RobTillaart/PinInGroup/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/PinInGroup/actions/workflows/jsoncheck.yml) +[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/PinInGroup.svg)](https://github.com/RobTillaart/PinInGroup/issues) + [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/PinInGroup/blob/master/LICENSE) [![GitHub release](https://img.shields.io/github/release/RobTillaart/PinInGroup.svg?maxAge=3600)](https://github.com/RobTillaart/PinInGroup/releases) +[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/PinInGroup.svg)](https://registry.platformio.org/libraries/robtillaart/PinInGroup) # PinInGroup @@ -26,6 +29,11 @@ This allows you to check that state of e.g. a parallel bus has not changed durin Default **PININGROUP_MAXSIZE** = 16. +#### Related + +- https://github.com/RobTillaart/PinOutGroup + + ## Performance The PinInGroup is not more efficient as reading the pins in a loop yourself. @@ -38,11 +46,15 @@ This is platform, group size and pin state dependent. ## Interface +```cpp +#include "PinInGroup.h" +``` + + ### Constructor - **PinInGroup()** Constructor. - ### Administration - **void clear()** sets the size to zero so one can repopulate. @@ -74,7 +86,7 @@ Returns 0 or 1 if OK and 0xFFFF when index >= size. #### Error codes -PININGROUP_ERROR_PIN = 0xFF = 255. +PININGROUP_ERROR_PIN = 0xFF = 255. ## Operation @@ -86,20 +98,19 @@ See examples. These ideas will be explored when time permits or needs arise. -#### must +#### Must - improve documentation - move code from .h to .cpp -#### should +#### Should - add real live examples - Allocate dynamic memory (0.2.0) - fragmentation? - would be memory efficient. - -#### could +#### Could - Optimize the low level reading e.g. reading registers only once. - Hold register and bit info per pin. @@ -114,3 +125,14 @@ These ideas will be explored when time permits or needs arise. - getIndex() - getPin() +#### 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/PinInGroup/library.json b/libraries/PinInGroup/library.json index 2bfff39f..4a6442b0 100644 --- a/libraries/PinInGroup/library.json +++ b/libraries/PinInGroup/library.json @@ -15,9 +15,9 @@ "type": "git", "url": "https://github.com/RobTillaart/PinInGroup.git" }, - "version": "0.1.8", + "version": "0.1.9", "license": "MIT", - "frameworks": "arduino", + "frameworks": "*", "platforms": "*", "headers": "PinInGroup.h" } diff --git a/libraries/PinInGroup/library.properties b/libraries/PinInGroup/library.properties index 8d48c2b1..7958cbf2 100644 --- a/libraries/PinInGroup/library.properties +++ b/libraries/PinInGroup/library.properties @@ -1,9 +1,9 @@ name=PinInGroup -version=0.1.8 +version=0.1.9 author=Rob Tillaart maintainer=Rob Tillaart sentence=A class that groups input pins so they can be read in one logical step. -paragraph= +paragraph= category=Communication url=https://github.com/RobTillaart/PinInGroup architectures=*