SG12864A
Dependents: SG12864A_TestProgram
Diff: SG12864A.h
- Revision:
- 1:aacd73a4e7ee
- Parent:
- 0:238f2d048222
- Child:
- 2:91c03e41c927
--- a/SG12864A.h Mon Jul 19 12:43:25 2010 +0000 +++ b/SG12864A.h Tue Jul 20 03:59:17 2010 +0000 @@ -10,6 +10,8 @@ #include "mbed.h" +/** + */ class SG12864A { public: SG12864A( @@ -32,8 +34,16 @@ CS1, CS2 }; + void bufferPush(void); + void bufferPull(void); + void bufferClear(void); + void bufferDrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + void bufferDrawBox(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + void bufferFillBox(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + void reset(void); void clear(void); + void setDisplayOnOff(Target t, bool on); void setDisplayStartLine(Target t, uint8_t displayStartLine); void setPageAddress(Target t, uint8_t addr); @@ -41,9 +51,12 @@ void readStatus(Target t, uint8_t *c); void writeData(Target t, uint8_t c); void readData(Target t, uint8_t *c); + static const int PIXEL_X = 128; + static const int PIXEL_Y = 64; private: static const int PAGES = 8; static const int COLUMNS = 64; + uint8_t buffer[PAGES * COLUMNS * 2]; DigitalOut ioDI; DigitalOut ioRW; DigitalOut ioEN;