Simon Ford
/
EAOLEDExample
A test example using the OLED display on the Embedded Artists Xpresso baseboard
EAOLED.h
- Committer:
- simon
- Date:
- 2010-02-28
- Revision:
- 0:f42b25503fd1
File content as of revision 0:f42b25503fd1:
// test library for Embedded Artists OLED used on Xpresso Baseboard #ifndef MBED_EAOLED_H #define MBED_EAOLED_H #include "mbed.h" #include "GraphicsDisplay.h" class EAOLED : public GraphicsDisplay { public: EAOLED(PinName mosi, PinName dnc, PinName sclk, PinName cs, PinName power); virtual void pixel(int x, int y, int colour); // virtual void cls(); virtual int width() { return 96; } virtual int height() { return 64; } void reset(); void data(int value); void command(int value); SPI _spi; DigitalOut _data; DigitalOut _cs; DigitalOut _power; uint8_t framebuffer[(96 * 64) / 8]; }; #endif