This is the David Smart RA8875 Library with mods for working with FRDM-K64F
Diff: RA8875.h
- Revision:
- 140:33ca352755a2
- Parent:
- 137:9e09f6081ef1
- Parent:
- 139:99ec74e3273f
- Child:
- 142:6e9bff59878a
--- a/RA8875.h Thu Dec 08 12:29:54 2016 +0000 +++ b/RA8875.h Tue Dec 27 15:46:18 2016 +0000 @@ -2266,6 +2266,42 @@ /// foreground and background color registers, and others. Those must be set /// outside of this API. /// + /// @code + /// int main() + /// { + /// point_t src; + /// point_t dst; + /// TouchCode_t touch; + /// const dim_t RECT_W = 100; + /// const dim_t RECT_H = 100; + /// + /// pc.baud(460800); //I like a snappy terminal, so crank it up! + /// pc.printf("\r\nRA8875 BTE Move Test - Build " __DATE__ " " __TIME__ "\r\n"); + /// lcd.init(LCD_W,LCD_H,LCD_C, BL_NORM); + /// lcd.TouchPanelInit(); + /// #ifndef CAP_TOUCH + /// InitTS(); // Calibration for resistive touch panel + /// #endif + /// + /// RetCode_t r = lcd.RenderImageFile(0,0,"/local/fullscrn.jpg"); + /// if (r) pc.printf(" Error: %d; %s\r\n", r, lcd.GetErrorMessage(r)); + /// while (1) { + /// touch = lcd.TouchPanelReadable(); + /// if (touch) { + /// point_t xy = lcd.TouchCoordinates(); + /// TouchCode_t t = lcd.TouchCode(); + /// + /// if (t == touch) { + /// src = ComputeTopLeftOfRect(xy, RECT_W/2, RECT_H/2, LCD_W, LCD_H); + /// } else if (t == release) { + /// dst = ComputeTopLeftOfRect(xy, RECT_W/2, RECT_H/2, LCD_W, LCD_H); + /// r = lcd.BlockMove(0,0,dst, 0,0,src, RECT_W,RECT_H, 0x2, 0xC); + /// } + /// } + /// } + /// } + /// @endcode + /// /// @param[in] dstLayer layer [5B.7]. layer value is 0 or 1 representing layer 1 and 2. /// @param[in] dstDataSelect [50.5] defines the destination data type 0: block, 1: linear. /// @param[in] dstPoint [58-5B] is a point_t defining the destination coordinate.