Register Display On Serial Terminal For Azoteq IQS622 Ultra Low Power (5uA) I2C Multi-Function Sensor with Light Sensor + Active (Reflective) IR + Touch + Hall Effect Sensor
A library that performs a register dump of the Azoteq IQS622 ultra low power multisensor registers.
More information on the IQS622 here:
Revision 5:d095cb71bef0, committed 2017-05-14
- Comitter:
- AzqDev
- Date:
- Sun May 14 19:28:54 2017 +0000
- Parent:
- 4:a9a7666d8a98
- Commit message:
- Cosmetics
Changed in this revision
IQS622DisplayTerminal.cpp | Show annotated file Show diff for this revision Revisions of this file |
IQS622DisplayTerminal.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r a9a7666d8a98 -r d095cb71bef0 IQS622DisplayTerminal.cpp --- a/IQS622DisplayTerminal.cpp Sat May 13 20:03:57 2017 +0000 +++ b/IQS622DisplayTerminal.cpp Sun May 14 19:28:54 2017 +0000 @@ -65,20 +65,20 @@ } // formatted hex display of IQS622 registers -void IQS622Display::showRegisters(char * buffer,char * color, bool showAll) +void IQS622Display::showRegisters(char * buffer,char * color, bool showAllRegisters) { - bool d = showAll; // for debugging, if true show all 16 registers in a line - printf("\r\n\r\n Device ID & Version (42) [00] "); showLine(buffer,color,0x00,d?0x0f:0x02); - printf("\r\n\r\n Events and Flags [10] "); showLine(buffer,color,0x10,d?0x1f:0x1a); - printf("\r\n\r\n Channel 0-6 Raw Values [20] "); showLine(buffer,color,0x20,d?0x2f:0x2d); - printf("\r\n\r\n Long Term Average Data [30] "); showLine(buffer,color,0x30,d?0x3f:0x33); - printf("\r\n\r\n Proxfusion Settings [40] "); showLine(buffer,color,0x40,d?0x4f:0x4d); - printf("\r\n\r\n Proxfusion Thresholds [50] "); showLine(buffer,color,0x50,d?0x5f:0x54); - printf("\r\n\r\n SAR Thresholds [60] "); showLine(buffer,color,0x60,d?0x6f:0x65); - printf("\r\n\r\n Light/IR Sensor Settings [70] "); showLine(buffer,color,0x70,d?0x7f:0x75); - printf("\r\n\r\n IR Threshold Settings [90] "); showLine(buffer,color,0x90,d?0x9f:0x92); - printf("\r\n\r\n Hall Switch Thresholds [A0] "); showLine(buffer,color,0xa0,d?0xaf:0xa3); - printf("\r\n\r\n Temperature Thresholds [B0] "); showLine(buffer,color,0xb0,d?0xbf:0xb2); - printf("\r\n\r\n Device & Power Settings [D0] "); showLine(buffer,color,0xd0,d?0xdf:0xd7); + bool d = showAllRegisters; // if true show all 16 registers per line + printf("\r\n\r\n Device ID & Version (42) [00] "); showLine(buffer,color,0x00,d?0x0f:0x02); + printf("\r\n\r\n Events and Flags [10] "); showLine(buffer,color,0x10,d?0x1f:0x1a); + printf("\r\n\r\n Channel 0-6 Raw Values [20] "); showLine(buffer,color,0x20,d?0x2f:0x2d); + printf("\r\n\r\n Long Term Average Data [30] "); showLine(buffer,color,0x30,d?0x3f:0x33); + printf("\r\n\r\n Proxfusion Settings [40] "); showLine(buffer,color,0x40,d?0x4f:0x4d); + printf("\r\n\r\n Proxfusion Thresholds [50] "); showLine(buffer,color,0x50,d?0x5f:0x54); + printf("\r\n\r\n SAR Thresholds [60] "); showLine(buffer,color,0x60,d?0x6f:0x65); + printf("\r\n\r\n Light/IR Sensor Settings [70] "); showLine(buffer,color,0x70,d?0x7f:0x75); + printf("\r\n\r\n IR Threshold Settings [90] "); showLine(buffer,color,0x90,d?0x9f:0x92); + printf("\r\n\r\n Hall Switch Thresholds [A0] "); showLine(buffer,color,0xa0,d?0xaf:0xa3); + printf("\r\n\r\n Temperature Thresholds [B0] "); showLine(buffer,color,0xb0,d?0xbf:0xb2); + printf("\r\n\r\n Device & Power Settings [D0] "); showLine(buffer,color,0xd0,d?0xdf:0xd7); printf("\r\n\r\n"); } \ No newline at end of file
diff -r a9a7666d8a98 -r d095cb71bef0 IQS622DisplayTerminal.h --- a/IQS622DisplayTerminal.h Sat May 13 20:03:57 2017 +0000 +++ b/IQS622DisplayTerminal.h Sun May 14 19:28:54 2017 +0000 @@ -29,5 +29,5 @@ void helloMessage(bool); // show startup message void showStatus(int,int); // show headings and I2C Error Count void showLine(char *,char *,int,int); // dump a single line of register values with color highlighting - void showRegisters(char *,char *,bool); // show IQS62x registers with color highlighting and debug option + void showRegisters(char *,char *,bool); // show IQS62x registers }; \ No newline at end of file