Basically i glued Peter Drescher and Simon Ford libs in a GraphicsDisplay class, then derived TFT or LCD class (which inherits Protocols class), then the most derived ones (Inits), which are per-display and are the only part needed to be adapted to diff hw.

Fork of UniGraphic by GraphicsDisplay

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TFT_MIPI.h Source File

TFT_MIPI.h

00001 #ifndef MBED_TFT_MIPI_H
00002 #define MBED_TFT_MIPI_H
00003 
00004 
00005 
00006 #include "mbed.h"
00007 #include "TFT.h"
00008 
00009 /** Class for (quite)standard MIPI-DBI TypeB (parallel) and TypeC (spi) TFT display controller
00010 * for Ilitek ILI9481, Renesas R61581, Raydium RM68042
00011 * to be copypasted and adapted for other controllers
00012 */
00013 class TFT_MIPI : 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     TFT_MIPI(proto_t displayproto, PortName port, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD, const char* name , unsigned int LCDSIZE_X = 320, unsigned  int LCDSIZE_Y = 480);
00031   
00032     /** Create an SPI display interface
00033     * @param displayproto SPI_8 or SPI_16
00034     * @param Hz SPI speed in Hz
00035     * @param mosi SPI pin
00036     * @param miso SPI pin
00037     * @param sclk SPI pin
00038     * @param CS pin connected to CS of display
00039     * @param reset pin connected to RESET of display
00040     * @param DC pin connected to data/command of display
00041     * @param name The name used by the parent class to access the interface
00042     * @param LCDSIZE_X x size in pixel - optional
00043     * @param LCDSIZE_Y y size in pixel - optional
00044     */ 
00045     TFT_MIPI(proto_t displayproto, int Hz, PinName mosi, PinName miso, PinName sclk, PinName CS, PinName reset, PinName DC, const char* name , unsigned int LCDSIZE_X = 320, unsigned  int LCDSIZE_Y = 480);
00046   
00047 
00048   
00049 protected:
00050     
00051     
00052     /** Init command sequence  
00053     */
00054     void init();
00055 
00056 
00057 
00058 };
00059 #endif