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.
Fork of RA8875 by
Revision 60:2dfd574f63bd, committed 2014-08-16
- Comitter:
- WiredHome
- Date:
- Sat Aug 16 19:26:17 2014 +0000
- Parent:
- 59:fb40aad4efd4
- Child:
- 61:8f3153bf0baa
- Commit message:
- Correct an issue - trap line(...) where the xy pairs actually represent a point, and call pixel(...) instead. It appeared that the RA8875 would hang in for this line api call.
Changed in this revision
| RA8875.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/RA8875.cpp Thu Jul 24 00:41:37 2014 +0000
+++ b/RA8875.cpp Sat Aug 16 19:26:17 2014 +0000
@@ -814,15 +814,19 @@
RetCode_t RA8875::line(loc_t x1, loc_t y1, loc_t x2, loc_t y2)
{
PERFORMANCE_RESET;
- WriteCommandW(0x91, x1);
- WriteCommandW(0x93, y1);
- WriteCommandW(0x95, x2);
- WriteCommandW(0x97, y2);
- unsigned char drawCmd = 0x00; // Line
- WriteCommand(0x90, drawCmd);
- WriteCommand(0x90, 0x80 + drawCmd); // Start drawing.
- while (ReadCommand(0x90) & 0x80) // await completion.
- wait_us(POLLWAITuSec);
+ if (x1 == x2 && y1 == y2)
+ pixel(x1, y1);
+ else {
+ WriteCommandW(0x91, x1);
+ WriteCommandW(0x93, y1);
+ WriteCommandW(0x95, x2);
+ WriteCommandW(0x97, y2);
+ unsigned char drawCmd = 0x00; // Line
+ WriteCommand(0x90, drawCmd);
+ WriteCommand(0x90, 0x80 + drawCmd); // Start drawing.
+ while (ReadCommand(0x90) & 0x80) // await completion.
+ wait_us(POLLWAITuSec);
+ }
REGISTERPERFORMANCE(PRF_DRAWLINE);
return noerror;
}
