Difference between revisions of "Unit ILI9340"

From Ultibo.org
Jump to: navigation, search
Line 197: Line 197:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''SPI'''
+
! SPI
 
| The SPI device that this ILI9340 is connected to
 
| The SPI device that this ILI9340 is connected to
 
|-
 
|-
! '''ChipSelect'''
+
! ChipSelect
 
| The SPI chip select to use when communicating with this device
 
| The SPI chip select to use when communicating with this device
 
|-
 
|-
! '''Name'''
+
! Name
| The text description of this device which will should in the device list (Optional)
+
| The text description of this device which will show in the device list (Optional)
 
|-
 
|-
! '''Rotation'''
+
! Rotation
 
| The rotation value for the framebuffer device (eg FRAMEBUFFER_ROTATION_180)
 
| The rotation value for the framebuffer device (eg FRAMEBUFFER_ROTATION_180)
 
|-
 
|-
! '''Width'''
+
! Width
 
| The width of the framebuffer in pixels
 
| The width of the framebuffer in pixels
 
|-
 
|-
! '''Height'''
+
! Height
 
| The height of the framebuffer in pixels
 
| The height of the framebuffer in pixels
 
|-
 
|-
! '''RST'''
+
! RST
 
| GPIO pin information for the Reset pin (Optional)
 
| GPIO pin information for the Reset pin (Optional)
 
|-
 
|-
! '''DC'''
+
! DC
 
| GPIO pin information for the Data/Command pin
 
| GPIO pin information for the Data/Command pin
 
|-
 
|-
! '''BL'''
+
! BL
 
| GPIO pin information for the Backlight pin (Optional)
 
| GPIO pin information for the Backlight pin (Optional)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to the new Framebuffer device or nil if the framebuffer device could not be created
 
| Pointer to the new Framebuffer device or nil if the framebuffer device could not be created
 
|-
 
|-
Line 236: Line 236:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Framebuffer'''
+
! Framebuffer
 
| The Framebuffer device to destroy
 
| The Framebuffer device to destroy
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure
 
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 254: Line 254:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Not intended to be called directly by applications, use FramebufferDeviceBlank instead
+
| Not intended to be called directly by applications, use FramebufferDeviceBlank instead.
 
|-
 
|-
 
|}
 
|}
Line 266: Line 266:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Not intended to be called directly by applications, use FramebufferDeviceSetBacklight instead
+
| Not intended to be called directly by applications, use FramebufferDeviceSetBacklight instead.
 
|-
 
|-
 
|}
 
|}
Line 281: Line 281:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Not intended to be called directly by applications
 
| Not intended to be called directly by applications
 
|-
 
|-
Line 293: Line 293:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Not intended to be called directly by applications
 
| Not intended to be called directly by applications
 
|-
 
|-
Line 305: Line 305:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Not intended to be called directly by applications
 
| Not intended to be called directly by applications
 
|-
 
|-
Line 317: Line 317:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Not intended to be called directly by applications
 
| Not intended to be called directly by applications
 
|-
 
|-
Line 329: Line 329:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Not intended to be called directly by applications
 
| Not intended to be called directly by applications
 
|-
 
|-
Line 344: Line 344:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 356: Line 356:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 368: Line 368:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 380: Line 380:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-

Revision as of 04:29, 24 April 2018

Return to Unit Reference


Description


ILITEK ILI9340 TFT LCD Driver unit

The ILITEK ILI9340 is a 240x320 Resolution RGB 262K color TFT LCD Single Chip Driver that supports color depths of 16 or 18bit. This driver supports the chip only in 16 bit depth using RGB565 format.

The chip provides an SPI interface at up to 32MHz and supports rotations of 0, 90, 180 and 270 degrees.

Constants



[Expand]
ILI9340 specific constants ILI9340_FRAMEBUFFER_*


[Expand]
ILI9340 SPI ILI9340_SPI_*


[Expand]
ILI9340 command ILI9340_CMD_*


[Expand]
ILI9340 memory access control ILI9340_CMD_MADCTL_*


Type definitions



ILI9340 framebuffer

[Expand]

PILI9340Framebuffer = ^TILI9340Framebuffer;

TILI9340Framebuffer = record


Public variables


None defined

Function declarations



ILI9340 functions

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


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


ILI9340 framebuffer functions

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


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


ILI9340 TFT framebuffer functions

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


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


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


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


[Expand]
function ILI9340TFTFramebufferWriteMemory(Framebuffer:PTFTFramebuffer; Address,Size:LongWord):LongWord;
Description: Implementation of TFTFramebufferWriteMemory API for ILI9340


ILI9340 helper functions

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


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


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


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


Return to Unit Reference