Difference between revisions of "Unit ST77XX"
Line 347: | Line 347: | ||
---- | ---- | ||
− | '' | + | |
+ | '''ST77XX specific types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PST77XXFramebuffer = ^TST77XXFramebuffer;</code> | ||
+ | |||
+ | <code>TST77XXFramebuffer = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''TFT Properties'' | ||
+ | |- | ||
+ | | <code>TFT:TTFTFramebuffer;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
Line 357: | Line 374: | ||
---- | ---- | ||
− | |||
+ | '''ST77XX functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXFramebufferCreate(SPI:PSPIDevice; ChipSelect:Word; const Name:String; Rotation,Width,Height,ColStart:LongWord; RST,DC,BL:PGPIOInfo):PFramebufferDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and allocate a new ST77XX Framebuffer device which can be accessed using the framebuffer API</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 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 | ||
+ | |- | ||
+ | ! 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) | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to the new Framebuffer device or nil if the framebuffer device could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXFramebufferDestroy(Framebuffer:PFramebufferDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Release, deregister and destroy an ST77XX Framebuffer device created by this driver</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Framebuffer | ||
+ | | The Framebuffer device to destroy | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ST77XX framebuffer functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXFramebufferBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of FramebufferDeviceBlank API for ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, use FramebufferDeviceBlank instead | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXFramebufferSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of FramebufferDeviceSetBacklight API for ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, use FramebufferDeviceSetBacklight instead | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ST77XX TFTFramebuffer functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXTFTFramebufferInitialize(Framebuffer:PTFTFramebuffer; Defaults:PFramebufferProperties):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TFTFramebufferInitialize API for ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-function ST77XXTFTFramebufferDeinitialize(Framebuffer:PTFTFramebuffer):LongWord;" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">FUNCTION</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TFTFramebufferDeinitialize API for ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXTFTFramebufferGetDefaults(Framebuffer:PTFTFramebuffer; Properties,Defaults:PFramebufferProperties):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TFTFramebufferGetDefaults API for ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXTFTFramebufferSetWriteAddress(Framebuffer:PTFTFramebuffer; X1,Y1,X2,Y2:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TFTFramebufferSetWriteAddress API for ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXTFTFramebufferWriteMemory(Framebuffer:PTFTFramebuffer; Address:PtrUInt; Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TFTFramebufferWriteMemory API for ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ST77XX helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXWriteCommand(Framebuffer:PTFTFramebuffer; Value:Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write a single command value to the ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXWriteCommandEx(Framebuffer:PTFTFramebuffer; const Values:array of Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write multiple command values to the ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXWriteData(Framebuffer:PTFTFramebuffer; Value:Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write a single data value to the ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ST77XXWriteDataEx(Framebuffer:PTFTFramebuffer; const Values:array of Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write multiple data values to the ST77XX</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
Return to [[Unit_Reference|Unit Reference]] | Return to [[Unit_Reference|Unit Reference]] |
Revision as of 05:21, 14 November 2023
Return to Unit Reference
Contents
[hide]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
ST77XX_*
ST77XX_SPI_*
ST77XX_*
ST77XX_*CTL_*
Type definitions
ST77XX specific types
Public variables
None defined
Function declarations
ST77XX functions
function ST77XXFramebufferCreate(SPI:PSPIDevice; ChipSelect:Word; const Name:String; Rotation,Width,Height,ColStart:LongWord; RST,DC,BL:PGPIOInfo):PFramebufferDevice;
function ST77XXFramebufferDestroy(Framebuffer:PFramebufferDevice):LongWord;
ST77XX framebuffer functions
function ST77XXFramebufferBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;
function ST77XXFramebufferSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;
ST77XX TFTFramebuffer functions
function ST77XXTFTFramebufferInitialize(Framebuffer:PTFTFramebuffer; Defaults:PFramebufferProperties):LongWord;
FUNCTION
Note | Not intended to be called directly by applications |
---|
function ST77XXTFTFramebufferGetDefaults(Framebuffer:PTFTFramebuffer; Properties,Defaults:PFramebufferProperties):LongWord;
function ST77XXTFTFramebufferSetWriteAddress(Framebuffer:PTFTFramebuffer; X1,Y1,X2,Y2:LongWord):LongWord;
function ST77XXTFTFramebufferWriteMemory(Framebuffer:PTFTFramebuffer; Address:PtrUInt; Size:LongWord):LongWord;
ST77XX helper functions
function ST77XXWriteCommand(Framebuffer:PTFTFramebuffer; Value:Byte):LongWord;
function ST77XXWriteCommandEx(Framebuffer:PTFTFramebuffer; const Values:array of Byte):LongWord;
function ST77XXWriteData(Framebuffer:PTFTFramebuffer; Value:Byte):LongWord;
function ST77XXWriteDataEx(Framebuffer:PTFTFramebuffer; const Values:array of Byte):LongWord;
Return to Unit Reference