Chris Styles
/
EA_OLED_Joystick
This example uses the OLED display and the joystick on the Embedded Artists bseboard
Diff: EAOLED.h
- Revision:
- 0:6a7d6162034d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EAOLED.h Tue Mar 02 07:23:59 2010 +0000 @@ -0,0 +1,29 @@ +// 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