1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-04-28 07:48:55 +02:00

spelling and polling

This commit is contained in:
Asbelos 2022-12-25 21:35:38 +00:00
parent 9240e7c6ba
commit 81099af42b

View File

@ -75,7 +75,7 @@ void _loopInput(unsigned long currentMicros) {
ArduinoPins::fastWriteDigital(_latchPin, LOW); ArduinoPins::fastWriteDigital(_latchPin, LOW);
delayMicroseconds(50); delayMicroseconds(50);
// stream in the bitmap useing mapping order provided at constructor // stream in the bitmap using mapping order provided at constructor
for (int xmitByte=0;xmitByte<_nShiftBytes; xmitByte++) { for (int xmitByte=0;xmitByte<_nShiftBytes; xmitByte++) {
byte newByte=0; byte newByte=0;
for (int xmitBit=0;xmitBit<8; xmitBit++) { for (int xmitBit=0;xmitBit<8; xmitBit++) {
@ -89,7 +89,7 @@ void _loopInput(unsigned long currentMicros) {
delayMicroseconds(20); delayMicroseconds(20);
} }
_pinValues[xmitByte]=newByte; _pinValues[xmitByte]=newByte;
DIAG(F("DIN %x=%x"),xmitByte, newByte); // DIAG(F("DIN %x=%x"),xmitByte, newByte);
} }
} }
@ -129,7 +129,7 @@ void _loopOutput() {
} }
private: private:
static const unsigned long POLL_MICROS=1000000; // 10 / S static const unsigned long POLL_MICROS=100000; // 10 / S
unsigned long _prevMicros; unsigned long _prevMicros;
int _nShiftBytes=0; int _nShiftBytes=0;
VPIN _latchPin,_clockPin,_dataPin; VPIN _latchPin,_clockPin,_dataPin;
@ -161,7 +161,7 @@ public:
} }
}; };
class IO_DNOUT8 { class IO_DNOU8 {
public: public:
static void create(VPIN firstVpin, int nPins, byte clockPin, byte latchPin, byte dataPin ) static void create(VPIN firstVpin, int nPins, byte clockPin, byte latchPin, byte dataPin )
{ {