Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: IQS624_HelloWorld Nucleo_ACM1602_I2C_DC_Angle
Revision 11:5200ac4ee76e, committed 2017-05-14
- Comitter:
- AzqDev
- Date:
- Sun May 14 16:23:25 2017 +0000
- Parent:
- 10:d4f2c7c2bd82
- Child:
- 12:75f1d9e5bf01
- Commit message:
- Updated register limits & headings to latest data sheet; Added debug option to display all 16 registers per line
Changed in this revision
| IQSdisplayTerminal.cpp | Show annotated file Show diff for this revision Revisions of this file |
| IQSdisplayTerminal.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/IQSdisplayTerminal.cpp Sat May 13 00:55:45 2017 +0000
+++ b/IQSdisplayTerminal.cpp Sun May 14 16:23:25 2017 +0000
@@ -62,16 +62,16 @@
}
// formatted hex display of IQS62x registers
-void IQS62xDisplay::showRegisters(char * buffer, char* color) {
- printf("\r\n\r\n Device ID (43) [00] "); showLine(buffer,color,0x00,0x0f);
- printf("\r\n\r\n System Flags [10] "); showLine(buffer,color,0x10,0x1f);
- printf("\r\n\r\n Counters [20] "); showLine(buffer,color,0x20,0x2f);
- printf("\r\n\r\n Averages [30] "); showLine(buffer,color,0x30,0x3f);
- printf("\r\n\r\n Touch Setup [40] "); showLine(buffer,color,0x40,0x4f);
- printf("\r\n\r\n Touch Threshold [50] "); showLine(buffer,color,0x50,0x5f);
- printf("\r\n\r\n Small Usr Setup [60] "); showLine(buffer,color,0x60,0x6f);
- printf("\r\n\r\n Hall Settings [70] "); showLine(buffer,color,0x70,0x7f);
- printf("\r\n\r\n Wheel Values [80] "); showLine(buffer,color,0x80,0x8f);
- printf("\r\n\r\n System Setup [d0] "); showLine(buffer,color,0xd0,0xdf);
+void IQS62xDisplay::showRegisters(char * buffer, char* color, bool debug) {
+ bool d = debug; // if this is true we always display all 16 values in the line
+ printf("\r\n\r\n Device ID (43) [00] "); showLine(buffer,color,0x00,d?0x0f:0x02);
+ printf("\r\n\r\n System Flags [10] "); showLine(buffer,color,0x10,d?0x1f:0x15);
+ printf("\r\n\r\n Raw Channels 0-5 [20] "); showLine(buffer,color,0x20,d?0x2f:0x2b);
+ printf("\r\n\r\n Averages [30] "); showLine(buffer,color,0x30,d?0x3f:0x33);
+ printf("\r\n\r\n Touch Setup [40] "); showLine(buffer,color,0x40,d?0x4f:0x49);
+ printf("\r\n\r\n Touch Thresholds [50] "); showLine(buffer,color,0x50,d?0x5f:0x54);
+ printf("\r\n\r\n Hall Settings [70] "); showLine(buffer,color,0x70,d?0x7f:0x7a);
+ printf("\r\n\r\n Wheel Outputs [80] "); showLine(buffer,color,0x80,d?0x8f:0x8f);
+ printf("\r\n\r\n System Setup [d0] "); showLine(buffer,color,0xd0,d?0xdf:0xd6);
printf("\r\n\r\n");
}
\ No newline at end of file
--- a/IQSdisplayTerminal.h Sat May 13 00:55:45 2017 +0000
+++ b/IQSdisplayTerminal.h Sun May 14 16:23:25 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); // print a single line with color highlighting
- void showRegisters(char *,char *); // show IQS62x registers
+ void showRegisters(char *,char *,bool); // show IQS62x registers and debug option
};
\ No newline at end of file