mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.1.6 PinOutGroup
This commit is contained in:
parent
1baab8a1ba
commit
1be0b6919c
@ -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
|
||||
|
@ -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
|
||||
@ -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 ---
|
||||
|
||||
|
@ -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,7 +11,7 @@
|
||||
#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.
|
||||
@ -63,4 +63,6 @@ private:
|
||||
uint8_t _size = 0;
|
||||
};
|
||||
|
||||
|
||||
// -- END OF 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 --
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
// FILE: sevenSegment.ino
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.0
|
||||
// PURPOSE: demo PinOutGroup library for Arduino
|
||||
//
|
||||
|
||||
|
||||
#include "PinOutGroup.h"
|
||||
|
@ -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 --
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
// FILE: trafficLight.ino
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.0
|
||||
// PURPOSE: demo PinOutGroup library for Arduino
|
||||
//
|
||||
|
||||
|
||||
#include "PinOutGroup.h"
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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()
|
||||
|
||||
|
||||
// --------
|
||||
|
Loading…
Reference in New Issue
Block a user