EA OLED (Orig. by SFord, retouched by Lerche)

Dependencies:   mbed

Committer:
Lerche
Date:
Sun Oct 03 08:36:08 2010 +0000
Revision:
0:69334bd84891

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Lerche 0:69334bd84891 1 // test library for Embedded Artists OLED used on Xpresso Baseboard
Lerche 0:69334bd84891 2
Lerche 0:69334bd84891 3 #ifndef MBED_EAOLED_H
Lerche 0:69334bd84891 4 #define MBED_EAOLED_H
Lerche 0:69334bd84891 5
Lerche 0:69334bd84891 6 #include "mbed.h"
Lerche 0:69334bd84891 7 #include "GraphicsDisplay.h"
Lerche 0:69334bd84891 8
Lerche 0:69334bd84891 9 class EAOLED : public GraphicsDisplay {
Lerche 0:69334bd84891 10 public:
Lerche 0:69334bd84891 11 EAOLED(PinName mosi, PinName dnc, PinName sclk, PinName cs, PinName power);
Lerche 0:69334bd84891 12 virtual void pixel(int x, int y, int colour);
Lerche 0:69334bd84891 13 virtual void circle(int x, int y, int r, int colour);
Lerche 0:69334bd84891 14 virtual void hline(int x0, int x1, int y, int colour);
Lerche 0:69334bd84891 15 virtual void vline(int y0, int y1, int x, int colour);
Lerche 0:69334bd84891 16 virtual void line(int x0, int y0, int x1, int y1, int colour);
Lerche 0:69334bd84891 17 virtual void rect(int x0, int y0, int x1, int y1, int colour);
Lerche 0:69334bd84891 18 virtual void fillrect(int x0, int y0, int x1, int y1, int colour);
Lerche 0:69334bd84891 19 // virtual void cls();
Lerche 0:69334bd84891 20 virtual int width() { return 96; }
Lerche 0:69334bd84891 21 virtual int height() { return 64; }
Lerche 0:69334bd84891 22
Lerche 0:69334bd84891 23 void reset();
Lerche 0:69334bd84891 24 void data(int value);
Lerche 0:69334bd84891 25 void command(int value);
Lerche 0:69334bd84891 26
Lerche 0:69334bd84891 27 SPI _spi;
Lerche 0:69334bd84891 28 DigitalOut _data;
Lerche 0:69334bd84891 29 DigitalOut _cs;
Lerche 0:69334bd84891 30 DigitalOut _power;
Lerche 0:69334bd84891 31
Lerche 0:69334bd84891 32 uint8_t framebuffer[(96 * 64) / 8];
Lerche 0:69334bd84891 33 };
Lerche 0:69334bd84891 34
Lerche 0:69334bd84891 35 #endif