Azoteq / IQS621DisplayTerminal

Dependents:   IQS621_HelloWorld

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IQS621DisplayTerminal.h Source File

IQS621DisplayTerminal.h

00001 // A class library to display Azoteq IQS621 registers on a terminal
00002 
00003 // More info on IQS621 sensor IC: http://bit.ly/IQS621-info
00004 
00005 // IQS621 1-minute youtube video: N.A.
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 IQS621Display : 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 IQS621Display : public Serial { // use ARM mbed virtual serial port
00024 #endif
00025 
00026   public:
00027     int frameCounter;
00028     IQS621Display(); // constructor
00029     void helloMessage(bool); // show startup message
00030     void showStatus(int,int); // show headings and I2C Error Count
00031     void showLine(char *,char *,int,int); // dump a formatted line
00032     void showRegisters(char * registers, char * colorArray, bool showAllRegisters); // show IQS62x registers
00033 };