This driver is meant for the monochrome LCD display (model no: LS013B4DN04) from Sharp; but it should be easily adaptable to other Sharp displays.
Diff: FrameBuffer.cpp
- Revision:
- 2:270ee57c0367
- Parent:
- 0:62d7cfac67ca
--- a/FrameBuffer.cpp Wed Jul 30 07:29:17 2014 +0000 +++ b/FrameBuffer.cpp Wed Jul 30 07:53:49 2014 +0000 @@ -18,6 +18,16 @@ SharpLCD::FrameBuffer::FrameBuffer(uint8_t *fb) : buffer(fb) { + clear(); + + /* Make sure the dummy bytes are clear */ + ((uint8_t *)buffer)[SIZEOF_FRAMEBUFFER] = DUMMY8; + ((uint8_t *)buffer)[SIZEOF_FRAMEBUFFER + 1] = DUMMY8; +} + +void +SharpLCD::FrameBuffer::clear(void) +{ uint8_t *pfb; unsigned int row; unsigned int index; @@ -39,10 +49,6 @@ } } } - - /* Make sure the dummy bytes are clear */ - ((uint8_t *)buffer)[SIZEOF_FRAMEBUFFER] = DUMMY8; - ((uint8_t *)buffer)[SIZEOF_FRAMEBUFFER + 1] = DUMMY8; } void