LCDWIKI KBV Lib Manual

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 12

LCDWIKI KBV lib Manual
1.Introduction
The LCDWIKI KBV lib is the hardware level lib of the lcd modules with parallel
port,it need be paired with the GUI lib for each display modules.
The LCDWIKI KBV lib have the derived class from LCDWIKI GUI lib.if you want to
call functions of LCDWIKI GUI lib,you only need to use the LCDWIKI KBV class and you
have to do this.
The LCDWIKI KBV lib support 8bits and 16bits display.you can open the file of
lcd_mode.h to modify.
2.FUNCTIONS DECLARATION
definiens
LCDWIKI_KBV(uint16_t model,uint8_t cs, uint8_t cd, uint8_t
wr, uint8_t rd, uint8_t reset)
function
The main class constructor when using 8bit or 16bit display
modules
parameters
model : the model of display modules
cs : the chip selection pin in Development board
cd : the command/data pin in Development board
wr : the write control pin in Development board
rd : the read control pin in Development board
reset : the reset pin in Development board
returned value
None
notes
if modules is unreadable or you don't know the width and
height of modules,you can use this constructor
definiens
LCDWIKI_KBV(int16_t wid,int16_t heg,uint8_t cs, uint8_t cd,
uint8_t wr, uint8_t rd, uint8_t reset)
function
The main class constructor when using 8bit or 16bit display
modules
parameters
wid : the width of display modules
heg : the height of display modules
cs : the chip selection pin in Development board
cd : the command/data pin in Development board
wr : the write control pin in Development board
rd : the read control pin in Development board
reset : the reset pin in Development board
returned value
None
notes
if modules is readable or you know the width and height of
modules,you can use this constructor
definiens
void Init_LCD(void)
function
Initialize the LCD modules
parameters
None
returned value
None
notes
None
definiens
void reset(void)
function
Reset the LCD modules
parameters
None
returned value
None
notes
None
definiens
void start(uint16_t ID)
function
Set the register of LCD modules
parameters
ID : the identification of LCD modules control chip
returned value
None
notes
None
definiens
void Draw_Pixe(int16_t x, int16_t y, uint16_t color)
function
Draw a single pixel at a specified coordinate
parameters
x : the x coordinate of the pixel
y : the y coordinate of the pixel
color : the color value of the pixel
returned value
None
notes
This function overrides the parent class function
definiens
void Write_Cmd(uint16_t cmd)
function
Write a 16bit command to the lcd modules
parameters
cmd : the 16bit command value
returned value
None
notes
None
definiens
void Write_Data(uint16_t data)
function
Write a 16bit data to the lcd modules
parameters
data : the 16bit data
returned value
None
notes
None
definiens
void Write_Cmd_Data(uint16_t cmd, uint16_t data)
function
Write a 16bit command and a 16bit data to the lcd modules
parameters
cmd : the 16bit command value
data : the 16bit data
returned value
None
notes
None
definiens
void init_table8(const void *table, int16_t size)
function
Write a series of 8bit command and data to the lcd modules
parameters
table : the array of command and data to point
size : the size of the array of command and data
returned value
None
notes
None
definiens
void init_table16(const void *table, int16_t size)
function
Write a series of 16bit command and data to the lcd modules
parameters
table : the array of command and data to point
size : the size of the array of command and data
returned value
None
notes
None
definiens
void Push_Command(uint16_t cmd, uint8_t *block, int8_t N)
function
Set a command and a series of 8bit data to the lcd modules
at a time
parameters
cmd : the 16bits command value
block : the array of 8bit data to point
N : the size of the array of 8bit data
returned value
None
notes
None
definiens
uint16_t Color_To_565(uint8_t r, uint8_t g, uint8_t b)
function
Pass three 8bits colour value and get the 16bits colour value
parameters
r : the 8bits red value
g : the 8bits green value
b : the 8bits blue value
returned value
The 16bits colour value(rrrrrggggggbbbbb)
notes
This function overrides the parent class function
definiens
uint16_t Read_ID(void)
function
Read the identification of LCD modules control chip
parameters
None
returned value
the identification of LCD modules control chip
notes
None
definiens
void Fill_Rect(int16_t x, int16_t y, int16_t w, int16_t h,
uint16_t color)
function
Using color value to draw a filled rectangle with w width and h
height in x and y coordinate
parameters
x : the x coordinate of the start-corner
y : the y coordinate of the start-corner
w : the width of the rectangle
h : the height of the rectangle
color : the color value of the filled rectangle
returned value
This function overrides the parent class function
notes
None
definiens
void Set_Rotation(uint8_t r)
function
Set the rotation of the screen
parameters
r : the value of rotation.
0-0 degree
1-90 degree
2-180 degree
3-270 degree
returned value
None
notes
None
definiens
uint8_t Get_Rotation(void) const
function
get the rotation of the screen
parameters
None
returned value
0-0 degree
1-90 degree
2-180 degree
3-270 degree
notes
None
definiens
void Invert_Display(boolean i)
function
Select display the anti-color or not
parameters
i : 0-don't display the anti-color(normal)
1- display the anti
returned value
None
notes
None
definiens
uint16_t Read_Reg(uint16_t reg, int8_t index)
function
read value from lcd register
parameters
reg : the command of read
index : the number of read
returned value
The value of reading from lcd register
notes
None
definiens
int16_t Read_GRAM(int16_t x, int16_t y, uint16_t *block,
int16_t w, int16_t h)
function
Read colour value from GRAM
parameters
x : the x coordinate of the start-corner
y : the y coordinate of the start-corner
block : the array of saving colour value
w : the width of the Read area
h : the heigth of the Read area
returned value
0-successful
notes
This function overrides the parent class function
definiens
void Set_Addr_Window(int16_t x1, int16_t y1, int16_t x2,
int16_t y2)
function
Set display area bewteen two point
parameters
x1 : the x coordinate of the start-corner
y1 : the y coordinate of the start-corner
x2 : the x coordinate of the end-corner
y2 : the y coordinate of the end-corner
returned value
None
notes
This function overrides the parent class function
definiens
void Push_Any_Color(uint16_t * block, int16_t n, bool first,
uint8_t flags)
function
Set a large number of 16bit color values at a time
parameters
block : the array of 16bit colour values
n : the number of colour values
first : 1- First set the command of write color value
0-have set the command of write color value
flags : 0-read color value from RAM
1-read color value from flash
returned value
None
notes
This function overrides the parent class function
definiens
void Push_Any_Color(uint8_t * block, int16_t n, bool first,
uint8_t flags)
function
Set a large number of 8bit color values at a time
parameters
block : the array of 8bit colour values
n : the number of colour values
first : 1- First set the command of write color value
0-have set the command of write color value
flags : 0-read color value from RAM
1-read color value from flash
returned value
None
notes
None
definiens
void Vert_Scroll(int16_t top, int16_t scrollines, int16_t
offset)
function
scroll display
parameters
top : vertical start position
scrollines : the lines of scroll
offset : the offset of scroll
returned value
None
notes
None
definiens
int16_t Get_Height(void) const
function
Get the display height
parameters
None
returned value
The diaplay height
notes
This function overrides the parent class function
definiens
int16_t Get_Width(void) const
function
Get the display width
parameters
None
returned value
The diaplay width
notes
This function overrides the parent class function
definiens
void Set_LR(void)
function
Set the coordinate of the lower-right corner
parameters
None
returned value
None
notes
This function is only for 0x7575 lcd modules

Navigation menu