TFT Library
Thin film transistor liquid crystal display (TFT-LCD) is a variant of liquid crystal display (LCD) which uses thin-film transistor (TFT) technology to improve image quality (e.g., addressability, contrast).
TFT LCD is one type of active matrix LCD, though all LCD-screens are based on TFT active matrix addressing.
TFT LCDs are used in television sets, computer monitors, mobile phones, handheld video game systems, personal digital assistants, navigation systems, projectors, etc.
The mikroPascal PRO for ARM provides a library for working with the following display controllers :
- Himax HX8347D, HX8347G and HX8352A,
- Solomon Systech SSD1963,
- Renesas SP R61526,
- Sitronix SST7715R,
- Ilitek ILI9340, ILI9342 and ILI9481.

- All display controllers are initialized with 65,536 colors (R(5),G(6),B(5)).
- This library is valid for TFT controllers in 8-bit/16-bit working mode for STM32 devices and TFT controllers in 8-bit working mode for Stellaris devices.
External dependencies of TFT Library
Stellaris
The following variables must be defined in all projects using TFT library: | Description : | Example : |
---|---|---|
var TFT_DataPort : byte; external; sfr; |
TFT Data Port. | var TFT_DataPort : byte at GPIO_PORTJ_DATA; |
var TFT_DataPort_Direction : byte; external; sfr; |
Direction of the TFT Data Port. | var TFT_DataPort_Direction : byte at GPIO_PORTJ_DIR; |
var TFT_WR : sbit; sfr; external; |
Write signal. | var TFT_WR : sbit at GPIO_PORTH_DATA4_bit; |
var TFT_RD : sbit; sfr; external; |
Read signal. | var TFT_RD : sbit at GPIO_PORTC_DATA5_bit; |
var TFT_CS : sbit; sfr; external; |
Chip Select signal. | var TFT_CS : sbit at GPIO_PORTH_DATA6_bit; |
var TFT_RS : sbit; sfr; external; |
Command/Register Select signal. | var TFT_RS : sbit at GPIO_PORTG_DATA7_bit; |
var TFT_RST : sbit; sfr; external; |
Reset signal. | var TFT_RST : sbit at GPIO_PORTH_DATA5_bit; |
var TFT_WR_Direction : sbit; sfr; external; |
Direction of the Write pin. | var TFT_WR_Direction : sbit at GPIO_PORTH_DIR4_bit; |
var TFT_RD_Direction : sbit; sfr; external; |
Direction of the Read pin. | var TFT_RD_Direction : sbit at GPIO_PORTC_DIR5_bit; |
var TFT_CS_Direction : sbit; sfr; external; |
Direction of the Chip Select pin. | var TFT_CS_Direction : sbit at GPIO_PORTH_DIR6_bit; |
var TFT_RS_Direction : sbit; sfr; external; |
Direction of the Register Select pin. | var TFT_RS_Direction : sbit at GPIO_PORTG_DIR7_bit; |
var TFT_RST_Direction : sbit; sfr; external; |
Direction of the Reset pin. | var TFT_RST_Direction : sbit at GPIO_PORTH_DIR5_bit; |
STM32
The following variables must be defined in all projects using TFT Library: | Description : | Example : |
---|---|---|
var TFT_DataPort : word; external; sfr; |
TFT Data Port. | var TFT_DataPort : word at GPIOD_ODR; |
var TFT_WR : sbit; sfr; external; |
Write signal. | var TFT_WR : sbit at GPIOE_ODR.B9; |
var TFT_RD : sbit; sfr; external; |
Read signal. | var TFT_RD : sbit at GPIOE_ODR.B10; |
var TFT_CS : sbit; sfr; external; |
Chip Select signal. | var TFT_CS : sbit at GPIOE_ODR.B12; |
var TFT_RS : sbit; sfr; external; |
Command/Register Select signal. | var TFT_RS : sbit at GPIOE_ODR.B8; |
var TFT_RST : sbit; sfr; external; |
Reset signal. | var TFT_RST : sbit at GPIOE_ODR.B13; |
Library Routines
- TFT_Init
- TFT_Init_HX8347G
- TFT_Init_R61526
- TFT_Init_SST7715R
- TFT_Init_HX8352A
- TFT_Init_ILI9340
- TFT_Init_ILI9342
- TFT_Init_ILI9481
- TFT_Init_SSD1963
- TFT_Init_HX8347G_16bit
- TFT_Init_SSD1963_8bit
- TFT_Init_ILI9340_8bit
- TFT_Init_ILI9481_8bit
- TFT_Init_Custom
- TFT_Init_HX8347G_Custom
- TFT_Init_R61526_Custom
- TFT_Init_SST7715R_Custom
- TFT_Init_HX8352A_Custom
- TFT_Init_ILI9340_Custom
- TFT_Init_ILI9342_Custom
- TFT_Init_ILI9481_Custom
- TFT_Init_SSD1963_Custom
- TFT_Init_HX8347G_16bit_Custom
- TFT_Init_SSD1963_8bit_Custom
- TFT_Init_ILI9340_8bit_Custom
- TFT_Init_ILI9481_8bit_Custom
- TFT_Set_Index
- TFT_SSD1963_8bit_Set_Index
- TFT_Write_Command
- TFT_SSD1963YT_8bit_Write_Command
- TFT_Write_Data
- TFT_SSD1963_8bit_Write_Data
- TFT_Set_Reg
- TFT_SSD1963_8bit_Set_Reg
- TFT_Set_Ext_Buffer
- TFT_Set_Active
- TFT_Set_Default_Mode
- TFT_Set_Font
- TFT_Set_Ext_Font
- TFT_Write_Char
- TFT_Write_Text
- TFT_Fill_Screen
- TFT_Set_Pen
- TFT_Set_Brush
- TFT_Dot
- TFT_Line
- TFT_H_Line
- TFT_V_Line
- TFT_Rectangle
- TFT_Rectangle_Round_Edges
- TFT_Circle
- TFT_Image
- TFT_Ext_Image
- TFT_Partial_Image
- TFT_Ext_Partial_Image
- TFT_Image_Jpeg
- TFT_RGBToColor16bit
- TFT_Color16bitToRGB
- TFT_Rotate_180
TFT_Init
Prototype |
procedure TFT_Init(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes HX8347-D display controller display in the 8-bit working mode for Stellaris devices and 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
Stellaris// TFT module connections var TFT_DataPort : char at GPIO_PORTJ_DATA; TFT_RST : sbit at GPIO_PORTH_DATA5_bit; TFT_RS : sbit at GPIO_PORTG_DATA7_bit; TFT_CS : sbit at GPIO_PORTH_DATA6_bit; TFT_RD : sbit at GPIO_PORTC_DATA5_bit; TFT_WR : sbit at GPIO_PORTH_DATA4_bit; TFT_DataPort_Direction : char at GPIO_PORTJ_DIR; TFT_RST_Direction : sbit at GPIO_PORTH_DIR5_bit; TFT_RS_Direction : sbit at GPIO_PORTG_DIR7_bit; TFT_CS_Direction : sbit at GPIO_PORTH_DIR6_bit; TFT_RD_Direction : sbit at GPIO_PORTC_DIR5_bit; TFT_WR_Direction : sbit at GPIO_PORTH_DIR4_bit; // End TFT module connections // Initialize 240x320 TFT display TFT_Init(240, 320); STM32// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init(240, 320); |
TFT_Init_HX8347G
Prototype |
procedure TFT_Init_HX8347G(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes HX8347-G display controller display in the 8-bit working mode for Stellaris/STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
Stellaris// TFT module connections var TFT_DataPort : char at GPIO_PORTJ_DATA; TFT_RST : sbit at GPIO_PORTH_DATA5_bit; TFT_RS : sbit at GPIO_PORTG_DATA7_bit; TFT_CS : sbit at GPIO_PORTH_DATA6_bit; TFT_RD : sbit at GPIO_PORTC_DATA5_bit; TFT_WR : sbit at GPIO_PORTH_DATA4_bit; TFT_DataPort_Direction : char at GPIO_PORTJ_DIR; TFT_RST_Direction : sbit at GPIO_PORTH_DIR5_bit; TFT_RS_Direction : sbit at GPIO_PORTG_DIR7_bit; TFT_CS_Direction : sbit at GPIO_PORTH_DIR6_bit; TFT_RD_Direction : sbit at GPIO_PORTC_DIR5_bit; TFT_WR_Direction : sbit at GPIO_PORTH_DIR4_bit; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_HX8347G(240, 320); STM32// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_HX8347G(240, 320); |
TFT_Init_R61526
Prototype |
procedure TFT_Init_R61526(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes R61526 display controller display in the 8-bit working mode for Stellaris devices and 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
Stellaris// TFT module connections var TFT_DataPort : char at GPIO_PORTJ_DATA; TFT_RST : sbit at GPIO_PORTH_DATA5_bit; TFT_RS : sbit at GPIO_PORTG_DATA7_bit; TFT_CS : sbit at GPIO_PORTH_DATA6_bit; TFT_RD : sbit at GPIO_PORTC_DATA5_bit; TFT_WR : sbit at GPIO_PORTH_DATA4_bit; TFT_DataPort_Direction : char at GPIO_PORTJ_DIR; TFT_RST_Direction : sbit at GPIO_PORTH_DIR5_bit; TFT_RS_Direction : sbit at GPIO_PORTG_DIR7_bit; TFT_CS_Direction : sbit at GPIO_PORTH_DIR6_bit; TFT_RD_Direction : sbit at GPIO_PORTC_DIR5_bit; TFT_WR_Direction : sbit at GPIO_PORTH_DIR4_bit; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_R61526(240, 320); STM32// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_R61526(240, 320); |
TFT_Init_SST7715R
Prototype |
procedure TFT_Init_SST7715R(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes SST7715R display controller display in the 8-bit working mode for Stellaris devices and 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
Stellaris// TFT module connections var TFT_DataPort : char at GPIO_PORTJ_DATA; TFT_RST : sbit at GPIO_PORTH_DATA5_bit; TFT_RS : sbit at GPIO_PORTG_DATA7_bit; TFT_CS : sbit at GPIO_PORTH_DATA6_bit; TFT_RD : sbit at GPIO_PORTC_DATA5_bit; TFT_WR : sbit at GPIO_PORTH_DATA4_bit; TFT_DataPort_Direction : char at GPIO_PORTJ_DIR; TFT_RST_Direction : sbit at GPIO_PORTH_DIR5_bit; TFT_RS_Direction : sbit at GPIO_PORTG_DIR7_bit; TFT_CS_Direction : sbit at GPIO_PORTH_DIR6_bit; TFT_RD_Direction : sbit at GPIO_PORTC_DIR5_bit; TFT_WR_Direction : sbit at GPIO_PORTH_DIR4_bit; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_SST7715R(240, 320); STM32// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_SST7715R(240, 320); |
TFT_Init_HX8352A
Prototype |
procedure TFT_Init_HX8352A(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes HX8352A display controller display in the 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_HX8352A(240, 320); |
TFT_Init_ILI9340
Prototype |
procedure TFT_Init_ILI9340(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9340 display controller display in the 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_ILI9340(240, 320); |
TFT_Init_ILI9342
Prototype |
procedure TFT_Init_ILI9342(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9342 display controller display in the 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_ILI9342(240, 320); |
TFT_Init_ILI9481
Prototype |
procedure TFT_Init_ILI9481(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9481 display controller display in the 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_ILI9481(240, 320); |
TFT_Init_SSD1963
Prototype |
procedure TFT_Init_SSD1963(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes SSD1963 display controller display in the 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_SSD1963(240, 320); |
TFT_Init_HX8347G_16bit
Prototype |
procedure TFT_Init_HX8347G_16bit(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes HX8347G display controller display in the 16-bit working mode for STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_HX8347G_16bit(240, 320); |
TFT_Init_SSD1963_8bit
Prototype |
procedure TFT_Init_SSD1963_8bit(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes SSD1963 display controller display in the 8-bit working mode for Stellaris/STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
Stellaris// TFT module connections var TFT_DataPort : char at GPIO_PORTJ_DATA; TFT_RST : sbit at GPIO_PORTH_DATA5_bit; TFT_RS : sbit at GPIO_PORTG_DATA7_bit; TFT_CS : sbit at GPIO_PORTH_DATA6_bit; TFT_RD : sbit at GPIO_PORTC_DATA5_bit; TFT_WR : sbit at GPIO_PORTH_DATA4_bit; TFT_DataPort_Direction : char at GPIO_PORTJ_DIR; TFT_RST_Direction : sbit at GPIO_PORTH_DIR5_bit; TFT_RS_Direction : sbit at GPIO_PORTG_DIR7_bit; TFT_CS_Direction : sbit at GPIO_PORTH_DIR6_bit; TFT_RD_Direction : sbit at GPIO_PORTC_DIR5_bit; TFT_WR_Direction : sbit at GPIO_PORTH_DIR4_bit; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_SSD1963_8bit(240, 320); STM32// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_SSD1963_8bit(240, 320); |
TFT_Init_ILI9340_8bit
Prototype |
procedure TFT_Init_ILI9340_8bit(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9340 display controller display in the 8-bit working mode for Stellaris/STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
Stellaris// TFT module connections var TFT_DataPort : char at GPIO_PORTJ_DATA; TFT_RST : sbit at GPIO_PORTH_DATA5_bit; TFT_RS : sbit at GPIO_PORTG_DATA7_bit; TFT_CS : sbit at GPIO_PORTH_DATA6_bit; TFT_RD : sbit at GPIO_PORTC_DATA5_bit; TFT_WR : sbit at GPIO_PORTH_DATA4_bit; TFT_DataPort_Direction : char at GPIO_PORTJ_DIR; TFT_RST_Direction : sbit at GPIO_PORTH_DIR5_bit; TFT_RS_Direction : sbit at GPIO_PORTG_DIR7_bit; TFT_CS_Direction : sbit at GPIO_PORTH_DIR6_bit; TFT_RD_Direction : sbit at GPIO_PORTC_DIR5_bit; TFT_WR_Direction : sbit at GPIO_PORTH_DIR4_bit; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_ILI9340_8bit(240, 320); STM32// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_ILI9340_8bit(240, 320); |
TFT_Init_ILI9481_8bit
Prototype |
procedure TFT_Init_ILI9481_8bit(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9481 display controller display in the 8-bit working mode for Stellaris/STM32 devices. Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
Stellaris// TFT module connections var TFT_DataPort : char at GPIO_PORTJ_DATA; TFT_RST : sbit at GPIO_PORTH_DATA5_bit; TFT_RS : sbit at GPIO_PORTG_DATA7_bit; TFT_CS : sbit at GPIO_PORTH_DATA6_bit; TFT_RD : sbit at GPIO_PORTC_DATA5_bit; TFT_WR : sbit at GPIO_PORTH_DATA4_bit; TFT_DataPort_Direction : char at GPIO_PORTJ_DIR; TFT_RST_Direction : sbit at GPIO_PORTH_DIR5_bit; TFT_RS_Direction : sbit at GPIO_PORTG_DIR7_bit; TFT_CS_Direction : sbit at GPIO_PORTH_DIR6_bit; TFT_RD_Direction : sbit at GPIO_PORTC_DIR5_bit; TFT_WR_Direction : sbit at GPIO_PORTH_DIR4_bit; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_ILI9481_8bit(240, 320); STM32// TFT module connections var TFT_DataPort : word at GPIOD_ODR; TFT_WR : sbit at GPIOE_ODR.B9; TFT_RD : sbit at GPIOE_ODR.B10; TFT_CS : sbit at GPIOE_ODR.B12; TFT_RS : sbit at GPIOE_ODR.B8; TFT_RST : sbit at GPIOE_ODR.B13; // End TFT module connections // Initialize 240x320 TFT display TFT_Init_ILI9481_8bit(240, 320); |
TFT_Init_Custom
Prototype |
procedure TFT_Init_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes HX8347-D display controller display in the 8-bit working mode for Stellaris devices and 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_Custom(240, 320); |
TFT_Init_HX8347G_Custom
Prototype |
procedure TFT_Init_HX8347G_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes HX8347-G display controller display in the 8-bit working mode for Stellaris/STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_HX8347G_Custom(240, 320); |
TFT_Init_R61526_Custom
Prototype |
procedure TFT_Init_R61526_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes R61526 display controller display in the 8-bit working mode for Stellaris devices and 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_R61526_Custom(240, 320); |
TFT_Init_SST7715R_Custom
Prototype |
procedure TFT_Init_SST7715R_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes SST7715R display controller display in the 8-bit working mode for Stellaris devices and 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_SST7715R_Custom(240, 320); |
TFT_Init_HX8352A_Custom
Prototype |
procedure TFT_Init_HX8352A_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes HX8352A display controller display in the 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_HX8352A_Custom(240, 320); |
TFT_Init_ILI9340_Custom
Prototype |
procedure TFT_Init_ILI9340_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9340 display controller display in the 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_ILI9340_Custom(240, 320); |
TFT_Init_ILI9342_Custom
Prototype |
procedure TFT_Init_ILI9342_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9342 display controller display in the 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_ILI9342_Custom(240, 320); |
TFT_Init_ILI9481_Custom
Prototype |
procedure TFT_Init_ILI9481_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9481 display controller display in the 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_ILI9481_Custom(240, 320); |
TFT_Init_SSD1963_Custom
Prototype |
procedure TFT_Init_SSD1963_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes SSD1963 display controller display in the 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_SSD1963_Custom(240, 320); |
TFT_Init_HX8347G_16bit_Custom
Prototype |
procedure TFT_Init_HX8347G_16bit_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes HX8347G display controller display in the 16-bit working mode for STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_HX8347G_16bit_Custom(240, 320); |
TFT_Init_SSD1963_8bit_Custom
Prototype |
procedure TFT_Init_SSD1963_8bit_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes SSD1963 display controller display in the 8-bit working mode Stellaris/STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_SSD1963_8bit_Custom(240, 320); |
TFT_Init_ILI9340_8bit_Custom
Prototype |
procedure TFT_Init_ILI9340_8bit_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9340 display controller display in the 8-bit working mode for Stellaris/STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_ILI9340_8bit_Custom(240, 320); |
TFT_Init_ILI9481_8bit_Custom
Prototype |
procedure TFT_Init_ILI9481_8bit_Custom(display_width, display_height : word) ; |
---|---|
Returns |
Nothing. |
Description |
Initializes ILI9481 display controller display in the 8-bit working mode for Stellaris/STM32 devices without setting TFT_DataPort direction.
Parameters :
|
Requires |
External dependencies of the library from the top of the page must be defined before using this function. |
Example |
// Set custom working mode TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); // Initialize 240x320 TFT display TFT_Init_ILI9481_8bit_Custom(240, 320); |
TFT_Set_Index
Prototype |
procedure TFT_Set_Index(index : byte); |
---|---|
Returns |
Nothing. |
Description |
Accesses register space of the controller and sets the desired register. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Access register at the location 0x02 TFT_Set_Index(0x02); |
TFT_SSD1963_8bit_Set_Index
Prototype |
procedure TFT_SSD1963_8bit_Set_Index(index : byte); |
---|---|
Returns |
Nothing. |
Description |
Accesses register space of the SSD1963 controller and sets the desired register. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Access register at the location 0x02 TFT_SSD1963_8bit_Set_Index(0x02); |
TFT_Write_Command
Prototype |
procedure TFT_Write_Command(cmd : byte); |
---|---|
Returns |
Nothing. |
Description |
Accesses data space and writes a command. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Write a command TFT_Write_Command(0x02); |
TFT_SSD1963YT_8bit_Write_Command
Prototype |
procedure TFT_SSD1963YT_8bit_Write_Command(cmd : byte); |
---|---|
Returns |
Nothing. |
Description |
Accesses data space of SSD1963YT and writes a command. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Write a command TFT_SSD1963YT_8bit_Write_Command(0x02); |
TFT_Write_Data
Prototype |
procedure TFT_Write_Data(_data : word); |
---|---|
Returns |
Nothing. |
Description |
Writes date into display memory. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Send data TFT_Write_Data(0x02); |
TFT_SSD1963_8bit_Write_Data
Prototype |
procedure TFT_SSD1963_8bit_Write_Data(_data : word); |
---|---|
Returns |
Nothing. |
Description |
Writes date into display memory of SSD1963. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Send data TFT_SSD1963_8bit_Write_Data(0x02); |
TFT_Set_Reg
Prototype |
procedure TFT_Set_Reg(index, value : byte); |
---|---|
Returns |
Nothing. |
Description |
Accesses register space of the controller and writes a value in the desired register. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// 65K Color Selection TFT_Set_Reg(0x17, 0x05); |
TFT_SSD1963_8bit_Set_Reg
Prototype |
procedure TFT_SSD1963_8bit_Set_Reg(index, value : byte); |
---|---|
Returns |
Nothing. |
Description |
Accesses register space of the SSD1963 controller and writes a value in the desired register. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// 65K Color Selection TFT_SSD1963_8bit_Set_Reg(0x17, 0x05); |
TFT_Set_Ext_Buffer
Prototype |
procedure TFT_Set_Ext_Buffer(getExtDataPtr : ^TTFT_Get_Ext_Data_Ptr); |
---|---|
Returns |
Nothing. |
Description |
Function sets pointer to the user function which manipulates the external resource. Parameters :
User function prototype should be in the following format: Parameters used in the function have the following meaning :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Set_Ext_Buffer(@ReadExternalBuffer); |
TFT_Set_Active
Prototype |
procedure TFT_Set_Active(Set_Index_Ptr : ^TTFT_Set_Index_Ptr; Write_Command_Ptr : ^TTFT_Write_Command_Ptr; Write_Data_Ptr : ^TTFT_Write_Data_Ptr); |
---|---|
Returns |
Nothing. |
Description |
This function sets appropriate pointers to a user-defined basic routines in order to enable multiple working modes. Parameters :
|
Requires |
None. |
Example |
Stellaris 8-bitprocedure TFT_Set_Index_Custom(index : byte); begin TFT_RS := 0; // Write to port TFT_DataPort := index; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; procedure TFT_Write_Command_Custom(cmd : byte); begin TFT_RS := 1; // Write to port TFT_DataPort := cmd; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; procedure TFT_Write_Data_Custom(_data : word); begin TFT_RS := 1; // Write to port TFT_DataPort := Hi(_data); // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; // Write to port TFT_DataPort := Lo(_data); // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); STM32 8-bitprocedure TFT_Set_Index_Custom(index : byte); var temp : word; begin TFT_RS := 0; // Write to port temp := TFT_DataPort; temp := temp and 0xFF00; TFT_DataPort := index or temp; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; procedure TFT_Write_Command_Custom(cmd : byte); var temp : word; begin TFT_RS := 1; // Write to port temp := TFT_DataPort; temp := temp and 0xFF00; TFT_DataPort := cmd or temp; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; procedure TFT_Write_Data_Custom(_data : word); var temp : word; begin TFT_RS := 1; // Write to port temp := TFT_DataPort; temp := temp and 0xFF00; TFT_DataPort := Hi(_data) or temp; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; // Write to port temp := TFT_DataPort; temp := temp and 0xFF00; TFT_DataPort := Lo(_data) or temp; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_Custom); STM32 16-bitprocedure TFT_Set_Index_Custom(index : byte); var temp : word; begin TFT_RS := 0; // Write to port temp := TFT_DataPort; temp := temp and 0xFF00; TFT_DataPort := index or temp; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; procedure TFT_Write_Command_Custom(cmd : byte); var temp : word; begin TFT_RS := 1; // Write to port temp := TFT_DataPort; temp := temp and 0xFF00; TFT_DataPort := cmd or temp; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; procedure TFT_Write_Data_16bit_Custom(_data : word); begin TFT_RS := 1; // Write to 16-bit port TFT_DataPort := _data; // Strobe TFT_WR := 0; asm nop; end; TFT_WR := 1; end; TFT_Set_Active(@TFT_Set_Index_Custom, @TFT_Write_Command_Custom, @TFT_Write_Data_16bit_Custom); |
TFT_Set_Default_Mode
Prototype |
procedure TFT_Set_Default_Mode(); |
---|---|
Returns |
Nothing. |
Description |
This procedure sets TFT in default working mode. Parameters :
|
Requires |
None. |
Example |
TFT_Set_Default_Mode(); TFT_Init(320, 240); |
TFT_Set_Font
Prototype |
procedure TFT_Set_Font(activeFont : ^const far byte; font_color : word; font_orientation : byte); |
||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
Nothing. |
||||||||||||||||||||||||||||||||||||||||
Description |
Sets font, its color and font orientation. Parameters :
|
||||||||||||||||||||||||||||||||||||||||
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
||||||||||||||||||||||||||||||||||||||||
Example |
TFT_Set_Font(@TFT_defaultFont, CL_BLACK, FO_HORIZONTAL); |
TFT_Set_Ext_Font
Prototype |
procedure TFT_Set_Ext_Font(activeFont : dword; font_color : word; font_orientation : byte); |
||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
Nothing. |
||||||||||||||||||||||||||||||||||||||||
Description |
Sets font, its color and font orientation. Font is located in an external resource Parameters :
|
||||||||||||||||||||||||||||||||||||||||
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
||||||||||||||||||||||||||||||||||||||||
Example |
TFT_Set_Ext_Font(173296,CL_BLACK,FO_HORIZONTAL); |
TFT_Write_Char
Prototype |
procedure TFT_Write_Char(ch, x, y : word); |
---|---|
Returns |
Nothing. |
Description |
Writes a char on the TFT at coordinates (x, y).
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Write_Char('A',22,23); |
TFT_Write_Text
Prototype |
procedure TFT_Write_Text(var text : string; x, y : word); |
---|---|
Returns |
Nothing. |
Description |
Writes text on the TFT at coordinates (x, y). Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Write_Text('TFT LIBRARY DEMO, WELCOME !', 0, 0); |
TFT_Fill_Screen
Prototype |
procedure TFT_Fill_Screen(color : word); |
||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
Nothing. |
||||||||||||||||||||||||||||||||||
Description |
Fills screen memory block with given color. Parameters :
|
||||||||||||||||||||||||||||||||||
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
||||||||||||||||||||||||||||||||||
Example |
TFT_Fill_Screen(CL_BLACK); |
TFT_Dot
Prototype |
procedure TFT_Dot(x, y : integer; color : word); |
||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
Nothing. |
||||||||||||||||||||||||||||||||||
Description |
Draws a dot on the TFT at coordinates (x, y). Parameters :
|
||||||||||||||||||||||||||||||||||
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
||||||||||||||||||||||||||||||||||
Example |
TFT_Dot(50, 50, CL_BLACK); |
TFT_Set_Pen
Prototype |
procedure TFT_Set_Pen(pen_color : word; pen_width : byte); |
||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
Nothing. |
||||||||||||||||||||||||||||||||||
Description |
Sets color and thickness parameter for drawing line, circle and rectangle elements. Parameters :
|
||||||||||||||||||||||||||||||||||
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
||||||||||||||||||||||||||||||||||
Example |
TFT_Set_Pen(CL_BLACK, 10); |
TFT_Set_Brush
Prototype |
procedure TFT_Set_Brush(brush_enabled : byte; brush_color : word; gradient_enabled, gradient_orientation : byte; gradient_color_from, gradient_color_to : word); |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
Nothing. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description |
Sets color and gradient which will be used to fill circles or rectangles. Parameters :
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example |
// Enable gradient from black to white color, left-right orientation TFT_Set_Brush(0, 0, 1, LEFT_TO_RIGHT, CL_BLACK, CL_WHITE); |
TFT_Line
Prototype |
procedure TFT_Line(x1, y1, x2, y2 : integer); |
---|---|
Returns |
Nothing. |
Description |
Draws a line from (x1, y1) to (x2, y2). Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Line(0, 0, 239, 127); |
TFT_H_Line
Prototype |
procedure TFT_H_Line(x_start, x_end, y_pos : integer); |
---|---|
Returns |
Nothing. |
Description |
Draws a horizontal line on TFT. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Draw a horizontal line between dots (10,20) and (50,20) TFT_H_Line(10, 50, 20); |
TFT_V_Line
Prototype |
procedure TFT_V_Line(y_start, y_end, x_pos : integer); |
---|---|
Returns |
Nothing. |
Description |
Draws a vertical line on TFT. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Draw a vertical line between dots (10,5) and (10,25) TFT_V_Line(5, 25, 10); |
TFT_Rectangle
Prototype |
procedure TFT_Rectangle(x_upper_left, y_upper_left, x_bottom_right, y_bottom_right:integer); |
---|---|
Returns |
Nothing. |
Description |
Draws a rectangle on TFT. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Rectangle(20, 20, 219, 107); |
TFT_Rectangle_Round_Edges
Prototype |
procedure TFT_Rectangle_Round_Edges(x_upper_left, y_upper_left, x_bottom_right, y_bottom_right, round_radius : word); |
---|---|
Returns |
Nothing. |
Description |
Draws a rounded edge rectangle on TFT. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Rectangle_Round_Edges(20, 20, 219, 107, 12); |
TFT_Circle
Prototype |
procedure TFT_Circle(x_center, y_center, radius : integer); |
---|---|
Returns |
Nothing. |
Description |
Draws a circle on TFT. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Circle(120, 64, 110); |
TFT_Image
Prototype |
procedure TFT_Image(left, top : word; image : ^const far byte; stretch : byte); |
---|---|
Returns |
Nothing. |
Description |
Displays an image on a desired location. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Image(0, 0, @image, 1); |
TFT_Ext_Image
Prototype |
procedure TFT_Ext_Image(left, top : word; image : dword; stretch : byte); |
---|---|
Returns |
Nothing. |
Description |
Displays an image from an external resource on a desired address. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Image(0, 0, 153608, 1); |
TFT_Partial_Image
Prototype |
procedure TFT_Partial_Image(left, top, width, height : word; image : ^const far byte; stretch : byte) ; |
---|---|
Returns |
Nothing. |
Description |
Displays a partial area of the image on a desired location. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Draws a 10x15 part of the image starting from the upper left corner on the coordinate (10,12) TFT_PartialImage(10, 12, 10, 15, @image, 1); |
TFT_Ext_Partial_Image
Prototype |
procedure TFT_Ext_Partial_Image(left, top, width, height : word; image : dword; stretch : byte) ; |
---|---|
Returns |
Nothing. |
Description |
Displays a partial area of the image, located on an external resource, on a desired location of the screen. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Ext_Partial_Image(159,0,160,120,0,1); |
TFT_Image_Jpeg
Prototype |
function TFT_Image_Jpeg(left, top : word; image : ^const far byte): byte; |
---|---|
Returns |
|
Description |
Displays a JPEG image on a desired location. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Image_Jpeg(0, 0, @image); |
TFT_RGBToColor16bit
Prototype |
function TFT_RGBToColor16bit(rgb_red, rgb_green, rgb_blue : byte) : word; |
---|---|
Returns |
Returns a color value in the following bit-order : 5 bits red, 6 bits green and 5 bits blue color. |
Description |
Converts 5:6:5 RGB format into true color format. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
color16 := TFT_RGBToColor16bit(150, 193, 65); |
TFT_Color16bitToRGB
Prototype |
procedure TFT_Color16bitToRGB(color : word; rgb_red, rgb_green, rgb_blue : ^byte); |
---|---|
Returns |
Nothing. |
Description |
Converts true color into 5:6:5 RGB format. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
TFT_Color16bitToRGB(start_color, @red_start, @green_start, @blue_start); |
TFT_Rotate_180
Prototype |
procedure TFT_Rotate_180(rotate : byte); |
---|---|
Returns |
Nothing. |
Description |
Rotates the TFT display. Parameters :
|
Requires |
TFT module needs to be initialized. Please, see appropriate TFT initialization routine. |
Example |
// Rotate TFT display for 180 degrees TFT_Rotate_180(1); // Initialize TFT display TFT_Init(240, 320); |
What do you think about this topic ? Send us feedback!