Unit ST77XX

From Ultibo.org
Jump to: navigation, search

Return to Unit Reference


Description


Sitronix ST77XX TFT LCD Driver unit

The ST77XX is a family of single-chip controllers/drivers for color, graphic type TFT-LCD display.

Instantiate the ST77XX driver by calling ST77XXFramebufferCreate() with the required parameters:

SPI: The SPI device that this ST77XX is connected to

ChipSelect: The SPI chip select to use when communicating with this device

Name: The text description of this device which will show in the device list (Optional)

Rotation: The rotation value for the framebuffer device (eg FRAMEBUFFER_ROTATION_180)

Width: The width of the framebuffer in pixels

Height: The height of the framebuffer in pixels

ColStart:

RST: GPIO pin information for the Reset pin (Optional)

DC: GPIO pin information for the Data/Command pin

BL: GPIO pin information for the Backlight pin (Optional)

Constants



[Expand]
ST77XX specific constants ST77XX_*


[Expand]
ST77XX SPI ST77XX_SPI_*


[Expand]
ST77XX control command ST77XX_*


[Expand]
ST77XX memory access control ST77XX_*CTL_*


Type definitions



ST77XX specific types

[Expand]

PST77XXFramebuffer = ^TST77XXFramebuffer;

TST77XXFramebuffer = record


Public variables


None defined

Function declarations



ST77XX functions

[Expand]
function ST77XXFramebufferCreate(SPI:PSPIDevice; ChipSelect:Word; const Name:String; Rotation,Width,Height,ColStart:LongWord; RST,DC,BL:PGPIOInfo):PFramebufferDevice;
Description: Create, register and allocate a new ST77XX Framebuffer device which can be accessed using the framebuffer API


[Expand]
function ST77XXFramebufferDestroy(Framebuffer:PFramebufferDevice):LongWord;
Description: Release, deregister and destroy an ST77XX Framebuffer device created by this driver


ST77XX framebuffer functions

[Expand]
function ST77XXFramebufferBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;
Description: Implementation of FramebufferDeviceBlank API for ST77XX


[Expand]
function ST77XXFramebufferSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;
Description: Implementation of FramebufferDeviceSetBacklight API for ST77XX


ST77XX TFTFramebuffer functions

[Expand]
function ST77XXTFTFramebufferInitialize(Framebuffer:PTFTFramebuffer; Defaults:PFramebufferProperties):LongWord;
Description: Implementation of TFTFramebufferInitialize API for ST77XX


[Expand]
function ST77XXTFTFramebufferDeinitialize(Framebuffer:PTFTFramebuffer):LongWord;
Description: Implementation of TFTFramebufferDeinitialize API for ST77XX


[Expand]
function ST77XXTFTFramebufferGetDefaults(Framebuffer:PTFTFramebuffer; Properties,Defaults:PFramebufferProperties):LongWord;
Description: Implementation of TFTFramebufferGetDefaults API for ST77XX


[Expand]
function ST77XXTFTFramebufferSetWriteAddress(Framebuffer:PTFTFramebuffer; X1,Y1,X2,Y2:LongWord):LongWord;
Description: Implementation of TFTFramebufferSetWriteAddress API for ST77XX


[Expand]
function ST77XXTFTFramebufferWriteMemory(Framebuffer:PTFTFramebuffer; Address:PtrUInt; Size:LongWord):LongWord;
Description: Implementation of TFTFramebufferWriteMemory API for ST77XX


ST77XX helper functions

[Expand]
function ST77XXWriteCommand(Framebuffer:PTFTFramebuffer; Value:Byte):LongWord;
Description: Write a single command value to the ST77XX


[Expand]
function ST77XXWriteCommandEx(Framebuffer:PTFTFramebuffer; const Values:array of Byte):LongWord;
Description: Write multiple command values to the ST77XX


[Expand]
function ST77XXWriteData(Framebuffer:PTFTFramebuffer; Value:Byte):LongWord;
Description: Write a single data value to the ST77XX


[Expand]
function ST77XXWriteDataEx(Framebuffer:PTFTFramebuffer; const Values:array of Byte):LongWord;
Description: Write multiple data values to the ST77XX


Return to Unit Reference