For Nokia Mobile LCD
Dependents: PE_08-08_MobileLCD
Diff: MobileLCD.h
- Revision:
- 0:39daa30e0eb3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MobileLCD.h Fri Sep 28 15:06:16 2012 +0000 @@ -0,0 +1,53 @@ +/* mbed Library - MobileLCD - test for MOD-NOKIA6610 (Epson 15G00) + * Copyright (c) 2007/8, sford + */ + +#ifndef MBED_MOBILELCD_H +#define MBED_MOBILELCD_H + +#include "mbed.h" + +class MobileLCD : public Stream { + +public: + + MobileLCD(PinName mosi, PinName miso, PinName clk, PinName cs, PinName rst); + + void foreground(int v); + void background(int v); + void locate(int column, int row); + virtual void reset(); + void fill(int x, int y, int width, int height, int colour); + void cls(); + int width(); + int height(); + int columns(); + int rows(); + void pixel(int x, int y, int colour); + +protected: + + virtual void _select(); + virtual void _deselect(); + virtual void _window(int x, int y, int width, int height); + void command(int value); + void data(int value); + void newline(); + virtual int _putc(int c); + virtual int _getc() { return 0; } + SPI _spi; + DigitalOut _rst; + DigitalOut _cs; + void bitblit(int x, int y, int width, int height, const char* bitstream); + void blit(int x, int y, int width, int height, const int* colour); + void putp(int v); + void window(int x, int y, int width, int height); +// void pixel(int x, int y, int colour); + int _row, _column, _rows, _columns, _foreground, _background, _width, _height; +}; + + + +#endif + +