Lib for the new LCD Display with ILI9341 controller Modified for huge fonts (>255 bytes/char). Needs modified font.h files with 2-byte size parameter. Window size is set on a per-character basis to minimise the number of pixels written (speed-up, plus better detection of whether one last character will fit on the current line). NUCLEO & NXP DMA-enabled versions are modified but untested.
Fork of SPI_TFT_ILI9341 by
Diff: SPI_TFT_ILI9341.h
- Revision:
- 11:59eca2723ec5
- Parent:
- 6:fe07ae8329f7
- Child:
- 12:98cc5c193ecd
diff -r 50f88bd5557f -r 59eca2723ec5 SPI_TFT_ILI9341.h --- a/SPI_TFT_ILI9341.h Sun Jun 22 22:32:01 2014 +0000 +++ b/SPI_TFT_ILI9341.h Tue Jun 24 15:37:52 2014 +0000 @@ -13,7 +13,6 @@ /* change the char position handling * use pixel (x,y) instadt of colum row */ - #ifndef MBED_SPI_TFT_ILI9341_H #define MBED_SPI_TFT_ILI9341_H @@ -78,7 +77,7 @@ * } * @endcode */ - class SPI_TFT_ILI9341 : public GraphicsDisplay { + class SPI_TFT_ILI9341 : public GraphicsDisplay , public SPI { public: /** Create a SPI_TFT object connected to SPI and three pins @@ -278,9 +277,6 @@ */ int Read_ID(void); - - - SPI _spi; DigitalOut _cs; DigitalOut _reset; DigitalOut _dc; @@ -390,12 +386,24 @@ */ //unsigned short rd_reg (unsigned char reg); + #ifdef TARGET_NUCLEO_L152RE + /** fast SPI write function for optimized versions + * + * @param data data written to SPI + * + */ + virtual void f_write(int data); + virtual void spi_bsy(void); + virtual void spi_16(bool s); + + #endif + unsigned char spi_port; unsigned int orientation; unsigned int char_x; unsigned int char_y; - PinName clk; - + unsigned char spi_num; + };