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
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
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,7 +1,7 @@
//
// FILE: PinOutGroup.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.1.5
// VERSION: 0.1.6
// DATE: 2017-04-26
// PURPOSE: PinOutGroup library for Arduino
// 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.1 2020-05-19 main refactor;
// added tests; added clear(); added write(idx, value)
// renamed set to write() to be in line with digitalWrite()
// added tests; added clear(); added write(idx, value)
// renamed set to write() to be in line with digitalWrite()
// 0.1.2 2020-06-19 fix library.json
// 0.1.3 2021-01-05 add Arduino-CI + unit test
// 0.1.4 2021-01-22
@ -25,6 +25,7 @@
// renamed variables for readability
// add getIndex() to replace getIdx(),
// add getMaxSize(),
// 0.1.6 2021-12-23 update library.json, license, minor edits
#include "PinOutGroup.h"
@ -155,5 +156,5 @@ uint8_t PinOutGroup::getIndex(uint8_t pin)
}
// --- END OF FILE ---

View File

@ -1,7 +1,7 @@
#pragma once
// FILE: PinOutGroup.h
// AUTHOR: Rob Tillaart
// VERSION: 0.1.5
// VERSION: 0.1.6
// DATE: 2017-04-26
// PURPOSE: PinOutGroup library for Arduino
// URL: https://github.com/RobTillaart/PinOutGroup
@ -11,12 +11,12 @@
#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.
#ifndef PINOUTGROUP_MAXSIZE
#define PINOUTGROUP_MAXSIZE 16
#define PINOUTGROUP_MAXSIZE 16
#endif
@ -63,4 +63,6 @@ private:
uint8_t _size = 0;
};
// -- END OF FILE --

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
name=PinOutGroup
version=0.1.5
version=0.1.6
author=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.

View File

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