Gustavo D. Serafim / UniGraphicILI9486GraphicsTest

Dependents:   mbed_ili9486

Committer:
guhserafs
Date:
Wed May 20 12:57:44 2020 +0000
Revision:
34:64275ddf034c
Parent:
18:ffa58f1a680a
Changed ili9486 init methods to support pinName arrays.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Geremia 4:12ba0ecc2c1f 1 #ifndef MBED_ILI9486_H
Geremia 4:12ba0ecc2c1f 2 #define MBED_ILI9486_H
Geremia 4:12ba0ecc2c1f 3
Geremia 4:12ba0ecc2c1f 4
Geremia 4:12ba0ecc2c1f 5
Geremia 4:12ba0ecc2c1f 6 #include "mbed.h"
Geremia 4:12ba0ecc2c1f 7 #include "TFT.h"
Geremia 4:12ba0ecc2c1f 8
Geremia 4:12ba0ecc2c1f 9 /** Class for ILI9486 tft display controller
Geremia 4:12ba0ecc2c1f 10 * to be copypasted and adapted for other controllers
Geremia 4:12ba0ecc2c1f 11 */
Geremia 4:12ba0ecc2c1f 12 class ILI9486 : public TFT
Geremia 4:12ba0ecc2c1f 13 {
Geremia 4:12ba0ecc2c1f 14
Geremia 4:12ba0ecc2c1f 15 public:
Geremia 4:12ba0ecc2c1f 16
Geremia 4:12ba0ecc2c1f 17 /** Create a PAR display interface
Geremia 18:ffa58f1a680a 18 * @param displayproto PAR_8 or PAR_16
Geremia 4:12ba0ecc2c1f 19 * @param port GPIO port name to use
Geremia 4:12ba0ecc2c1f 20 * @param CS pin connected to CS of display
Geremia 4:12ba0ecc2c1f 21 * @param reset pin connected to RESET of display
Geremia 4:12ba0ecc2c1f 22 * @param DC pin connected to data/command of display
Geremia 4:12ba0ecc2c1f 23 * @param WR pin connected to SDI of display
Geremia 4:12ba0ecc2c1f 24 * @param RD pin connected to RS of display
Geremia 4:12ba0ecc2c1f 25 * @param name The name used by the parent class to access the interface
dreschpe 9:1749ae993cfe 26 * @param LCDSIZE_X x size in pixel - optional
dreschpe 9:1749ae993cfe 27 * @param LCDSIZE_Y y size in pixel - optional
Geremia 4:12ba0ecc2c1f 28 */
dreschpe 9:1749ae993cfe 29 ILI9486(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);
guhserafs 34:64275ddf034c 30
guhserafs 34:64275ddf034c 31 /** Create a BUS display interface
guhserafs 34:64275ddf034c 32 * @param displayproto BUS_8 or BUS_16
guhserafs 34:64275ddf034c 33 * @param port GPIO port name to use
guhserafs 34:64275ddf034c 34 * @param CS pin connected to CS of display
guhserafs 34:64275ddf034c 35 * @param reset pin connected to RESET of display
guhserafs 34:64275ddf034c 36 * @param DC pin connected to data/command of display
guhserafs 34:64275ddf034c 37 * @param WR pin connected to SDI of display
guhserafs 34:64275ddf034c 38 * @param RD pin connected to RS of display
guhserafs 34:64275ddf034c 39 * @param name The name used by the parent class to access the interface
guhserafs 34:64275ddf034c 40 * @param LCDSIZE_X x size in pixel - optional
guhserafs 34:64275ddf034c 41 * @param LCDSIZE_Y y size in pixel - optional
guhserafs 34:64275ddf034c 42 */
guhserafs 34:64275ddf034c 43
guhserafs 34:64275ddf034c 44 ILI9486(proto_t displayproto, PinName* buspins, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD, const char* name, unsigned int LCDSIZE_X = 320, unsigned int LCDSIZE_Y = 480);
Geremia 4:12ba0ecc2c1f 45
Geremia 4:12ba0ecc2c1f 46 /** Create an SPI display interface
Geremia 18:ffa58f1a680a 47 * @param displayproto SPI_8 or SPI_16
Geremia 4:12ba0ecc2c1f 48 * @param Hz SPI speed in Hz
Geremia 4:12ba0ecc2c1f 49 * @param mosi SPI pin
Geremia 4:12ba0ecc2c1f 50 * @param miso SPI pin
Geremia 4:12ba0ecc2c1f 51 * @param sclk SPI pin
Geremia 4:12ba0ecc2c1f 52 * @param CS pin connected to CS of display
Geremia 4:12ba0ecc2c1f 53 * @param reset pin connected to RESET of display
Geremia 4:12ba0ecc2c1f 54 * @param DC pin connected to data/command of display
Geremia 4:12ba0ecc2c1f 55 * @param name The name used by the parent class to access the interface
dreschpe 9:1749ae993cfe 56 * @param LCDSIZE_X x size in pixel - optional
dreschpe 9:1749ae993cfe 57 * @param LCDSIZE_Y y size in pixel - optional
Geremia 4:12ba0ecc2c1f 58 */
dreschpe 9:1749ae993cfe 59 ILI9486(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);
Geremia 4:12ba0ecc2c1f 60
Geremia 4:12ba0ecc2c1f 61
Geremia 4:12ba0ecc2c1f 62
Geremia 4:12ba0ecc2c1f 63 protected:
Geremia 4:12ba0ecc2c1f 64
Geremia 4:12ba0ecc2c1f 65
Geremia 4:12ba0ecc2c1f 66 /** Init command sequence
Geremia 4:12ba0ecc2c1f 67 */
Geremia 4:12ba0ecc2c1f 68 void init();
Geremia 4:12ba0ecc2c1f 69
Geremia 4:12ba0ecc2c1f 70
Geremia 4:12ba0ecc2c1f 71
Geremia 4:12ba0ecc2c1f 72 };
Geremia 4:12ba0ecc2c1f 73 #endif