From 3e5d3b1caaac79757262ebb05d0d31ac0d2c9c7b Mon Sep 17 00:00:00 2001 From: Asbelos Date: Sun, 25 Dec 2022 22:11:56 +0000 Subject: [PATCH] Rename --- IODevice.h | 2 +- IO_LEWDUINO.h => IO_duinoNodes.h | 16 ++++++------- Release_Notes/{duinogear.md => duinoNodes.md} | 23 +++++++++++++++++-- 3 files changed, 30 insertions(+), 11 deletions(-) rename IO_LEWDUINO.h => IO_duinoNodes.h (91%) rename Release_Notes/{duinogear.md => duinoNodes.md} (58%) diff --git a/IODevice.h b/IODevice.h index a8dfc1b..f3ffb17 100644 --- a/IODevice.h +++ b/IODevice.h @@ -407,6 +407,6 @@ private: #include "IO_MCP23008.h" #include "IO_MCP23017.h" #include "IO_PCF8574.h" -#include "IO_LEWDUINO.h" +#include "IO_duinoNodes.h" #endif // iodevice_h diff --git a/IO_LEWDUINO.h b/IO_duinoNodes.h similarity index 91% rename from IO_LEWDUINO.h rename to IO_duinoNodes.h index bfe14b8..9228d0e 100644 --- a/IO_LEWDUINO.h +++ b/IO_duinoNodes.h @@ -16,8 +16,8 @@ * You should have received a copy of the GNU General Public License * along with CommandStation. If not, see . */ -#ifndef IO_LEWDUINO_h - #define IO_LEWDUINO_h +#ifndef IO_duinoNodes_h + #define IO_duinoNodes_h #include #include "defines.h" #include "IODevice.h" @@ -30,10 +30,10 @@ -class IO_LEWDUINO : public IODevice { +class IO_duinoNodes : public IODevice { public: - IO_LEWDUINO(VPIN firstVpin, int nPins, + IO_duinoNodes(VPIN firstVpin, int nPins, byte clockPin, byte latchPin, byte dataPin, const byte* pinmap) : IODevice(firstVpin, nPins) { @@ -122,7 +122,7 @@ void _loopOutput() { } void _display() override { - DIAG(F("IO_LEWDUINO %SPUT Configured on VPins:%d-%d shift=%d"), + DIAG(F("IO_duinoNodes %SPUT Configured on VPins:%d-%d shift=%d"), _pinMap?F("IN"):F("OUT"), (int)_firstVpin, (int)_firstVpin+_nPins-1, _nShiftBytes*8); @@ -145,7 +145,7 @@ public: // input arrives as board pin 0,7,6,5,1,2,3,4 static const byte pinmap[8]={0x80,0x01,0x02,0x04,0x40,0x20,0x10,0x08}; if (IODevice::checkNoOverlap(firstVpin,nPins)) - new IO_LEWDUINO( firstVpin, nPins, clockPin, latchPin, dataPin,pinmap); + new IO_duinoNodes( firstVpin, nPins, clockPin, latchPin, dataPin,pinmap); } }; @@ -157,7 +157,7 @@ public: // input arrives as board pin 0, 1, 2, 3, 4, 5, 6, 7 static const byte pinmap[8]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}; if (IODevice::checkNoOverlap(firstVpin,nPins)) - new IO_LEWDUINO( firstVpin, nPins, clockPin, latchPin, dataPin,pinmap); + new IO_duinoNodes( firstVpin, nPins, clockPin, latchPin, dataPin,pinmap); } }; @@ -166,7 +166,7 @@ public: static void create(VPIN firstVpin, int nPins, byte clockPin, byte latchPin, byte dataPin ) { if (IODevice::checkNoOverlap(firstVpin,nPins)) - new IO_LEWDUINO( firstVpin, nPins, clockPin, latchPin, dataPin,NULL); + new IO_duinoNodes( firstVpin, nPins, clockPin, latchPin, dataPin,NULL); } }; diff --git a/Release_Notes/duinogear.md b/Release_Notes/duinoNodes.md similarity index 58% rename from Release_Notes/duinogear.md rename to Release_Notes/duinoNodes.md index dfcb4dc..64a2323 100644 --- a/Release_Notes/duinogear.md +++ b/Release_Notes/duinoNodes.md @@ -8,13 +8,32 @@ Using Lew's Duino Gear boards: Use in myAnimation.h HAL(IO_DNIN8, firstVpin, numPins, clockPin, latchPin, dataPin) - e.g. HAL(IO_DNIN8, 400, 16, 40, 42, 44) + + OR Use in myHal.cpp + IO_DNIN8::create( firstVpin, numPins, clockPin, latchPin, dataPin) + + + This will create virtaul pins 400-415 using two DNIN8 boards connected in sequence. Vpins 400-407 will be on the first board (closest to the CS) and 408-415 on the second. Note: 16 pins uses two boards. You may specify a non-multiple-of-8 pins but this will be rounded up to a multiple of 8 and you must connect ONLY the number of boards that this takes. This example uses Arduino GPIO pins 40,42,44 as these are conveniently side-by-side on a Mega which is easier when you are using a 3 strand cable. - \ No newline at end of file + + The DNIN8K module works the same but you must use DNIN8K in the HAL setup instead of DNIN8. NO you cant mix 8 and 8k versions in the same string of boards but you can create another string of boards. + + + DNOU8 works the same way, + Use in myAnimation.h + + HAL(IO_DNOU8, firstVpin, numPins, clockPin, latchPin, dataPin) + e.g. + HAL(IO_DNIN8, 450, 16, 45, 47, 49) + + OR Use in myHal.cpp + IO_DNIN8::create( firstVpin, numPins, clockPin, latchPin, dataPin) + +This creates a string of input pins 450-465. Note the clock/latch/data pins must be different to any DNIN8/k pins.