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
Revision 13:71f8ee16a3a1, committed 2017-05-13
- Comitter:
- AzqDev
- Date:
- Sat May 13 09:26:47 2017 +0000
- Parent:
- 12:5a9bbbd6e312
- Child:
- 14:2514595e2753
- Commit message:
- Highlight table
Changed in this revision
| IQS62x.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/IQS62x.cpp Fri May 12 23:14:44 2017 +0000
+++ b/IQS62x.cpp Sat May 13 09:26:47 2017 +0000
@@ -78,9 +78,10 @@
writeChanges[i]=1; // if register different from what we wrote, mark it
}
if ( I2CBuffer[i] != lastRead[i] )
- readChanges[i]=1; // if register differs from previous read, mark it
- else
- readChanges[i]=0; // no change, no flag
+ readChanges[i]=20; // if register differs from previous read, highlight it for 20 read cycles
+ else {
+ if (readChanges[i] > 0) readChanges[i]--; // bring it closer to zero
+ }
}
memcpy(lastRead, I2CBuffer, I2CBufferSize); // preserve data for next round
#endif
IQS624
IQS620A
IQS620A-EVAL-1
IQS621
IQS621-EVAL-1
IQS622
IQS622-EVAL-1
IQS624-EVAL-1