This is the David Smart RA8875 Library with mods for working with FRDM-K64F
Diff: RA8875.cpp
- Revision:
- 81:01da2e34283d
- Parent:
- 80:cc4fab58179c
- Child:
- 82:f7d300f26540
--- a/RA8875.cpp Sun Dec 28 19:58:18 2014 +0000 +++ b/RA8875.cpp Sun Dec 28 21:50:28 2014 +0000 @@ -102,9 +102,8 @@ //{ //} -RetCode_t RA8875::init(bool poweron, int width, int height, int color_bpp) +RetCode_t RA8875::init(int width, int height, int color_bpp, bool poweron, bool keypadon, bool touchscreenon) { - INFO("init(%d,%d,%d,%d)", poweron, width, height, color_bpp); font = NULL; // no external font, use internal. pKeyMap = DefaultKeyMap; // set default key map _select(false); // deselect the display @@ -157,6 +156,10 @@ Power(poweron); if (poweron) Backlight_u8(255); + if (keypadon) + KeypadInit(); + if (touchscreenon) + TouchPanelInit(); #ifdef PERF_METRICS performance.start(); ClearPerformance(); @@ -1025,6 +1028,10 @@ return noerror; } +RetCode_t RA8875::fillrect(rect_t r, color_t color, fill_t fillit) +{ + return rect(r.p1.x, r.p1.y, r.p2.x, r.p2.y, color, fillit); +} RetCode_t RA8875::fillrect(loc_t x1, loc_t y1, loc_t x2, loc_t y2, color_t color, fill_t fillit) @@ -1032,6 +1039,10 @@ return rect(x1,y1,x2,y2,color,fillit); } +RetCode_t RA8875::rect(rect_t r, color_t color, fill_t fillit) +{ + return rect(r.p1.x, r.p1.y, r.p2.x, r.p2.y, color, fillit); +} RetCode_t RA8875::rect(loc_t x1, loc_t y1, loc_t x2, loc_t y2, color_t color, fill_t fillit) @@ -2256,7 +2267,7 @@ wait_ms(20); wait(2); } - display.TouchPanelCalibrate(pTest, pSample, &calmatrix); + display.TouchPanelComputeCalibration(pTest, pSample, &calmatrix); display.printf(" Writing calibration to tpcal.cfg\r\n"); FILE * fh = fopen("/local/tpcal.cfg", "wb"); if (fh) {