Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.
Dependents: FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more
Fork of SPI_TFT by
See Components - RA8875 Based Display
Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.
Offline Help Manual (Windows chm)
/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)
Diff: RA8875.cpp
- Revision:
- 137:9e09f6081ef1
- Parent:
- 136:224e03d5c31f
- Child:
- 140:33ca352755a2
--- a/RA8875.cpp Wed Nov 16 02:48:45 2016 +0000 +++ b/RA8875.cpp Thu Dec 08 12:29:54 2016 +0000 @@ -1739,20 +1739,21 @@ RetCode_t RA8875::BlockMove(uint8_t dstLayer, uint8_t dstDataSelect, point_t dstPoint, uint8_t srcLayer, uint8_t srcDataSelect, point_t srcPoint, - uint16_t bte_width, uint16_t bte_height, + dim_t bte_width, dim_t bte_height, uint8_t bte_op_code, uint8_t bte_rop_code) { uint8_t cmd; PERFORMANCE_RESET; + ///@todo range check and error return rather than to secretly fix srcPoint.x &= 0x3FF; // prevent high bits from doing unexpected things srcPoint.y &= 0x1FF; dstPoint.x &= 0x3FF; dstPoint.y &= 0x1FF; WriteCommandW(0x54, srcPoint.x); - WriteCommandW(0x56, ((srcLayer & 1) << 7) | srcPoint.y); + WriteCommandW(0x56, ((dim_t)(srcLayer & 1) << 15) | srcPoint.y); WriteCommandW(0x58, dstPoint.x); - WriteCommandW(0x5A, ((dstLayer & 1) << 7) | dstPoint.y); + WriteCommandW(0x5A, ((dim_t)(dstLayer & 1) << 15) | dstPoint.y); WriteCommandW(0x5C, bte_width); WriteCommandW(0x5E, bte_height); WriteCommand(0x51, ((bte_rop_code & 0x0F) << 4) | (bte_op_code & 0x0F));