Increased SPI frequency from 5Mhz to 10MHz
Fork of RA8875 by
Diff: GraphicsDisplay.cpp
- Revision:
- 114:dbfb996bfbf3
- Parent:
- 112:325ca91bc03d
- Child:
- 115:c9862fd0c689
diff -r 325ca91bc03d -r dbfb996bfbf3 GraphicsDisplay.cpp --- a/GraphicsDisplay.cpp Wed Apr 27 01:29:55 2016 +0000 +++ b/GraphicsDisplay.cpp Sun May 15 18:57:06 2016 +0000 @@ -105,13 +105,18 @@ return window(r.p1.x, r.p1.y, r.p2.x + 1 - r.p1.x, r.p2.y + 1 - r.p1.y); } -RetCode_t GraphicsDisplay::window(loc_t x, loc_t y, dim_t width, dim_t height) +RetCode_t GraphicsDisplay::window(loc_t x, loc_t y, dim_t _width, dim_t _height) { + if (_width == (dim_t)-1) + _width = width() - x; + if (_height == (dim_t)-1) + _height = height() - y; + // Save the window metrics windowrect.p1.x = x; windowrect.p1.y = y; - windowrect.p2.x = x + width - 1; - windowrect.p2.y = y + height - 1; + windowrect.p2.x = x + _width - 1; + windowrect.p2.y = y + _height - 1; // current pixel location _x = x; _y = y;