hadrovic oled

Dependencies:   mbed

Committer:
perodot
Date:
Wed Apr 09 13:32:39 2014 +0000
Revision:
0:b13343630d26
Hardovic Oled

Who changed what in which revision?

UserRevisionLine numberNew contents of line
perodot 0:b13343630d26 1 /* mbed Embedded Artists OLED library, as found on the LPCXpresso Baseboard
perodot 0:b13343630d26 2 * Copyright (c) 2010, sford
perodot 0:b13343630d26 3 *
perodot 0:b13343630d26 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
perodot 0:b13343630d26 5 * of this software and associated documentation files (the "Software"), to deal
perodot 0:b13343630d26 6 * in the Software without restriction, including without limitation the rights
perodot 0:b13343630d26 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
perodot 0:b13343630d26 8 * copies of the Software, and to permit persons to whom the Software is
perodot 0:b13343630d26 9 * furnished to do so, subject to the following conditions:
perodot 0:b13343630d26 10 *
perodot 0:b13343630d26 11 * The above copyright notice and this permission notice shall be included in
perodot 0:b13343630d26 12 * all copies or substantial portions of the Software.
perodot 0:b13343630d26 13 *
perodot 0:b13343630d26 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
perodot 0:b13343630d26 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
perodot 0:b13343630d26 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
perodot 0:b13343630d26 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
perodot 0:b13343630d26 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
perodot 0:b13343630d26 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
perodot 0:b13343630d26 20 * THE SOFTWARE.
perodot 0:b13343630d26 21 */
perodot 0:b13343630d26 22
perodot 0:b13343630d26 23 #ifndef MBED_EAOLED_H
perodot 0:b13343630d26 24 #define MBED_EAOLED_H
perodot 0:b13343630d26 25
perodot 0:b13343630d26 26 #include "mbed.h"
perodot 0:b13343630d26 27 #include "GraphicsDisplay.h"
perodot 0:b13343630d26 28
perodot 0:b13343630d26 29 class EAOLED : public GraphicsDisplay {
perodot 0:b13343630d26 30 public:
perodot 0:b13343630d26 31 EAOLED(PinName mosi, PinName dnc, PinName sclk, PinName cs, PinName power);
perodot 0:b13343630d26 32 virtual void pixel(int x, int y, int colour);
perodot 0:b13343630d26 33 // virtual void cls();
perodot 0:b13343630d26 34 virtual int width() { return 96; }
perodot 0:b13343630d26 35 virtual int height() { return 64; }
perodot 0:b13343630d26 36
perodot 0:b13343630d26 37 void reset();
perodot 0:b13343630d26 38 void data(int value);
perodot 0:b13343630d26 39 void command(int value);
perodot 0:b13343630d26 40
perodot 0:b13343630d26 41 SPI _spi;
perodot 0:b13343630d26 42 DigitalOut _data;
perodot 0:b13343630d26 43 DigitalOut _cs;
perodot 0:b13343630d26 44 DigitalOut _power;
perodot 0:b13343630d26 45
perodot 0:b13343630d26 46 uint8_t framebuffer[(96 * 64) / 8];
perodot 0:b13343630d26 47 };
perodot 0:b13343630d26 48
perodot 0:b13343630d26 49 #endif