Lib for the new LCD Display with ILI9341 controller
Diff: SPI_TFT_ILI9341.h
- Revision:
- 11:59eca2723ec5
- Parent:
- 6:fe07ae8329f7
- Child:
- 12:98cc5c193ecd
--- 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; + };