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
IQSdisplayTerminal.h@4:4eecf56886b9, 2017-02-08 (annotated)
- Committer:
- AzqDev
- Date:
- Wed Feb 08 00:35:53 2017 +0000
- Revision:
- 4:4eecf56886b9
- Parent:
- 3:7932615d9349
- Child:
- 5:9d903309117c
USBSerial Warning
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| AzqDev | 0:77730e5a870b | 1 | // A class library to display Azoteq IQS62x registers on a terminal |
| AzqDev | 3:7932615d9349 | 2 | |
| AzqDev | 3:7932615d9349 | 3 | // More info on IQS624 sensor IC: http://bit.ly/IQS624_info |
| AzqDev | 3:7932615d9349 | 4 | |
| AzqDev | 0:77730e5a870b | 5 | #include "mbed.h" |
| AzqDev | 2:1403d6a6af7b | 6 | |
| AzqDev | 0:77730e5a870b | 7 | #define DISPLAY_BAUD_RATE 115200 /* baud rate of serial terminal */ |
| AzqDev | 2:1403d6a6af7b | 8 | |
| AzqDev | 4:4eecf56886b9 | 9 | |
| AzqDev | 2:1403d6a6af7b | 10 | #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL |
| AzqDev | 4:4eecf56886b9 | 11 | #warning if USBSerial.h can't be found import this library: developer.mbed.org/users/mbed_official/code/USBDevice |
| AzqDev | 4:4eecf56886b9 | 12 | // USBSerial comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy |
| AzqDev | 2:1403d6a6af7b | 13 | #include "USBSerial.h" |
| AzqDev | 4:4eecf56886b9 | 14 | // USBSerial comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy |
| AzqDev | 2:1403d6a6af7b | 15 | #endif |
| AzqDev | 2:1403d6a6af7b | 16 | |
| AzqDev | 2:1403d6a6af7b | 17 | #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL |
| AzqDev | 2:1403d6a6af7b | 18 | class IQS62xDisplay : public USBSerial { // use our own USB serial port (requires USB driver to be installed, see Teensy Website) |
| AzqDev | 2:1403d6a6af7b | 19 | public: void baud(int baudRate); |
| AzqDev | 2:1403d6a6af7b | 20 | #else |
| AzqDev | 2:1403d6a6af7b | 21 | class IQS62xDisplay : public Serial { // use ARM mbed virtual serial port |
| AzqDev | 2:1403d6a6af7b | 22 | #endif |
| AzqDev | 2:1403d6a6af7b | 23 | |
| AzqDev | 0:77730e5a870b | 24 | public: |
| AzqDev | 0:77730e5a870b | 25 | int frameCounter; |
| AzqDev | 0:77730e5a870b | 26 | IQS62xDisplay(); // constructor |
| AzqDev | 0:77730e5a870b | 27 | void helloMessage(bool); // show startup message |
| AzqDev | 0:77730e5a870b | 28 | void showStatus(int,int); // show headings and I2C Error Count |
| AzqDev | 0:77730e5a870b | 29 | void showRegisters(char *); // show IQS62x registers |
| AzqDev | 0:77730e5a870b | 30 | }; |