0.1.6 PinOutGroup

This commit is contained in:
rob tillaart 2021-12-23 18:59:45 +01:00
parent 1baab8a1ba
commit 1be0b6919c
10 changed files with 24 additions and 20 deletions

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2017-2021 Rob Tillaart Copyright (c) 2017-2022 Rob Tillaart
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,7 +1,7 @@
// //
// FILE: PinOutGroup.cpp // FILE: PinOutGroup.cpp
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// VERSION: 0.1.5 // VERSION: 0.1.6
// DATE: 2017-04-26 // DATE: 2017-04-26
// PURPOSE: PinOutGroup library for Arduino // PURPOSE: PinOutGroup library for Arduino
// goal is to easily change a group of pins that logically // goal is to easily change a group of pins that logically
@ -14,8 +14,8 @@
// //
// 0.1.0 20-08-2017 initial version (based upon experimental pinGroup) // 0.1.0 20-08-2017 initial version (based upon experimental pinGroup)
// 0.1.1 2020-05-19 main refactor; // 0.1.1 2020-05-19 main refactor;
// added tests; added clear(); added write(idx, value) // added tests; added clear(); added write(idx, value)
// renamed set to write() to be in line with digitalWrite() // renamed set to write() to be in line with digitalWrite()
// 0.1.2 2020-06-19 fix library.json // 0.1.2 2020-06-19 fix library.json
// 0.1.3 2021-01-05 add Arduino-CI + unit test // 0.1.3 2021-01-05 add Arduino-CI + unit test
// 0.1.4 2021-01-22 // 0.1.4 2021-01-22
@ -25,6 +25,7 @@
// renamed variables for readability // renamed variables for readability
// add getIndex() to replace getIdx(), // add getIndex() to replace getIdx(),
// add getMaxSize(), // add getMaxSize(),
// 0.1.6 2021-12-23 update library.json, license, minor edits
#include "PinOutGroup.h" #include "PinOutGroup.h"
@ -155,5 +156,5 @@ uint8_t PinOutGroup::getIndex(uint8_t pin)
} }
// --- END OF FILE --- // --- END OF FILE ---

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// FILE: PinOutGroup.h // FILE: PinOutGroup.h
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// VERSION: 0.1.5 // VERSION: 0.1.6
// DATE: 2017-04-26 // DATE: 2017-04-26
// PURPOSE: PinOutGroup library for Arduino // PURPOSE: PinOutGroup library for Arduino
// URL: https://github.com/RobTillaart/PinOutGroup // URL: https://github.com/RobTillaart/PinOutGroup
@ -11,12 +11,12 @@
#include "Arduino.h" #include "Arduino.h"
#define PINOUTGROUP_LIB_VERSION (F("0.1.5")) #define PINOUTGROUP_LIB_VERSION (F("0.1.6"))
// smaller MAXSIZE will reduce memory footprint with ditto bytes. // smaller MAXSIZE will reduce memory footprint with ditto bytes.
#ifndef PINOUTGROUP_MAXSIZE #ifndef PINOUTGROUP_MAXSIZE
#define PINOUTGROUP_MAXSIZE 16 #define PINOUTGROUP_MAXSIZE 16
#endif #endif
@ -63,4 +63,6 @@ private:
uint8_t _size = 0; uint8_t _size = 0;
}; };
// -- END OF FILE -- // -- END OF FILE --

View File

@ -1,6 +1,5 @@
// FILE: led13.ino // FILE: led13.ino
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// VERSION: 0.1.1
// PURPOSE: demo pinOutGroup library for Arduino // PURPOSE: demo pinOutGroup library for Arduino
// blink the build in led by means of a PinOutGroup // blink the build in led by means of a PinOutGroup
@ -40,3 +39,4 @@ void loop()
// -- END OF FILE -- // -- END OF FILE --

View File

@ -1,8 +1,6 @@
// FILE: sevenSegment.ino // FILE: sevenSegment.ino
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo PinOutGroup library for Arduino // PURPOSE: demo PinOutGroup library for Arduino
//
#include "PinOutGroup.h" #include "PinOutGroup.h"

View File

@ -1,8 +1,6 @@
// FILE: testPinOutGroup.ino // FILE: testPinOutGroup.ino
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// VERSION: 0.1.2
// PURPOSE: demo PinOutGroup library for Arduino // PURPOSE: demo PinOutGroup library for Arduino
//
#include "PinOutGroup.h" #include "PinOutGroup.h"
@ -396,3 +394,4 @@ void test8()
// -- END OF FILE -- // -- END OF FILE --

View File

@ -1,8 +1,6 @@
// FILE: trafficLight.ino // FILE: trafficLight.ino
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo PinOutGroup library for Arduino // PURPOSE: demo PinOutGroup library for Arduino
//
#include "PinOutGroup.h" #include "PinOutGroup.h"

View File

@ -15,8 +15,9 @@
"type": "git", "type": "git",
"url": "https://github.com/RobTillaart/PinOutGroup.git" "url": "https://github.com/RobTillaart/PinOutGroup.git"
}, },
"version": "0.1.5", "version": "0.1.6",
"license": "MIT", "license": "MIT",
"frameworks": "arduino", "frameworks": "arduino",
"platforms": "*" "platforms": "*",
"headers": "PinOutGroup.h"
} }

View File

@ -1,5 +1,5 @@
name=PinOutGroup name=PinOutGroup
version=0.1.5 version=0.1.6
author=Rob Tillaart <rob.tillaart@gmail.com> author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com> maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=A class that groups output pins so they can be updated easier and slightly faster on average. sentence=A class that groups output pins so they can be updated easier and slightly faster on average.

View File

@ -38,8 +38,10 @@
unittest_setup() unittest_setup()
{ {
fprintf(stderr, "PINOUTGROUP_LIB_VERSION: %s\n", (char *) PINOUTGROUP_LIB_VERSION);
} }
unittest_teardown() unittest_teardown()
{ {
} }
@ -47,20 +49,23 @@ unittest_teardown()
unittest(test_all) unittest(test_all)
{ {
fprintf(stderr, "VERSION: %s\n", (char *) PINOUTGROUP_LIB_VERSION);
PinOutGroup POG; PinOutGroup POG;
uint8_t ar[46] = {2, 3, 4, 5, 6, 7}; uint8_t ar[46] = {2, 3, 4, 5, 6, 7};
assertEqual(0, POG.size()); assertEqual(0, POG.size());
assertEqual(16, POG.available()); assertEqual(16, POG.available());
assertEqual(16, POG.getMaxSize());
assertFalse(POG.isInGroup(2)); assertFalse(POG.isInGroup(2));
POG.add(6, ar, LOW); POG.add(6, ar, LOW);
assertEqual(6, POG.size()); assertEqual(6, POG.size());
assertEqual(10, POG.available()); assertEqual(10, POG.available());
assertEqual(16, POG.getMaxSize());
assertTrue(POG.isInGroup(2));
} }
unittest_main() unittest_main()
// -------- // --------