UniGraphic-Fork for ST7920-LCD-controller and SH1106. Tested with 128x64 LCD with SPI and 128x64-OLED with IIC

Dependents:   UniGraphic-St7920-Test AfficheurUTILECO

Fork of UniGraphic by GraphicsDisplay

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers S6D04D1.h Source File

S6D04D1.h

00001 #ifndef MBED_S6D04D1_H
00002 #define MBED_S6D04D1_H
00003 
00004 
00005 
00006 #include "mbed.h"
00007 #include "TFT.h"
00008 
00009 /** Class for S6D04D1 TFT display controller
00010 * for BM8K5113 TFT1P3520-E TFT8K5113FPC-A1-E and TFT1P3520
00011 * to be copypasted and adapted for other controllers
00012 */
00013 class S6D04D1 : public TFT
00014 {
00015  
00016  public:
00017 
00018     /** Create a PAR display interface
00019     * @param displayproto PAR_8 or PAR_16
00020     * @param port GPIO port name to use
00021     * @param CS pin connected to CS of display
00022     * @param reset pin connected to RESET of display
00023     * @param DC pin connected to data/command of display
00024     * @param WR pin connected to SDI of display
00025     * @param RD pin connected to RS of display
00026     * @param name The name used by the parent class to access the interface
00027     * @param LCDSIZE_X x size in pixel - optional
00028     * @param LCDSIZE_Y y size in pixel - optional
00029     */ 
00030     S6D04D1(proto_t displayproto, PortName port, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD, const char* name , unsigned int LCDSIZE_X = 240, unsigned  int LCDSIZE_Y = 400);
00031     
00032     /** Create a BUS display interface
00033     * @param displayproto BUS_8 or BUS_16
00034     * @param buspins array of PinName to group as Bus
00035     * @param CS pin connected to CS of display
00036     * @param reset pin connected to RESET of display
00037     * @param DC pin connected to data/command of display
00038     * @param WR pin connected to SDI of display
00039     * @param RD pin connected to RS of display
00040     * @param name The name used by the parent class to access the interface
00041     * @param LCDSIZE_X x size in pixel - optional
00042     * @param LCDSIZE_Y y size in pixel - optional
00043     */ 
00044     S6D04D1(proto_t displayproto, PinName* buspins, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD, const char* name ,const unsigned int LCDSIZE_X = 240, unsigned  int LCDSIZE_Y = 400);
00045 
00046     
00047     /** Create an SPI display interface
00048     * @param displayproto SPI_8 or SPI_16
00049     * @param Hz SPI speed in Hz
00050     * @param mosi SPI pin
00051     * @param miso SPI pin
00052     * @param sclk SPI pin
00053     * @param CS pin connected to CS of display
00054     * @param reset pin connected to RESET of display
00055     * @param DC pin connected to data/command of display
00056     * @param name The name used by the parent class to access the interface
00057     * @param LCDSIZE_X x size in pixel - optional
00058     * @param LCDSIZE_Y y size in pixel - optional
00059     */ 
00060     S6D04D1(proto_t displayproto, int Hz, PinName mosi, PinName miso, PinName sclk, PinName CS, PinName reset, PinName DC, const char* name , unsigned int LCDSIZE_X = 240, unsigned  int LCDSIZE_Y = 400);
00061     
00062    // unsigned int status();
00063   
00064 
00065   
00066 protected:
00067     
00068     
00069     /** Init command sequence  
00070     */
00071     void init();
00072 
00073 
00074 };
00075 #endif