Register Display of Azoteq IQS620 Magnetic/Touch/Inductive sensor

Dependents:   IQS620_HelloWorld

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IQS620DisplayTerminal.h Source File

IQS620DisplayTerminal.h

00001 // A class library to display Azoteq IQS620 registers on a terminal
00002 
00003 // More info on IQS620 sensor IC: http://www.azoteq.com/products/proxfusion/iqs620?mbed
00004 
00005 // ProxFusion 5-minute YouTube video: https://youtu.be/l7tO2ra5y74
00006 
00007 #include "mbed.h"
00008 
00009 #define DISPLAY_BAUD_RATE 115200 /* baud rate of serial terminal */
00010 
00011 
00012 #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
00013 #warning if USBSerial.h can't be found import this library: developer.mbed.org/users/mbed_official/code/USBDevice
00014 // USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy
00015 #include "USBSerial.h"
00016 // USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy
00017 #endif
00018 
00019 #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
00020 class IQS620Display : public USBSerial { // use our own USB serial port (requires USB driver to be installed, see Teensy Website)
00021     public: void baud(int baudRate);
00022 #else
00023 class IQS620Display : public Serial { // use ARM mbed virtual serial port
00024 #endif
00025 
00026   public:
00027     int frameCounter;
00028     IQS620Display(); // constructor
00029     void helloMessage(bool); // show startup message
00030     void showStatus(int,int); // show headings and I2C Error Count
00031     void showLine(char * buffer, char * color, int startbyte, int endbyte); // write one line of register data with color highlighting
00032     void showRegisters(char *,char *,bool); // show IQS62x registers
00033 };