UniGraphics Library Fork to support mbed os 6.3 Release for ILI9341
Dependents: TFT_ILI9341_UniGraphic TFT_ILI9341_os6
Inits/ILI9341.h@0:bb2bda4f5846, 2020-10-06 (annotated)
- Committer:
- amouroug
- Date:
- Tue Oct 06 05:07:55 2020 +0000
- Revision:
- 0:bb2bda4f5846
Unigraphics Library Fork to support mbed-os 6.3 for ILI9341;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
amouroug | 0:bb2bda4f5846 | 1 | #ifndef MBED_ILI9341_H |
amouroug | 0:bb2bda4f5846 | 2 | #define MBED_ILI9341_H |
amouroug | 0:bb2bda4f5846 | 3 | |
amouroug | 0:bb2bda4f5846 | 4 | |
amouroug | 0:bb2bda4f5846 | 5 | |
amouroug | 0:bb2bda4f5846 | 6 | #include "mbed.h" |
amouroug | 0:bb2bda4f5846 | 7 | #include "TFT.h" |
amouroug | 0:bb2bda4f5846 | 8 | |
amouroug | 0:bb2bda4f5846 | 9 | /** Class for ILI9341 tft display controller |
amouroug | 0:bb2bda4f5846 | 10 | * to be copypasted and adapted for other controllers |
amouroug | 0:bb2bda4f5846 | 11 | */ |
amouroug | 0:bb2bda4f5846 | 12 | class ILI9341 : public TFT |
amouroug | 0:bb2bda4f5846 | 13 | { |
amouroug | 0:bb2bda4f5846 | 14 | |
amouroug | 0:bb2bda4f5846 | 15 | public: |
amouroug | 0:bb2bda4f5846 | 16 | |
amouroug | 0:bb2bda4f5846 | 17 | /** Create a PAR display interface |
amouroug | 0:bb2bda4f5846 | 18 | * @param displayproto PAR_8 or PAR_16 |
amouroug | 0:bb2bda4f5846 | 19 | * @param port GPIO port name to use |
amouroug | 0:bb2bda4f5846 | 20 | * @param CS pin connected to CS of display |
amouroug | 0:bb2bda4f5846 | 21 | * @param reset pin connected to RESET of display |
amouroug | 0:bb2bda4f5846 | 22 | * @param DC pin connected to data/command of display |
amouroug | 0:bb2bda4f5846 | 23 | * @param WR pin connected to SDI of display |
amouroug | 0:bb2bda4f5846 | 24 | * @param RD pin connected to RS of display |
amouroug | 0:bb2bda4f5846 | 25 | * @param name The name used by the parent class to access the interface |
amouroug | 0:bb2bda4f5846 | 26 | * @param LCDSIZE_X x size in pixel - optional |
amouroug | 0:bb2bda4f5846 | 27 | * @param LCDSIZE_Y y size in pixel - optional |
amouroug | 0:bb2bda4f5846 | 28 | */ |
amouroug | 0:bb2bda4f5846 | 29 | 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); |
amouroug | 0:bb2bda4f5846 | 30 | |
amouroug | 0:bb2bda4f5846 | 31 | /** Create a BUS display interface |
amouroug | 0:bb2bda4f5846 | 32 | * @param displayproto BUS_8 or BUS_16 |
amouroug | 0:bb2bda4f5846 | 33 | * @param buspins array of PinName to group as Bus |
amouroug | 0:bb2bda4f5846 | 34 | * @param CS pin connected to CS of display |
amouroug | 0:bb2bda4f5846 | 35 | * @param reset pin connected to RESET of display |
amouroug | 0:bb2bda4f5846 | 36 | * @param DC pin connected to data/command of display |
amouroug | 0:bb2bda4f5846 | 37 | * @param WR pin connected to SDI of display |
amouroug | 0:bb2bda4f5846 | 38 | * @param RD pin connected to RS of display |
amouroug | 0:bb2bda4f5846 | 39 | * @param name The name used by the parent class to access the interface |
amouroug | 0:bb2bda4f5846 | 40 | * @param LCDSIZE_X x size in pixel - optional |
amouroug | 0:bb2bda4f5846 | 41 | * @param LCDSIZE_Y y size in pixel - optional |
amouroug | 0:bb2bda4f5846 | 42 | */ |
amouroug | 0:bb2bda4f5846 | 43 | ILI9341(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 = 320); |
amouroug | 0:bb2bda4f5846 | 44 | |
amouroug | 0:bb2bda4f5846 | 45 | /** Create an SPI display interface |
amouroug | 0:bb2bda4f5846 | 46 | * @param displayproto SPI_8 or SPI_16 |
amouroug | 0:bb2bda4f5846 | 47 | * @param Hz SPI speed in Hz |
amouroug | 0:bb2bda4f5846 | 48 | * @param mosi SPI pin |
amouroug | 0:bb2bda4f5846 | 49 | * @param miso SPI pin |
amouroug | 0:bb2bda4f5846 | 50 | * @param sclk SPI pin |
amouroug | 0:bb2bda4f5846 | 51 | * @param CS pin connected to CS of display |
amouroug | 0:bb2bda4f5846 | 52 | * @param reset pin connected to RESET of display |
amouroug | 0:bb2bda4f5846 | 53 | * @param DC pin connected to data/command of display |
amouroug | 0:bb2bda4f5846 | 54 | * @param name The name used by the parent class to access the interface |
amouroug | 0:bb2bda4f5846 | 55 | * @param LCDSIZE_X x size in pixel - optional |
amouroug | 0:bb2bda4f5846 | 56 | * @param LCDSIZE_Y y size in pixel - optional |
amouroug | 0:bb2bda4f5846 | 57 | */ |
amouroug | 0:bb2bda4f5846 | 58 | 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); |
amouroug | 0:bb2bda4f5846 | 59 | |
amouroug | 0:bb2bda4f5846 | 60 | |
amouroug | 0:bb2bda4f5846 | 61 | |
amouroug | 0:bb2bda4f5846 | 62 | protected: |
amouroug | 0:bb2bda4f5846 | 63 | |
amouroug | 0:bb2bda4f5846 | 64 | |
amouroug | 0:bb2bda4f5846 | 65 | /** Init command sequence |
amouroug | 0:bb2bda4f5846 | 66 | */ |
amouroug | 0:bb2bda4f5846 | 67 | void init(); |
amouroug | 0:bb2bda4f5846 | 68 | |
amouroug | 0:bb2bda4f5846 | 69 | |
amouroug | 0:bb2bda4f5846 | 70 | |
amouroug | 0:bb2bda4f5846 | 71 | }; |
amouroug | 0:bb2bda4f5846 | 72 | #endif |