206 void TFT_SetPixel(
unsigned char x_start,
unsigned char y_start,
unsigned int color)
342 void TFT_ShowPic(
unsigned int picture[],
unsigned char width,
unsigned char height,
unsigned int x,
unsigned int y)
348 for(j=0;j<height;j++)
367 for(i=0;i<image->
width;i++)
369 for(j=0;j<image->
height;j++)
384 unsigned int TFT_Color565(
unsigned char r,
unsigned char g,
unsigned char b)
386 return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
399 void TFT_ASCII(
char x,
char y,
int color,
int background,
char letter,
char size)
401 unsigned char b,q,d,z;
405 data =
font[(
unsigned char)letter][q];
406 for(z=0;z<8*size;z++)
440 void TFT_PrintString(
char x,
char y,
int color,
int background,
char * message,
char size)
444 TFT_ASCII(x,y,color,background,*message++, size);
467 unsigned char tenthousands,thousands,hundreds,tens,ones;
468 tenthousands = integer / 10000;
469 TFT_ASCII(x,y,color,background,tenthousands+48, size);
470 thousands = ((integer - tenthousands*10000)) / 1000;
472 TFT_ASCII(x,y,color,background,thousands+48, size);
473 hundreds = (((integer - tenthousands*10000) - thousands*1000)-1) / 100;
475 TFT_ASCII(x,y,color,background,hundreds+48, size);
476 tens=(integer%100)/10;
478 TFT_ASCII(x,y,color,background,tens+48, size);
481 TFT_ASCII(x,y,color,background,ones+48, size);
void TFT_SetOrientation(orientation_t mode)
Sets the display text orientation. Mirrored modes are also supported on top of portrait and landscape...
void TFT_Background(int color)
This function paints the display background a specific color.
void TFT_InvertDisplayOff(void)
Disables color inversion on the display.
const unsigned char font[]
void TFT_TurnOnDisplay(void)
This function turns on the display from idle mode.
void TFT_WriteCommand(unsigned char command)
This function writes a command byte to the display controller.
const unsigned char FontASCII8X16[]
void TFT_ShowPic(unsigned int picture[], unsigned char width, unsigned char height, unsigned int x, unsigned int y)
This function paints an image with a specific heigh and width on the display at a specific coordinate...
void TFT_Sleep(void)
Puts the display in a low power mode.
void TFT_WakeUp(void)
Wakes the display from sleep mode.
void TFT_SetPixel(unsigned char x_start, unsigned char y_start, unsigned int color)
This functions sets a specific pixel on the TFT display.
unsigned char SPI_Write(unsigned char data)
Writes a byte of data to the SPI bus.
void TFT_InvertDisplay(void)
Enables color inversion on the display.
void TFT_WriteData(unsigned char datab)
This function is used to write data to the TFT controller.
orientation_t
Orientation type. Specific orientation modes of the device.
void TFT_PrintString(char x, char y, int color, int background, char *message, char size)
Orint a colored string at coordinates x,y with a specific font size.
void TFT_TurnOffDisplay(void)
Blanks out the display.
void TFT_DisplayImage(Image_t *image, unsigned char x, unsigned char y)
This function displays an image of type Image_t on screen.
void TFT_WriteDataWord(int wdata)
This function writes a 16 bit word on the display controller registers.
unsigned int TFT_Color565(unsigned char r, unsigned char g, unsigned char b)
Pass 8-bit (each) R,G,B, get back 16-bit packed color.
void TFT_ASCII(char x, char y, int color, int background, char letter, char size)
Plot an ASCII char on the display. A specific font is used.
void TFT_PrintInteger(char x, char y, int color, int background, int integer, char size)
Prints an integer at coordinates x,y with a specific color on a specific background. The integer font size is deterined bu var size.
Image type. Contains image array with height and width dimensions.
void TFT_Initialize(void)
This function intializes the display controller and prepares it for any subsequent operations...