Class library for a serial lcd implemented on a DISCO-F469NI Development board running specific firmware for this purpose.
Revision 4:df0201a66e39, committed 2018-02-18
- Comitter:
- grantphillips
- Date:
- Sun Feb 18 20:21:55 2018 +0000
- Parent:
- 3:33ee80658224
- Commit message:
- v1.0
Changed in this revision
DISCOF469SerialLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
DISCOF469SerialLCD.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 33ee80658224 -r df0201a66e39 DISCOF469SerialLCD.cpp --- a/DISCOF469SerialLCD.cpp Sun Feb 18 19:56:53 2018 +0000 +++ b/DISCOF469SerialLCD.cpp Sun Feb 18 20:21:55 2018 +0000 @@ -141,20 +141,20 @@ else if(strcmp(cmd, "-CS")==0) // ---------- Touches return { - sscanf(mRxMsg, "%s %u", cmd, &data8_0); //cmd,numTouches + sscanf(mRxMsg, "%s %hhu", cmd, &data8_0); //cmd, numTouches mTouches = data8_0; } else if(strcmp(cmd, "-T1")==0) // ---------- GetTouch1 return { - sscanf(mRxMsg, "%s %u %u", cmd, &data16_0, &data16_1); //cmd,x,y + sscanf(mRxMsg, "%s %hu %hu", cmd, &data16_0, &data16_1); //cmd,x,y mTouch1X = data16_0; mTouch1Y = data16_1; } else if(strcmp(cmd, "-T2")==0) // ---------- GetTouch2 return { - sscanf(mRxMsg, "%s %u %u", cmd, &data16_0, &data16_1); //cmd,x,y + sscanf(mRxMsg, "%s %hu %hu", cmd, &data16_0, &data16_1); //cmd,x,y mTouch2X = data16_0; mTouch2Y = data16_1; }
diff -r 33ee80658224 -r df0201a66e39 DISCOF469SerialLCD.h --- a/DISCOF469SerialLCD.h Sun Feb 18 19:56:53 2018 +0000 +++ b/DISCOF469SerialLCD.h Sun Feb 18 20:21:55 2018 +0000 @@ -27,6 +27,7 @@ #include "mbed.h" #include "BufferedSerial.h" +#include <inttypes.h> #define LCD_WHITE 0xffffffff #define LCD_SILVER 0xffC0C0C0