Library to read and write Azoteq IQS6xx device registers via I2C.
Dependents: IQS620_HelloWorld IQS622_HelloWorld IQS624_HelloWorld IQS621_HelloWorld ... more
Library: IQS62x
Library to read and write Azoteq IQS6xx device registers via I2C.
Supported Devices
Handy Table of ProxFusion Device Features
ALS = Ambient Light Sensor PIR = Passive Infrared
Diff: IQS62x.cpp
- Revision:
- 15:6a2f52b5ac46
- Parent:
- 14:2514595e2753
- Child:
- 16:b77c819f6c6a
--- a/IQS62x.cpp Sat May 13 10:12:37 2017 +0000 +++ b/IQS62x.cpp Sat May 13 16:08:38 2017 +0000 @@ -76,6 +76,7 @@ // writeChanges[i] is set to 1 if the register content differs from what we wrote to it // readChanges[i] is set to 1 if the register value differs from the previously read value if (IQSframes < 20) memset(readChangesEver,0,I2CBufferSize); // clear this until we have had 20 full reads + if (IQSframes == 1) memcpy(lastRead, I2CBuffer,I2CBufferSize); // if this is the first frame init the history buffer for(int i=0; i<I2CBufferSize; i++) { if (writeFlag[i] == 1) { // only if we previously wrote to this register we check it if( I2CBuffer[i] != lastWrite[i] )