jcw/glcdlib — pull request #3 by tankslappa (2012-08-29 19:21:33+00:00)
Title: Rotate180 constant added

Support for rotated display added.

Boolean constant rotate180 added into GLCD_ST7565.cpp.

Image is rotated as it is put into gLCDBuf. This proved faster than flipping and reversing all the bytes/bits when reading from the buffer and writing to the screen.

When running in rotated mode, all the coordinates are (or at least should be!) translated, so the user doesn't need to do anything more than set the const.

There is an 80 byte code hit when rotate180 is enabled, however I managed to get 20 bytes back from some code tidy ups (in both normal and rotated mode), so in reality it is only 60 bytes more than before.

Not the most elegant solution, and it will get a tidy up at some point, but it works, and works well.