Nothing really changed. Its just forked in case there will be some changes for the Floranium Project.
Dependents: floranionSciShield
Fork of SPI_TFT_ILI9341 by
Diff: SPI_TFT_ILI9341.h
- Revision:
- 6:fe07ae8329f7
- Parent:
- 2:0a16083193a4
- Child:
- 8:07ad6a48a85d
- Child:
- 11:59eca2723ec5
--- a/SPI_TFT_ILI9341.h Tue Oct 22 20:55:39 2013 +0000 +++ b/SPI_TFT_ILI9341.h Sun Jan 26 16:58:45 2014 +0000 @@ -95,7 +95,6 @@ /** Get the width of the screen in pixel * - * @param * @returns width of screen in pixel * */ @@ -130,12 +129,8 @@ * @param x0,y0 center * @param r radius * @param color 16 bit color * - * - * use circle with different radius, - * can miss some pixel */ void fillcircle(int x, int y, int r, int colour); - /** draw a 1 pixel line @@ -231,21 +226,22 @@ void Bitmap(unsigned int x, unsigned int y, unsigned int w, unsigned int h,unsigned char *bitmap); - /** paint a 16 bit BMP from local filesytem on the TFT (slow) + /** paint a 16 bit BMP from filesytem on the TFT (slow) + * + * @param x,y : position of upper left corner + * @param *Name_BMP name of the BMP file with drive: "/local/test.bmp" * - * @param x,y : upper left corner - * @param *Name_BMP name of the BMP file * @returns 1 if bmp file was found and painted - * @returns -1 if bmp file was found not found - * @returns -2 if bmp file is not 16bit + * @returns 0 if bmp file was found not found + * @returns -1 if file is no bmp + * @returns -2 if bmp file is no 16 bit bmp * @returns -3 if bmp file is to big for screen * @returns -4 if buffer malloc go wrong * * bitmap format: 16 bit R5 G6 B5 * * use Gimp to create / load , save as BMP, option 16 bit R5 G6 B5 - * copy to internal file system - * + * copy to internal file system or SD card */ int BMP_16(unsigned int x, unsigned int y, const char *Name_BMP); @@ -274,6 +270,15 @@ * */ void set_orientation(unsigned int o); + + + /** read out the manufacturer ID of the LCD + * can used for checking the connection to the display + * @returns ID + */ + int Read_ID(void); + + SPI _spi; DigitalOut _cs; @@ -322,7 +327,7 @@ - /** Init the HX8347D controller + /** Init the ILI9341 controller * */ void tft_reset(); @@ -359,12 +364,17 @@ */ //void wr_dat_only(unsigned short dat); - /** Read data from the LCD controller + /** Read byte from the LCD controller * + * @param cmd comand to controller * @returns data from LCD controller * */ - //unsigned short rd_dat(void); + char rd_byte(unsigned char cmd); + + + int rd_32(unsigned char cmd); + /** Write a value to the to a LCD register * @@ -384,6 +394,7 @@ unsigned int orientation; unsigned int char_x; unsigned int char_y; + PinName clk; };