Azoteq / IQSDisplayTerminal

Dependents:   IQS624_HelloWorld Nucleo_ACM1602_I2C_DC_Angle

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IQSdisplayTerminal.h Source File

IQSdisplayTerminal.h

00001 // A class library to display Azoteq IQS62x registers on a terminal
00002 
00003 // More info on IQS624 sensor IC: http://www.azoteq.com/products/proxfusion/iqs624?mbed
00004 
00005 // IQS624 1-minute youtube video: http://bit.ly/IQS624Video
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 IQS62xDisplay : 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 IQS62xDisplay : public Serial { // use ARM mbed virtual serial port
00024 #endif
00025 
00026   public:
00027     int frameCounter;
00028     IQS62xDisplay(); // 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); // print a single line with color highlighting
00032     void showRegisters(char *,char *,bool); // show IQS62x registers
00033 };