Darren Ulrich / UniGraphic

Dependents:   Bicycl_Computer_NUCLEO-F411RE Bicycl_Computer_NUCLEO-L476RG

Fork of UniGraphic by GraphicsDisplay

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ILI9341.h Source File

ILI9341.h

00001 #ifndef MBED_ILI9341_H
00002 #define MBED_ILI9341_H
00003 
00004 
00005 
00006 #include "mbed.h"
00007 #include "TFT.h"
00008 
00009 /** Class for ILI9341 tft display controller
00010 * to be copypasted and adapted for other controllers
00011 */
00012 class ILI9341 : public TFT
00013 {
00014  
00015  public:
00016 
00017     /** Create a PAR display interface
00018     * @param displayproto PAR_8 or PAR_16
00019     * @param port GPIO port name to use
00020     * @param CS pin connected to CS of display
00021     * @param reset pin connected to RESET of display
00022     * @param DC pin connected to data/command of display
00023     * @param WR pin connected to SDI of display
00024     * @param RD pin connected to RS of display
00025     * @param name The name used by the parent class to access the interface
00026     * @param LCDSIZE_X x size in pixel - optional
00027     * @param LCDSIZE_Y y size in pixel - optional
00028     */ 
00029     //ILI9341(proto_t displayproto, PortName port, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD, const char* name);
00030     ILI9341(proto_t displayproto, PortName port, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD, const char* name ,const unsigned int LCDSIZE_X = 240, unsigned  int LCDSIZE_Y = 320);
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     //ILI9341(proto_t displayproto, int Hz, PinName mosi, PinName miso, PinName sclk, PinName CS, PinName reset, PinName DC, const char* name);
00046     ILI9341(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 = 320);
00047   
00048 
00049   
00050 protected:
00051     
00052     
00053     /** Init command sequence  
00054     */
00055     void init();
00056 
00057 
00058 
00059 };
00060 #endif