From 4acf46db548108479f1afea52764a86ddef3f712 Mon Sep 17 00:00:00 2001 From: peteGSX Date: Tue, 24 Jan 2023 08:17:43 +1000 Subject: [PATCH] EX-IO reads optimised for speed --- IO_EXIOExpander.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/IO_EXIOExpander.h b/IO_EXIOExpander.h index 54b186e..cce101b 100644 --- a/IO_EXIOExpander.h +++ b/IO_EXIOExpander.h @@ -144,10 +144,6 @@ private: int _readAnalogue(VPIN vpin) override { if (vpin < _firstVpin + _numDigitalPins) return false; int pin = vpin - _firstVpin - _numDigitalPins; - // _analogueOutBuffer[0] = EXIORDAN; - // _analogueOutBuffer[1] = pin; - // I2CManager.read(_i2cAddress, _analogueInBuffer, 2, _analogueOutBuffer, 2); - // return (_analogueInBuffer[1] << 8) + _analogueInBuffer[0]; uint8_t _pinLSBByte = pin * 2; uint8_t _pinMSBByte = _pinLSBByte + 1; return (_analogueInputStates[_pinMSBByte] << 8) + _analogueInputStates[_pinLSBByte]; @@ -189,7 +185,6 @@ private: uint8_t _i2cAddress; uint8_t _numDigitalPins; uint8_t _numAnaloguePins; - byte _analogueInBuffer[2]; byte _analogueOutBuffer[2]; byte _digitalOutBuffer[3]; uint8_t _versionBuffer[3];