DeviceILI9341
ILI9341 LCD device driver
Ref.: ILITECH ILI9341 datasheet Ref.: https://vivonomicon.com/2018/06/17/drawing-to-a-small-tft-display-the-ili9341-and-stm32/ Ref.: https://blog.embeddedexpert.io/?p=2081
Types
ILI9341* = RECORD
rotation : INTEGER;
bus : PtrBus;
rst, cs, dc : PtrPin;
width- : INTEGER;
height- : INTEGER;
depth- : INTEGER;
END;
Procedures
Init
Initialize driver
PROCEDURE Init* (VAR dev : ILI9341; VAR bus: BusSPI.Bus; VAR rst, cs, dc : Pin.Pin);
ILI9341.Reset
Reset display
PROCEDURE (VAR this : ILI9341) Reset*;
ILI9341.Config
PROCEDURE (VAR this : ILI9341) Config*;
ILI9341.SetRotation
PROCEDURE (VAR this : ILI9341) SetRotation*(rotate : INTEGER);
ILI9341.ColorRGB
Convert RGB format to RGB565 display format
PROCEDURE (VAR this : ILI9341) ColorRGB*(r, b, g : INTEGER): INTEGER;
ILI9341.SetPixel
Set pixel to color at location x, y.
PROCEDURE (VAR this: ILI9341) SetPixel*(x, y, color : INTEGER);
ILI9341.Fill
Fill canvas with color
PROCEDURE (VAR this : ILI9341) Fill*(color : INTEGER);
ILI9341.FilledRect
Draw a filled rectangle at the given location, size and color.
PROCEDURE (VAR this : ILI9341) FilledRect*(x, y, w, h, color : INTEGER);
ILI9341.BlitRaw
Draw into framebuffer with raw data at the given location, size.
PROCEDURE (VAR this : ILI9341) BlitRaw*(x, y, w, h : INTEGER; data : ADDRESS);