Sensorian  1.0
C API Reference Guide Library
TFT Display

Functions

void TFT_Initialize (void)
 This function intializes the display controller and prepares it for any subsequent operations. More...
 
void TFT_WriteCommand (unsigned char command)
 This function writes a command byte to the display controller. More...
 
void TFT_WriteData (unsigned char datab)
 This function is used to write data to the TFT controller. More...
 
void TFT_WriteDataWord (int wdata)
 This function writes a 16 bit word on the display controller registers. More...
 
void TFT_RamAdress (void)
 
void TFT_SetPixel (unsigned char x_start, unsigned char y_start, unsigned int color)
 This functions sets a specific pixel on the TFT display. More...
 
void TFT_Sleep (void)
 Puts the display in a low power mode. More...
 
void TFT_WakeUp (void)
 Wakes the display from sleep mode. More...
 
void TFT_TurnOffDisplay (void)
 Blanks out the display. More...
 
void TFT_TurnOnDisplay (void)
 This function turns on the display from idle mode. More...
 
void TFT_SetOrientation (orientation_t mode)
 Sets the display text orientation. Mirrored modes are also supported on top of portrait and landscape modes. More...
 
void TFT_InvertDisplay (void)
 Enables color inversion on the display. More...
 
void TFT_InvertDisplayOff (void)
 Disables color inversion on the display. More...
 
void TFT_Background (int color)
 This function paints the display background a specific color. More...
 
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. More...
 
void TFT_DisplayImage (Image_t *image, unsigned char x, unsigned char y)
 This function displays an image of type Image_t on screen. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Variables

const unsigned char FontASCII8X16 []
 
const unsigned char FontASCII8X16 []
 
const unsigned char FontASCII8X16 []
 
const unsigned char FontASCII8X16 []
 

Detailed Description

TFT driver for ST7735 controller 1.8 inch display.

Function Documentation

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.

Parameters
xX coordinates
yY coordinates
colorColor of numbers above background.
backgroundColor of text background.
letterAscii character to print
sizeSize of font
Returns
none

Definition at line 399 of file TFT.c.

void TFT_Background ( int  color)

This function paints the display background a specific color.

Parameters
colorColor of the background
Returns
none
Examples:
CapacitiveTouch.c.

Definition at line 324 of file TFT.c.

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.

Parameters
rRed color
gGreen color
bBlue color
Returns
16 bit packed rgb

Definition at line 384 of file TFT.c.

void TFT_DisplayImage ( Image_t image,
unsigned char  x,
unsigned char  y 
)

This function displays an image of type Image_t on screen.

Parameters
imageImage type structure
xStart X coordinate
yStart Y coordinate
Returns
none

Definition at line 363 of file TFT.c.

void TFT_Initialize ( void  )

This function intializes the display controller and prepares it for any subsequent operations.

Returns
none
Examples:
CapacitiveTouch.c.

Definition at line 24 of file TFT.c.

void TFT_InvertDisplay ( void  )

Enables color inversion on the display.

Returns
none

Definition at line 305 of file TFT.c.

void TFT_InvertDisplayOff ( void  )

Disables color inversion on the display.

Returns
none

Definition at line 314 of file TFT.c.

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.

Parameters
xInitial X coordinates
yInitial Y coordinates
colorColor of numbers above background.
backgroundColor of text background.
integerNumber to print as an int
sizeSize of font
Returns
none

Definition at line 465 of file TFT.c.

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.

Parameters
xInitial X coordinates
yInitial Y coordinates
colorColor of numbers above background.
backgroundColor of text background.
messagePointer to string array of chars
sizeSize of font
Returns
none

Definition at line 440 of file TFT.c.

void TFT_RamAdress ( void  )

Set RAM address for controller.

Returns
none

Definition at line 183 of file TFT.c.

void TFT_SetOrientation ( orientation_t  mode)

Sets the display text orientation. Mirrored modes are also supported on top of portrait and landscape modes.

Parameters
modeorientation data type
Returns
none

Definition at line 269 of file TFT.c.

void TFT_SetPixel ( unsigned char  x_start,
unsigned char  y_start,
unsigned int  color 
)

This functions sets a specific pixel on the TFT display.

Parameters
x_startStarting X coordinate
y_startStarting y coordinate
colorColor of the pixel
Returns
none

Definition at line 206 of file TFT.c.

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.

Parameters
picture[]Integer array containg picture image in rgb565 format
widthImage width
heightImage height
xX coordinates of image
yY coordinates of image
Returns
none

Definition at line 342 of file TFT.c.

void TFT_Sleep ( void  )

Puts the display in a low power mode.

Returns
none

Definition at line 229 of file TFT.c.

void TFT_TurnOffDisplay ( void  )

Blanks out the display.

Returns
none

Definition at line 249 of file TFT.c.

void TFT_TurnOnDisplay ( void  )

This function turns on the display from idle mode.

Returns
none

Definition at line 258 of file TFT.c.

void TFT_WakeUp ( void  )

Wakes the display from sleep mode.

Returns
none

Definition at line 239 of file TFT.c.

void TFT_WriteCommand ( unsigned char  command)

This function writes a command byte to the display controller.

Parameters
commandCommnand byte.
Returns
none

Definition at line 144 of file TFT.c.

void TFT_WriteData ( unsigned char  datab)

This function is used to write data to the TFT controller.

Parameters
databByte data
Returns
none

Definition at line 157 of file TFT.c.

void TFT_WriteDataWord ( int  wdata)

This function writes a 16 bit word on the display controller registers.

Parameters
wdata16 bit word data.
Returns
none

Definition at line 170 of file TFT.c.

Variable Documentation

const unsigned char FontASCII8X16[]
const unsigned char FontASCII8X16[]
const unsigned char FontASCII8X16[]
const unsigned char FontASCII8X16[]