support lcd demo on nuttx and optimize lt768 drivers
This commit is contained in:
parent
485911f15f
commit
6603f121c6
|
@ -35,7 +35,7 @@
|
|||
|
||||
void LcdDemo(void)
|
||||
{
|
||||
int x1 = 100, y1 = 100, x2 = 200, y2 = 200;
|
||||
int x1 = 50, y1 = 50, x2 = LCD_XSIZE_TFT - 50, y2 = LCD_YSIZE_TFT - 50;
|
||||
|
||||
Main_Image_Start_Address(LCD_START_ADDR);
|
||||
Main_Image_Width(LCD_XSIZE_TFT);
|
||||
|
@ -49,11 +49,23 @@ void LcdDemo(void)
|
|||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
syslog(LOG_NOTICE, "Disp_demo %d\n", i);
|
||||
x1 = 50;
|
||||
y1 = 50;
|
||||
x2 = LCD_XSIZE_TFT - 50;
|
||||
y2 = LCD_YSIZE_TFT - 50;
|
||||
syslog(LOG_NOTICE, "Disp_demo %d (%d,%d - %d,%d)\n", i, x1, y1, x2, y2);
|
||||
LT768_DrawSquare_Fill(x1, y1, x2, y2, Red);
|
||||
up_mdelay(2000);
|
||||
x1 += 20;
|
||||
y1 += 20;
|
||||
x2 -= 20;
|
||||
y2 -= 20;
|
||||
LT768_DrawSquare_Fill(x1, y1, x2, y2, Green);
|
||||
up_mdelay(2000);
|
||||
x1 += 20;
|
||||
y1 += 20;
|
||||
x2 -= 20;
|
||||
y2 -= 20;
|
||||
LT768_DrawSquare_Fill(x1, y1, x2, y2, Blue);
|
||||
up_mdelay(2000);
|
||||
}
|
||||
|
|
|
@ -63,3 +63,6 @@ CONFIG_K210_LCD=y
|
|||
CONFIG_K210_LCD_BACKLIGHT=y
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_LT768=y
|
||||
|
||||
CONFIG_USER_TEST=y
|
||||
CONFIG_USER_TEST_LCD=y
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,13 +1,25 @@
|
|||
/******************** COPYRIGHT ********************
|
||||
* File Name : LT768.h
|
||||
* Author : Levetop Electronics
|
||||
* Version : V1.0
|
||||
* Date : 2017-8-25
|
||||
* Description : ²Ù×÷LT768µÄ¼Ä´æÆ÷º¯Êý
|
||||
****************************************************/
|
||||
/*
|
||||
* Copyright (c) 2022 AIIT XUOS Lab
|
||||
* XiUOS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
* http://license.coscl.org.cn/MulanPSL2
|
||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
|
||||
#ifndef _LT768_h
|
||||
#define _LT768_h
|
||||
/**
|
||||
* @file lt768.h
|
||||
* @brief lt768 register relative driver, inherit from Levetop Electronics
|
||||
* @version 1.0
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2022.9.19
|
||||
*/
|
||||
|
||||
#ifndef __LT768_H_
|
||||
#define __LT768_H_
|
||||
|
||||
#define cSetb0 0x01
|
||||
#define cSetb1 0x02
|
||||
|
@ -28,17 +40,24 @@
|
|||
#define cClrb7 0x7f
|
||||
|
||||
|
||||
void LCD_RegisterWrite(unsigned char Cmd,unsigned char Data);
|
||||
unsigned char LCD_RegisterRead(unsigned char Cmd);
|
||||
#define STM32_FSMC_8 0 //16bits bus
|
||||
|
||||
void LCD_CmdWrite(uint8_t cmd);
|
||||
void LCD_DataWrite(uint8_t data);
|
||||
uint8_t LCD_StatusRead(void);
|
||||
uint8_t LCD_DataRead(void);
|
||||
void LCD_DataWrite_Pixel(uint8_t data);
|
||||
|
||||
void LCD_RegisterWrite(uint8_t Cmd, uint8_t Data);
|
||||
uint8_t LCD_RegisterRead(uint8_t Cmd);
|
||||
|
||||
//**Staus**//
|
||||
void Check_Mem_WR_FIFO_not_Full(void);
|
||||
void Check_Mem_WR_FIFO_Empty(void);
|
||||
void Check_Mem_RD_FIFO_not_Full(void);
|
||||
void Check_Mem_RD_FIFO_not_Empty(void);
|
||||
void Check_2D_Busy(void);
|
||||
void Check_SDRAM_Ready(void);
|
||||
unsigned char Power_Saving_Status(void);
|
||||
uint8_t Power_Saving_Status(void);
|
||||
void Check_Power_is_Normal(void);
|
||||
void Check_Power_is_Saving(void);
|
||||
void Check_NO_Interrupt(void);
|
||||
|
@ -124,7 +143,7 @@ void Disable_PWM1_Interrupt(void);
|
|||
void Enable_PWM0_Interrupt(void);
|
||||
void Disable_PWM0_Interrupt(void);
|
||||
//**[0Ch]**//
|
||||
unsigned char Read_Interrupt_status(void);
|
||||
uint8_t Read_Interrupt_status(void);
|
||||
void Clear_Resume_Interrupt_Flag(void);
|
||||
void Clear_ExtInterrupt_Input_Flag(void);
|
||||
void Clear_I2CM_Interrupt_Flag(void);
|
||||
|
@ -237,35 +256,35 @@ void Idle_HSYNC_High(void);
|
|||
void Idle_VSYNC_Low(void);
|
||||
void Idle_VSYNC_High(void);
|
||||
//**[14h][15h][1Ah][1Bh]**//
|
||||
void LCD_HorizontalWidth_VerticalHeight(unsigned short WX,unsigned short HY);
|
||||
void LCD_HorizontalWidth_VerticalHeight(uint16_t WX, uint16_t HY);
|
||||
//**[16h][17h]**//
|
||||
void LCD_Horizontal_Non_Display(unsigned short WX);
|
||||
void LCD_Horizontal_Non_Display(uint16_t WX);
|
||||
//**[18h]**//
|
||||
void LCD_HSYNC_Start_Position(unsigned short WX);
|
||||
void LCD_HSYNC_Start_Position(uint16_t WX);
|
||||
//**[19h]**//
|
||||
void LCD_HSYNC_Pulse_Width(unsigned short WX);
|
||||
void LCD_HSYNC_Pulse_Width(uint16_t WX);
|
||||
//**[1Ch][1Dh]**//
|
||||
void LCD_Vertical_Non_Display(unsigned short HY);
|
||||
void LCD_Vertical_Non_Display(uint16_t HY);
|
||||
//**[1Eh]**//
|
||||
void LCD_VSYNC_Start_Position(unsigned short HY);
|
||||
void LCD_VSYNC_Start_Position(uint16_t HY);
|
||||
//**[1Fh]**//
|
||||
void LCD_VSYNC_Pulse_Width(unsigned short HY);
|
||||
void LCD_VSYNC_Pulse_Width(uint16_t HY);
|
||||
//**[20h][21h][22h][23h]**//
|
||||
void Main_Image_Start_Address(unsigned long Addr);
|
||||
void Main_Image_Start_Address(uint32_t Addr);
|
||||
//**[24h][25h]**//
|
||||
void Main_Image_Width(unsigned short WX);
|
||||
void Main_Image_Width(uint16_t WX);
|
||||
//**[26h][27h][28h][29h]**//
|
||||
void Main_Window_Start_XY(unsigned short WX,unsigned short HY);
|
||||
void Main_Window_Start_XY(uint16_t WX, uint16_t HY);
|
||||
//**[2Ah][2Bh][2Ch][2Dh]**//
|
||||
void PIP_Display_Start_XY(unsigned short WX,unsigned short HY);
|
||||
void PIP_Display_Start_XY(uint16_t WX, uint16_t HY);
|
||||
//**[2Eh][2Fh][30h][31h]**//
|
||||
void PIP_Image_Start_Address(unsigned long Addr);
|
||||
void PIP_Image_Start_Address(uint32_t Addr);
|
||||
//**[32h][33h]**//
|
||||
void PIP_Image_Width(unsigned short WX);
|
||||
void PIP_Image_Width(uint16_t WX);
|
||||
//**[34h][35h][36h][37h]**//
|
||||
void PIP_Window_Image_Start_XY(unsigned short WX,unsigned short HY);
|
||||
void PIP_Window_Image_Start_XY(uint16_t WX, uint16_t HY);
|
||||
//**[38h][39h][3Ah][3Bh]**//
|
||||
void PIP_Window_Width_Height(unsigned short WX,unsigned short HY);
|
||||
void PIP_Window_Width_Height(uint16_t WX, uint16_t HY);
|
||||
//**[3C]**//
|
||||
void Enable_Graphic_Cursor(void);
|
||||
void Disable_Graphic_Cursor(void);
|
||||
|
@ -278,23 +297,23 @@ void Disable_Text_Cursor(void);
|
|||
void Enable_Text_Cursor_Blinking(void);
|
||||
void Disable_Text_Cursor_Blinking(void);
|
||||
//**[3D]**//
|
||||
void Blinking_Time_Frames(unsigned char temp);
|
||||
void Blinking_Time_Frames(uint8_t temp);
|
||||
//**[3E][3Fh]**//
|
||||
void Text_Cursor_H_V(unsigned short WX,unsigned short HY);
|
||||
void Text_Cursor_H_V(uint16_t WX, uint16_t HY);
|
||||
//**[40h][41h][42h][43h]**//
|
||||
void Graphic_Cursor_XY(unsigned short WX,unsigned short HY);
|
||||
void Graphic_Cursor_XY(uint16_t WX, uint16_t HY);
|
||||
//**[44]**//
|
||||
void Set_Graphic_Cursor_Color_1(unsigned char temp);
|
||||
void Set_Graphic_Cursor_Color_1(uint8_t temp);
|
||||
//**[45]**//
|
||||
void Set_Graphic_Cursor_Color_2(unsigned char temp);
|
||||
void Set_Graphic_Cursor_Color_2(uint8_t temp);
|
||||
//**[50h][51h][52h][53h]**//
|
||||
void Canvas_Image_Start_address(unsigned long Addr);
|
||||
void Canvas_Image_Start_address(uint32_t Addr);
|
||||
//**[54h][55h]**//
|
||||
void Canvas_image_width(unsigned short WX);
|
||||
void Canvas_image_width(uint16_t WX);
|
||||
//**[56h][57h][58h][59h]**//
|
||||
void Active_Window_XY(unsigned short WX,unsigned short HY);
|
||||
void Active_Window_XY(uint16_t WX, uint16_t HY);
|
||||
//**[5Ah][5Bh][5Ch][5Dh]**//
|
||||
void Active_Window_WH(unsigned short WX,unsigned short HY);
|
||||
void Active_Window_WH(uint16_t WX, uint16_t HY);
|
||||
//**[5E]**//
|
||||
void Select_Write_Data_Position(void);
|
||||
void Select_Read_Data_Position(void);
|
||||
|
@ -304,10 +323,10 @@ void Memory_8bpp_Mode(void);
|
|||
void Memory_16bpp_Mode(void);
|
||||
void Memory_24bpp_Mode(void);
|
||||
//**[5Fh][60h][61h][62h]**//
|
||||
void Goto_Pixel_XY(unsigned short WX,unsigned short HY);
|
||||
void Goto_Linear_Addr(unsigned long Addr);
|
||||
void Goto_Pixel_XY(uint16_t WX, uint16_t HY);
|
||||
void Goto_Linear_Addr(uint32_t Addr);
|
||||
//**[63h][64h][65h][66h]**//
|
||||
void Goto_Text_XY(unsigned short WX,unsigned short HY);
|
||||
void Goto_Text_XY(uint16_t WX, uint16_t HY);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////**** [ Function : Draw ] ****////
|
||||
|
@ -316,13 +335,13 @@ void Start_Line(void);
|
|||
void Start_Triangle(void);
|
||||
void Start_Triangle_Fill(void);
|
||||
//**[68h]~[73h]**//
|
||||
void Line_Start_XY(unsigned short WX,unsigned short HY);
|
||||
void Line_End_XY(unsigned short WX,unsigned short HY);
|
||||
void Triangle_Point1_XY(unsigned short WX,unsigned short HY);
|
||||
void Triangle_Point2_XY(unsigned short WX,unsigned short HY);
|
||||
void Triangle_Point3_XY (unsigned short WX,unsigned short HY);
|
||||
void Square_Start_XY(unsigned short WX,unsigned short HY);
|
||||
void Square_End_XY(unsigned short WX,unsigned short HY);
|
||||
void Line_Start_XY(uint16_t WX, uint16_t HY);
|
||||
void Line_End_XY(uint16_t WX, uint16_t HY);
|
||||
void Triangle_Point1_XY(uint16_t WX, uint16_t HY);
|
||||
void Triangle_Point2_XY(uint16_t WX, uint16_t HY);
|
||||
void Triangle_Point3_XY (uint16_t WX, uint16_t HY);
|
||||
void Square_Start_XY(uint16_t WX, uint16_t HY);
|
||||
void Square_End_XY(uint16_t WX, uint16_t HY);
|
||||
//**[76h]**//
|
||||
void Start_Circle_or_Ellipse(void);
|
||||
void Start_Circle_or_Ellipse_Fill(void);
|
||||
|
@ -339,16 +358,16 @@ void Start_Square_Fill(void);
|
|||
void Start_Circle_Square(void);
|
||||
void Start_Circle_Square_Fill(void);
|
||||
//**[77h]~[7Eh]**//
|
||||
void Circle_Center_XY(unsigned short WX,unsigned short HY);
|
||||
void Ellipse_Center_XY(unsigned short WX,unsigned short HY);
|
||||
void Circle_Radius_R(unsigned short WX);
|
||||
void Ellipse_Radius_RxRy(unsigned short WX,unsigned short HY);
|
||||
void Circle_Square_Radius_RxRy(unsigned short WX,unsigned short HY);
|
||||
void Circle_Center_XY(uint16_t WX, uint16_t HY);
|
||||
void Ellipse_Center_XY(uint16_t WX, uint16_t HY);
|
||||
void Circle_Radius_R(uint16_t WX);
|
||||
void Ellipse_Radius_RxRy(uint16_t WX, uint16_t HY);
|
||||
void Circle_Square_Radius_RxRy(uint16_t WX, uint16_t HY);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////**** [ Function : PWM ] ****////
|
||||
//**[84h]**//
|
||||
void Set_PWM_Prescaler_1_to_256(unsigned short WX);
|
||||
void Set_PWM_Prescaler_1_to_256(uint16_t WX);
|
||||
//**[85h]**//
|
||||
void Select_PWM1_Clock_Divided_By_1(void);
|
||||
void Select_PWM1_Clock_Divided_By_2(void);
|
||||
|
@ -384,15 +403,15 @@ void One_Shot_PWM0(void);
|
|||
void Start_PWM0(void);
|
||||
void Stop_PWM0(void);
|
||||
//**[87h]**//
|
||||
void Set_Timer0_Dead_Zone_Length(unsigned char temp);
|
||||
void Set_Timer0_Dead_Zone_Length(uint8_t temp);
|
||||
//**[88h][89h]**//
|
||||
void Set_Timer0_Compare_Buffer(unsigned short WX);
|
||||
void Set_Timer0_Compare_Buffer(uint16_t WX);
|
||||
//**[8Ah][8Bh]**//
|
||||
void Set_Timer0_Count_Buffer(unsigned short WX);
|
||||
void Set_Timer0_Count_Buffer(uint16_t WX);
|
||||
//**[8Ch][8Dh]**//
|
||||
void Set_Timer1_Compare_Buffer(unsigned short WX);
|
||||
void Set_Timer1_Compare_Buffer(uint16_t WX);
|
||||
//**[8Eh][8Fh]**//
|
||||
void Set_Timer1_Count_Buffer(unsigned short WX);
|
||||
void Set_Timer1_Count_Buffer(uint16_t WX);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////**** [ Function : BTE ] ****////
|
||||
|
@ -408,8 +427,8 @@ void Pattern_Format_8X8(void);
|
|||
void Pattern_Format_16X16(void);
|
||||
|
||||
//[91h]=========================================================================
|
||||
void BTE_ROP_Code(unsigned char setx);
|
||||
void BTE_Operation_Code(unsigned char setx);
|
||||
void BTE_ROP_Code(uint8_t setx);
|
||||
void BTE_Operation_Code(uint8_t setx);
|
||||
|
||||
//[92h]=========================================================================
|
||||
void BTE_S0_Color_8bpp(void);
|
||||
|
@ -428,40 +447,40 @@ void BTE_Destination_Color_16bpp(void);
|
|||
void BTE_Destination_Color_24bpp(void);
|
||||
|
||||
//[93h][94h][95h][96h]=========================================================================
|
||||
void BTE_S0_Memory_Start_Address(unsigned long Addr);
|
||||
void BTE_S0_Memory_Start_Address(uint32_t Addr);
|
||||
|
||||
//[97h][98h]=========================================================================
|
||||
void BTE_S0_Image_Width(unsigned short WX);
|
||||
void BTE_S0_Image_Width(uint16_t WX);
|
||||
|
||||
//[99h][9Ah][9Bh][9Ch]=========================================================================
|
||||
void BTE_S0_Window_Start_XY(unsigned short WX,unsigned short HY);
|
||||
void BTE_S0_Window_Start_XY(uint16_t WX, uint16_t HY);
|
||||
|
||||
//[9Dh][9Eh][9Fh][A0h]=========================================================================
|
||||
void BTE_S1_Memory_Start_Address(unsigned long Addr);
|
||||
void S1_Constant_color_256(unsigned char temp);
|
||||
void S1_Constant_color_65k(unsigned short temp);
|
||||
void S1_Constant_color_16M(unsigned long temp);
|
||||
void BTE_S1_Memory_Start_Address(uint32_t Addr);
|
||||
void S1_Constant_color_256(uint8_t temp);
|
||||
void S1_Constant_color_65k(uint16_t temp);
|
||||
void S1_Constant_color_16M(uint32_t temp);
|
||||
|
||||
//[A1h][A2h]=========================================================================
|
||||
void BTE_S1_Image_Width(unsigned short WX);
|
||||
void BTE_S1_Image_Width(uint16_t WX);
|
||||
|
||||
//[A3h][A4h][A5h][A6h]=========================================================================
|
||||
void BTE_S1_Window_Start_XY(unsigned short WX,unsigned short HY);
|
||||
void BTE_S1_Window_Start_XY(uint16_t WX, uint16_t HY);
|
||||
|
||||
//[A7h][A8h][A9h][AAh]=========================================================================
|
||||
void BTE_Destination_Memory_Start_Address(unsigned long Addr);
|
||||
void BTE_Destination_Memory_Start_Address(uint32_t Addr);
|
||||
|
||||
//[ABh][ACh]=========================================================================
|
||||
void BTE_Destination_Image_Width(unsigned short WX);
|
||||
void BTE_Destination_Image_Width(uint16_t WX);
|
||||
|
||||
//[ADh][AEh][AFh][B0h]=========================================================================
|
||||
void BTE_Destination_Window_Start_XY(unsigned short WX,unsigned short HY);
|
||||
void BTE_Destination_Window_Start_XY(uint16_t WX, uint16_t HY);
|
||||
|
||||
//[B1h][B2h][B3h][B4h]=========================================================================
|
||||
void BTE_Window_Size(unsigned short WX, unsigned short WY);
|
||||
void BTE_Window_Size(uint16_t WX, uint16_t WY);
|
||||
|
||||
//[B5h]=========================================================================
|
||||
void BTE_Alpha_Blending_Effect(unsigned char temp);
|
||||
void BTE_Alpha_Blending_Effect(uint8_t temp);
|
||||
|
||||
|
||||
//**[B5h]**//
|
||||
|
@ -492,8 +511,8 @@ void Select_SFI_Dual_Mode0(void);
|
|||
void Select_SFI_Dual_Mode1(void);
|
||||
|
||||
//REG[B8h] SPI master Tx /Rx FIFO Data Register (SPIDR)
|
||||
unsigned char SPI_Master_FIFO_Data_Put(unsigned char Data);
|
||||
unsigned char SPI_Master_FIFO_Data_Get(void);
|
||||
uint8_t SPI_Master_FIFO_Data_Put(uint8_t Data);
|
||||
uint8_t SPI_Master_FIFO_Data_Get(void);
|
||||
|
||||
//REG[B9h] SPI master Control Register (SPIMCR2)
|
||||
void Mask_SPI_Master_Interrupt_Flag(void);
|
||||
|
@ -509,31 +528,31 @@ void Reset_CPHA(void);
|
|||
void Set_CPHA(void);
|
||||
|
||||
//REG[BAh] SPI master Status Register (SPIMSR)
|
||||
unsigned char Tx_FIFO_Empty_Flag(void);
|
||||
unsigned char Tx_FIFO_Full_Flag(void);
|
||||
unsigned char Rx_FIFO_Empty_Flag(void);
|
||||
unsigned char Rx_FIFO_full_flag(void);
|
||||
unsigned char OVFI_Flag(void);
|
||||
uint8_t Tx_FIFO_Empty_Flag(void);
|
||||
uint8_t Tx_FIFO_Full_Flag(void);
|
||||
uint8_t Rx_FIFO_Empty_Flag(void);
|
||||
uint8_t Rx_FIFO_full_flag(void);
|
||||
uint8_t OVFI_Flag(void);
|
||||
void Clear_OVFI_Flag(void);
|
||||
unsigned char EMTI_Flag(void);
|
||||
uint8_t EMTI_Flag(void);
|
||||
void Clear_EMTI_Flag(void);
|
||||
|
||||
//REG[BB] SPI Clock period (SPIDIV)
|
||||
void SPI_Clock_Period(unsigned char temp);
|
||||
void SPI_Clock_Period(uint8_t temp);
|
||||
|
||||
|
||||
//**[BCh][BDh][BEh][BFh]**//
|
||||
void SFI_DMA_Source_Start_Address(unsigned long Addr);
|
||||
void SFI_DMA_Source_Start_Address(uint32_t Addr);
|
||||
//**[C0h][C1h][C2h][C3h]**//
|
||||
void SFI_DMA_Destination_Start_Address(unsigned long Addr);
|
||||
void SFI_DMA_Destination_Upper_Left_Corner(unsigned short WX,unsigned short HY);
|
||||
void SFI_DMA_Destination_Start_Address(uint32_t Addr);
|
||||
void SFI_DMA_Destination_Upper_Left_Corner(uint16_t WX, uint16_t HY);
|
||||
//**[C4h][C5h]**//
|
||||
void SFI_DMA_Destination_Width(unsigned short WX);
|
||||
void SFI_DMA_Destination_Width(uint16_t WX);
|
||||
//**[C6h][C7h][C8h][C9h]**//
|
||||
void SFI_DMA_Transfer_Number(unsigned long Addr);
|
||||
void SFI_DMA_Transfer_Width_Height(unsigned short WX,unsigned short HY);
|
||||
void SFI_DMA_Transfer_Number(uint32_t Addr);
|
||||
void SFI_DMA_Transfer_Width_Height(uint16_t WX, uint16_t HY);
|
||||
//**[CAh][CBh]**//
|
||||
void SFI_DMA_Source_Width(unsigned short WX);
|
||||
void SFI_DMA_Source_Width(uint16_t WX);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////**** [ Function : Font ] ****////
|
||||
|
@ -574,23 +593,23 @@ void GTFont_Select_GT20L24F6Y(void);
|
|||
void GTFont_Select_GT21L24S1W(void);
|
||||
void GTFont_Select_GT22L16A1Y(void);
|
||||
//**[CFh]**//
|
||||
void Set_GTFont_Decoder(unsigned char temp);
|
||||
void Set_GTFont_Decoder(uint8_t temp);
|
||||
//**[D0h]**//
|
||||
void Font_Line_Distance(unsigned char temp);
|
||||
void Font_Line_Distance(uint8_t temp);
|
||||
//**[D1h]**//
|
||||
void Set_Font_to_Font_Width(unsigned char temp);
|
||||
void Set_Font_to_Font_Width(uint8_t temp);
|
||||
//**[D2h]~[D4h]**//
|
||||
void Foreground_RGB(unsigned char RED,unsigned char GREEN,unsigned char BLUE);
|
||||
void Foreground_color_256(unsigned char temp);
|
||||
void Foreground_color_65k(unsigned short temp);
|
||||
void Foreground_color_16M(unsigned long temp);
|
||||
void Foreground_RGB(uint8_t RED, uint8_t GREEN, uint8_t BLUE);
|
||||
void Foreground_color_256(uint8_t temp);
|
||||
void Foreground_color_65k(uint16_t temp);
|
||||
void Foreground_color_16M(uint32_t temp);
|
||||
//**[D5h]~[D7h]**//
|
||||
void Background_RGB(unsigned char RED,unsigned char GREEN,unsigned char BLUE);
|
||||
void Background_color_256(unsigned char temp);
|
||||
void Background_color_65k(unsigned short temp);
|
||||
void Background_color_16M(unsigned long temp);
|
||||
void Background_RGB(uint8_t RED, uint8_t GREEN, uint8_t BLUE);
|
||||
void Background_color_256(uint8_t temp);
|
||||
void Background_color_65k(uint16_t temp);
|
||||
void Background_color_16M(uint32_t temp);
|
||||
//**[DBh]~[DEh]**//
|
||||
void CGRAM_Start_address(unsigned long Addr);
|
||||
void CGRAM_Start_address(uint32_t Addr);
|
||||
//**[DFh]**//
|
||||
void Power_Normal_Mode(void);
|
||||
void Power_Saving_Standby_Mode(void);
|
||||
|
@ -606,11 +625,11 @@ void Power_Saving_Sleep_Mode(void);
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
////**** [ Function : I2C ] ****////
|
||||
//**[E5h]~[EAh]**//
|
||||
void LT768_I2CM_Clock_Prescale(unsigned short WX);
|
||||
void LT768_I2CM_Clock_Prescale(uint16_t WX);
|
||||
//**[E7h]**//
|
||||
void LT768_I2CM_Transmit_Data(unsigned char temp);
|
||||
void LT768_I2CM_Transmit_Data(uint8_t temp);
|
||||
//**[E8h]**//
|
||||
unsigned char LT768_I2CM_Receiver_Data(void);
|
||||
uint8_t LT768_I2CM_Receiver_Data(void);
|
||||
//**[E9h]**//
|
||||
|
||||
void LT768_I2CM_Read_With_Ack(void);
|
||||
|
@ -621,38 +640,38 @@ void LT768_I2CM_Stop(void);
|
|||
|
||||
|
||||
//**[EAh]**//
|
||||
unsigned char LT768_I2CM_Check_Slave_ACK(void);
|
||||
unsigned char LT768_I2CM_Bus_Busy(void);
|
||||
unsigned char LT768_I2CM_transmit_Progress(void);
|
||||
unsigned char LT768_I2CM_Arbitration(void);
|
||||
uint8_t LT768_I2CM_Check_Slave_ACK(void);
|
||||
uint8_t LT768_I2CM_Bus_Busy(void);
|
||||
uint8_t LT768_I2CM_transmit_Progress(void);
|
||||
uint8_t LT768_I2CM_Arbitration(void);
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////**** [ Function : GPIO ] ****////
|
||||
//[F0h][F1h]
|
||||
void Set_GPIO_A_In_Out(unsigned char temp);
|
||||
void Write_GPIO_A_7_0(unsigned char temp);
|
||||
unsigned char Read_GPIO_A_7_0(void);
|
||||
void Set_GPIO_A_In_Out(uint8_t temp);
|
||||
void Write_GPIO_A_7_0(uint8_t temp);
|
||||
uint8_t Read_GPIO_A_7_0(void);
|
||||
//[F2h]
|
||||
void Write_GPIO_B_7_4(unsigned char temp);
|
||||
unsigned char Read_GPIO_B_7_0(void);
|
||||
void Write_GPIO_B_7_4(uint8_t temp);
|
||||
uint8_t Read_GPIO_B_7_0(void);
|
||||
//[F3h][F4h]
|
||||
void Set_GPIO_C_In_Out(unsigned char temp);
|
||||
void Write_GPIO_C_7_0(unsigned char temp);
|
||||
unsigned char Read_GPIO_C_7_0(void);
|
||||
void Set_GPIO_C_In_Out(uint8_t temp);
|
||||
void Write_GPIO_C_7_0(uint8_t temp);
|
||||
uint8_t Read_GPIO_C_7_0(void);
|
||||
//[F5h][F6h]
|
||||
void Set_GPIO_D_In_Out(unsigned char temp);
|
||||
void Write_GPIO_D_7_0(unsigned char temp);
|
||||
unsigned char Read_GPIO_D_7_0(void);
|
||||
void Set_GPIO_D_In_Out(uint8_t temp);
|
||||
void Write_GPIO_D_7_0(uint8_t temp);
|
||||
uint8_t Read_GPIO_D_7_0(void);
|
||||
//[F7h][F8h]
|
||||
void Set_GPIO_E_In_Out(unsigned char temp);
|
||||
void Write_GPIO_E_7_0(unsigned char temp);
|
||||
unsigned char Read_GPIO_E_7_0(void);
|
||||
void Set_GPIO_E_In_Out(uint8_t temp);
|
||||
void Write_GPIO_E_7_0(uint8_t temp);
|
||||
uint8_t Read_GPIO_E_7_0(void);
|
||||
//[F9h][FAh]
|
||||
void Set_GPIO_F_In_Out(unsigned char temp);
|
||||
void Write_GPIO_F_7_0(unsigned char temp);
|
||||
unsigned char Read_GPIO_F_7_0(void);
|
||||
void Set_GPIO_F_In_Out(uint8_t temp);
|
||||
void Write_GPIO_F_7_0(uint8_t temp);
|
||||
uint8_t Read_GPIO_F_7_0(void);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@ -660,26 +679,26 @@ unsigned char Read_GPIO_F_7_0(void);
|
|||
//**[FBh]~[FFh]**//
|
||||
//[FBh]
|
||||
void Long_Key_enable(void);
|
||||
void Key_Scan_Freg(unsigned char temp); //set bit2~0
|
||||
void Key_Scan_Freg(uint8_t temp); //set bit2~0
|
||||
|
||||
//[FCh]
|
||||
void Key_Scan_Wakeup_Function_Enable(void);
|
||||
void Long_Key_Timing_Adjustment(unsigned char setx);//set bit5~3
|
||||
unsigned char Numbers_of_Key_Hit(void);
|
||||
void Long_Key_Timing_Adjustment(uint8_t setx);//set bit5~3
|
||||
uint8_t Numbers_of_Key_Hit(void);
|
||||
|
||||
//[FDh][FEh][FFh]
|
||||
unsigned char Read_Key_Strobe_Data_0(void);
|
||||
unsigned char Read_Key_Strobe_Data_1(void);
|
||||
unsigned char Read_Key_Strobe_Data_2(void);
|
||||
uint8_t Read_Key_Strobe_Data_0(void);
|
||||
uint8_t Read_Key_Strobe_Data_1(void);
|
||||
uint8_t Read_Key_Strobe_Data_2(void);
|
||||
|
||||
void Show_String(char *str);
|
||||
void Show_picture(unsigned long numbers,const unsigned short *data);
|
||||
void Show_picture(uint32_t numbers, const uint16_t *data);
|
||||
|
||||
void PWM0_ON(void); //¿ªPWM0
|
||||
void PWM0_ON(void); //PWM0
|
||||
|
||||
void lt768_hw_reset(void);
|
||||
void System_Check_Temp(void);
|
||||
void Enable_SPI_Flash_DMA(unsigned char val);
|
||||
void Enable_SPI_Flash_DMA(uint8_t val);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,26 +1,38 @@
|
|||
/********************* COPYRIGHT **********************
|
||||
* File Name : lt768_lib.h
|
||||
* Author : Levetop Electronics
|
||||
* Version : V1.3
|
||||
* Date : 2019-5-14
|
||||
* Description : LT768x所有功能函数
|
||||
********************************************************/
|
||||
/*
|
||||
* Copyright (c) 2022 AIIT XUOS Lab
|
||||
* XiUOS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
* http://license.coscl.org.cn/MulanPSL2
|
||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
|
||||
#ifndef _LT768_Lib_H
|
||||
#define _LT768_Lib_H
|
||||
/**
|
||||
* @file lt768_lib.h
|
||||
* @brief lt768 register relative driver, inherit from Levetop Electronics
|
||||
* @version 1.0
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2022.9.19
|
||||
*/
|
||||
|
||||
#ifndef __LT768_LIB_H_
|
||||
#define __LT768_LIB_H_
|
||||
#include "lt768.h"
|
||||
|
||||
//外部晶振
|
||||
//external OSC
|
||||
#define XI_4M 0
|
||||
#define XI_8M 1
|
||||
#define XI_10M 0
|
||||
#define XI_12M 0
|
||||
|
||||
//分辨率
|
||||
//resolution
|
||||
#define LCD_XSIZE_TFT 480
|
||||
#define LCD_YSIZE_TFT 272
|
||||
|
||||
//参数
|
||||
//parameter
|
||||
#define LCD_VBPD 20
|
||||
#define LCD_VFPD 12
|
||||
#define LCD_VSPW 3
|
||||
|
@ -127,138 +139,641 @@
|
|||
|
||||
void lt768_init(void);
|
||||
|
||||
/* 写数据到内存 */
|
||||
void MPuint8_t_8bpp_Memory_Write(unsigned short x,unsigned short y,unsigned short w,unsigned short h,const unsigned char *data);
|
||||
void MPuint8_t_16bpp_Memory_Write(unsigned short x,unsigned short y,unsigned short w,unsigned short h,const unsigned char *data);
|
||||
void MPuint8_t_24bpp_Memory_Write(unsigned short x,unsigned short y,unsigned short w,unsigned short h,const unsigned char *data);
|
||||
void MPuint16_t_16bpp_Memory_Write(unsigned short x,unsigned short y,unsigned short w,unsigned short h,const unsigned short *data);
|
||||
void MPuint16_t_24bpp_Mode1_Memory_Write(unsigned short x,unsigned short y,unsigned short w,unsigned short h,const unsigned short *data);
|
||||
void MPuint16_t_24bpp_Mode2_Memory_Write(unsigned short x,unsigned short y,unsigned short w,unsigned short h,const unsigned short *data);
|
||||
/* write to memory */
|
||||
void MPuint8_t_8bpp_Memory_Write(uint16_t x,
|
||||
uint16_t y,
|
||||
uint16_t w,
|
||||
uint16_t h,
|
||||
const uint8_t *data);
|
||||
void MPuint8_t_16bpp_Memory_Write(uint16_t x,
|
||||
uint16_t y,
|
||||
uint16_t w,
|
||||
uint16_t h,
|
||||
const uint8_t *data);
|
||||
void MPuint8_t_24bpp_Memory_Write(uint16_t x,
|
||||
uint16_t y,
|
||||
uint16_t w,
|
||||
uint16_t h,
|
||||
const uint8_t *data);
|
||||
void MPuint16_t_16bpp_Memory_Write(uint16_t x,
|
||||
uint16_t y,
|
||||
uint16_t w,
|
||||
uint16_t h,
|
||||
const uint16_t *data);
|
||||
void MPuint16_t_24bpp_Mode1_Memory_Write(uint16_t x,
|
||||
uint16_t y,
|
||||
uint16_t w,
|
||||
uint16_t h,
|
||||
const uint16_t *data);
|
||||
void MPuint16_t_24bpp_Mode2_Memory_Write(uint16_t x,
|
||||
uint16_t y,
|
||||
uint16_t w,
|
||||
uint16_t h,
|
||||
const uint16_t *data);
|
||||
|
||||
/* 硬件画线段 */
|
||||
void LT768_DrawLine(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned long LineColor);
|
||||
void LT768_DrawLine_Width(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned long LineColor,unsigned short Width);
|
||||
/* draw line */
|
||||
void LT768_DrawLine(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint32_t LineColor);
|
||||
void LT768_DrawLine_Width(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint32_t LineColor,
|
||||
uint16_t Width);
|
||||
|
||||
/* 硬件画圆 */
|
||||
void LT768_DrawCircle(unsigned short XCenter,unsigned short YCenter,unsigned short R,unsigned long CircleColor);
|
||||
void LT768_DrawCircle_Fill(unsigned short XCenter,unsigned short YCenter,unsigned short R,unsigned long ForegroundColor);
|
||||
void LT768_DrawCircle_Width(unsigned short XCenter,unsigned short YCenter,unsigned short R,unsigned long CircleColor,unsigned long ForegroundColor,unsigned short Width);
|
||||
/* draw circle */
|
||||
void LT768_DrawCircle(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t R,
|
||||
uint32_t CircleColor);
|
||||
void LT768_DrawCircle_Fill(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t R,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawCircle_Width(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t R,
|
||||
uint32_t CircleColor,
|
||||
uint32_t ForegroundColor,
|
||||
uint16_t Width);
|
||||
|
||||
/* 硬件画椭圆 */
|
||||
void LT768_DrawEllipse(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long EllipseColor);
|
||||
void LT768_DrawEllipse_Fill(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long ForegroundColor);
|
||||
void LT768_DrawEllipse_Width(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long EllipseColor,unsigned long ForegroundColor,unsigned short Width);
|
||||
/* draw elipse */
|
||||
void LT768_DrawEllipse(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t EllipseColor);
|
||||
void LT768_DrawEllipse_Fill(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawEllipse_Width(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t EllipseColor,
|
||||
uint32_t ForegroundColor,
|
||||
uint16_t Width);
|
||||
|
||||
/* 硬件画矩形 */
|
||||
void LT768_DrawSquare(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned long SquareColor);
|
||||
void LT768_DrawSquare_Fill(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned long ForegroundColor);
|
||||
void LT768_DrawSquare_Width(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned long SquareColor,unsigned long ForegroundColor,unsigned short Width);
|
||||
/* draw square */
|
||||
void LT768_DrawSquare(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint32_t SquareColor);
|
||||
void LT768_DrawSquare_Fill(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawSquare_Width(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint32_t SquareColor,
|
||||
uint32_t ForegroundColor,
|
||||
uint16_t Width);
|
||||
|
||||
/* 硬件画圆角矩形 */
|
||||
void LT768_DrawCircleSquare(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X_R,unsigned short Y_R,unsigned long CircleSquareColor);
|
||||
void LT768_DrawCircleSquare_Fill(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X_R,unsigned short Y_R,unsigned long ForegroundColor);
|
||||
void LT768_DrawCircleSquare_Width(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X_R,unsigned short Y_R,unsigned long CircleSquareColor,unsigned long ForegroundColor,unsigned short Width);
|
||||
/* draw circle square */
|
||||
void LT768_DrawCircleSquare(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t CircleSquareColor);
|
||||
void LT768_DrawCircleSquare_Fill(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawCircleSquare_Width(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t CircleSquareColor,
|
||||
uint32_t ForegroundColor,
|
||||
uint16_t Width);
|
||||
|
||||
/* 硬件画三角形 */
|
||||
void LT768_DrawTriangle(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned long TriangleColor);
|
||||
void LT768_DrawTriangle_Fill(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned long ForegroundColor);
|
||||
void LT768_DrawTriangle_Frame(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned long TriangleColor,unsigned long ForegroundColor);
|
||||
/* draw triangle */
|
||||
void LT768_DrawTriangle(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint32_t TriangleColor);
|
||||
void LT768_DrawTriangle_Fill(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawTriangle_Frame(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint32_t TriangleColor,
|
||||
uint32_t ForegroundColor);
|
||||
|
||||
/* 硬件画四边形 */
|
||||
void LT768_DrawQuadrilateral(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned short X4,unsigned short Y4,unsigned long ForegroundColor);
|
||||
void LT768_DrawQuadrilateral_Fill(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned short X4,unsigned short Y4,unsigned long ForegroundColor);
|
||||
void LT768_DrawTriangle_Frame(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned long TriangleColor ,unsigned long ForegroundColor);
|
||||
/* draw quadrilateral */
|
||||
void LT768_DrawQuadrilateral(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint16_t X4,
|
||||
uint16_t Y4,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawQuadrilateral_Fill(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint16_t X4,
|
||||
uint16_t Y4,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawTriangle_Frame(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint32_t TriangleColor,
|
||||
uint32_t ForegroundColor);
|
||||
|
||||
/* 硬件画五边形 */
|
||||
void LT768_DrawPentagon(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned short X4,unsigned short Y4,unsigned short X5,unsigned short Y5,unsigned long ForegroundColor);
|
||||
void LT768_DrawPentagon_Fill(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned short X4,unsigned short Y4,unsigned short X5,unsigned short Y5,unsigned long ForegroundColor);
|
||||
/* draw pentagon */
|
||||
void LT768_DrawPentagon(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint16_t X4,
|
||||
uint16_t Y4,
|
||||
uint16_t X5,
|
||||
uint16_t Y5,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawPentagon_Fill(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint16_t X4,
|
||||
uint16_t Y4,
|
||||
uint16_t X5,
|
||||
uint16_t Y5,
|
||||
uint32_t ForegroundColor);
|
||||
|
||||
/* 硬件画曲线 */
|
||||
void LT768_DrawLeftUpCurve(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long CurveColor);
|
||||
void LT768_DrawLeftDownCurve(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long CurveColor);
|
||||
void LT768_DrawRightUpCurve(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long CurveColor);
|
||||
void LT768_DrawRightDownCurve(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long CurveColor);
|
||||
void LT768_SelectDrawCurve(unsigned short XCenter ,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long CurveColor,unsigned short Dir);
|
||||
/* draw curve */
|
||||
void LT768_DrawLeftUpCurve(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t CurveColor);
|
||||
void LT768_DrawLeftDownCurve(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t CurveColor);
|
||||
void LT768_DrawRightUpCurve(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t CurveColor);
|
||||
void LT768_DrawRightDownCurve(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t CurveColor);
|
||||
void LT768_SelectDrawCurve(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t CurveColor,
|
||||
uint16_t Dir);
|
||||
|
||||
/* 硬件画1/4椭圆 */
|
||||
void LT768_DrawLeftUpCurve_Fill(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long ForegroundColor);
|
||||
void LT768_DrawLeftDownCurve_Fill(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long ForegroundColor);
|
||||
void LT768_DrawRightUpCurve_Fill(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long ForegroundColor);
|
||||
void LT768_DrawRightDownCurve_Fill(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long ForegroundColor);
|
||||
void LT768_SelectDrawCurve_Fill(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned long CurveColor,unsigned short Dir);
|
||||
/* draw 1/4 filled curve */
|
||||
void LT768_DrawLeftUpCurve_Fill(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawLeftDownCurve_Fill(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawRightUpCurve_Fill(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_DrawRightDownCurve_Fill(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t ForegroundColor);
|
||||
void LT768_SelectDrawCurve_Fill(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint32_t CurveColor,
|
||||
uint16_t Dir);
|
||||
|
||||
/* 硬件画圆柱 */
|
||||
unsigned char LT768_DrawCylinder(unsigned short XCenter,unsigned short YCenter,unsigned short X_R,unsigned short Y_R,unsigned short H,unsigned long CylinderColor,unsigned long ForegroundColor);
|
||||
/* draw cylinders */
|
||||
uint8_t LT768_DrawCylinder(uint16_t XCenter,
|
||||
uint16_t YCenter,
|
||||
uint16_t X_R,
|
||||
uint16_t Y_R,
|
||||
uint16_t H,
|
||||
uint32_t CylinderColor,
|
||||
uint32_t ForegroundColor);
|
||||
|
||||
/* 硬件画四棱柱 */
|
||||
void LT768_DrawQuadrangular(unsigned short X1,unsigned short Y1,unsigned short X2,unsigned short Y2,unsigned short X3,unsigned short Y3,unsigned short X4,unsigned short Y4,unsigned short X5,unsigned short Y5,unsigned short X6,unsigned short Y6,unsigned long QuadrangularColor,unsigned long ForegroundColor);
|
||||
/* draw quadrangular */
|
||||
void LT768_DrawQuadrangular(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X2,
|
||||
uint16_t Y2,
|
||||
uint16_t X3,
|
||||
uint16_t Y3,
|
||||
uint16_t X4,
|
||||
uint16_t Y4,
|
||||
uint16_t X5,
|
||||
uint16_t Y5,
|
||||
uint16_t X6,
|
||||
uint16_t Y6,
|
||||
uint32_t QuadrangularColor,
|
||||
uint32_t ForegroundColor);
|
||||
|
||||
/* 表格 */
|
||||
void LT768_MakeTable(unsigned short X1,unsigned short Y1,unsigned short W,unsigned short H,unsigned short Line,unsigned short Row,unsigned long TableColor,unsigned long ItemColor,unsigned long ForegroundColor,unsigned short width1,unsigned short width2,unsigned char mode);
|
||||
/* table */
|
||||
void LT768_MakeTable(uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t W,
|
||||
uint16_t H,
|
||||
uint16_t Line,
|
||||
uint16_t Row,
|
||||
uint32_t TableColor,
|
||||
uint32_t ItemColor,
|
||||
uint32_t ForegroundColor,
|
||||
uint16_t width1,
|
||||
uint16_t width2,
|
||||
uint8_t mode);
|
||||
|
||||
/* 线性模式下DMA传输数据到SDRAM中 */
|
||||
void LT768_DMA_24bit_Linear(unsigned char SCS,unsigned char Clk,unsigned long flash_addr,unsigned long memory_ad,unsigned long data_num);
|
||||
void LT768_DMA_32bit_Linear(unsigned char SCS,unsigned char Clk,unsigned long flash_addr,unsigned long memory_ad,unsigned long data_num);
|
||||
/* linear DMA transport to SDRAM */
|
||||
void LT768_DMA_24bit_Linear(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t flash_addr,
|
||||
uint32_t memory_ad,
|
||||
uint32_t data_num);
|
||||
void LT768_DMA_32bit_Linear(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t flash_addr,
|
||||
uint32_t memory_ad,
|
||||
uint32_t data_num);
|
||||
|
||||
/* 区块模式下DMA传输数据到SDRAM中 */
|
||||
void LT768_DMA_24bit_Block(unsigned char SCS,unsigned char Clk,unsigned short X1,unsigned short Y1 ,unsigned short X_W,unsigned short Y_H,unsigned short P_W,unsigned long Addr);
|
||||
void LT768_DMA_32bit_Block(unsigned char SCS,unsigned char Clk,unsigned short X1,unsigned short Y1 ,unsigned short X_W,unsigned short Y_H,unsigned short P_W,unsigned long Addr);
|
||||
/* DMA transport to SDRAM */
|
||||
void LT768_DMA_24bit_Block(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint16_t P_W,
|
||||
uint32_t Addr);
|
||||
void LT768_DMA_32bit_Block(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint16_t P_W,
|
||||
uint32_t Addr);
|
||||
|
||||
/* 使用内建字库 */
|
||||
void LT768_Select_Internal_Font_Init(unsigned char Size,unsigned char XxN,unsigned char YxN,unsigned char ChromaKey,unsigned char Alignment);
|
||||
void LT768_Print_Internal_Font_String(unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor ,char *c);
|
||||
/* use internal font */
|
||||
void LT768_Select_Internal_Font_Init(uint8_t Size,
|
||||
uint8_t XxN,
|
||||
uint8_t YxN,
|
||||
uint8_t ChromaKey,
|
||||
uint8_t Alignment);
|
||||
void LT768_Print_Internal_Font_String(uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
char *c);
|
||||
|
||||
/* nor flash使用外建字库 */
|
||||
/* nor flash use outside font */
|
||||
/* 16*16 24*24 32*32 */
|
||||
void LT768_Select_Outside_Font_Init(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr,unsigned long Num,unsigned char Size,unsigned char XxN,unsigned char YxN,unsigned char ChromaKey,unsigned char Alignment);
|
||||
void LT768_Print_Outside_Font_String(unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned char *c);
|
||||
void LT768_Print_Outside_Font_GBK_String(unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned char *c);
|
||||
/* 48*48 72*72全角 */
|
||||
void LT768_BTE_Memory_Copy_ColorExpansion_8(unsigned long S0_Addr,unsigned short YS0,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned short X_W,unsigned short Y_H,unsigned long Foreground_color,unsigned long Background_color);
|
||||
void LT768_BTE_Memory_Copy_ColorExpansion_Chroma_key_8(unsigned long S0_Addr,unsigned short YS0,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned short X_W,unsigned short Y_H,unsigned long Foreground_color);
|
||||
void LT768_Print_Outside_Font_GB2312_48_72(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr,unsigned long ShowAddr,unsigned short width,unsigned char Size,unsigned char ChromaKey,unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned short w,unsigned short s,unsigned char *c);
|
||||
void LT768_Print_Outside_Font_BIG5_48_72(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr,unsigned long ShowAddr,unsigned short width,unsigned char Size,unsigned char ChromaKey,unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned short w,unsigned short s,unsigned char *c);
|
||||
void LT768_Print_Outside_Font_GBK_48_72(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr,unsigned long ShowAddr,unsigned short width,unsigned char Size,unsigned char ChromaKey,unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned short w,unsigned short s,unsigned char *c);
|
||||
void LT768_Select_Outside_Font_Init(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr,
|
||||
uint32_t Num,
|
||||
uint8_t Size,
|
||||
uint8_t XxN,
|
||||
uint8_t YxN,
|
||||
uint8_t ChromaKey,
|
||||
uint8_t Alignment);
|
||||
void LT768_Print_Outside_Font_String(uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint8_t *c);
|
||||
void LT768_Print_Outside_Font_GBK_String(uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint8_t *c);
|
||||
/* 48*48 72*72 SBC case */
|
||||
void LT768_BTE_Memory_Copy_ColorExpansion_8(uint32_t S0_Addr,
|
||||
uint16_t YS0,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint32_t Foreground_color,
|
||||
uint32_t Background_color);
|
||||
void LT768_BTE_Memory_Copy_ColorExpansion_Chroma_key_8(uint32_t S0_Addr,
|
||||
uint16_t YS0,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint32_t Foreground_color);
|
||||
void LT768_Print_Outside_Font_GB2312_48_72(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr,
|
||||
uint32_t ShowAddr,
|
||||
uint16_t width,
|
||||
uint8_t Size,
|
||||
uint8_t ChromaKey,
|
||||
uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint16_t w,
|
||||
uint16_t s,
|
||||
uint8_t *c);
|
||||
void LT768_Print_Outside_Font_BIG5_48_72(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr,
|
||||
uint32_t ShowAddr,
|
||||
uint16_t width,
|
||||
uint8_t Size,
|
||||
uint8_t ChromaKey,
|
||||
uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint16_t w,
|
||||
uint16_t s,
|
||||
uint8_t *c);
|
||||
void LT768_Print_Outside_Font_GBK_48_72(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr,
|
||||
uint32_t ShowAddr,
|
||||
uint16_t width,
|
||||
uint8_t Size,
|
||||
uint8_t ChromaKey,
|
||||
uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint16_t w,
|
||||
uint16_t s,
|
||||
uint8_t *c);
|
||||
|
||||
/* nor flash使用自定义字库 */
|
||||
/* 16*16 24*24 32*32 48*48 72*72全角 */
|
||||
int Get_User_Font_P(char chH,char chL);
|
||||
void LT768_Print_Outside_UserDefineFont_GB2312(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr,unsigned long ShowAddr,unsigned short width,unsigned char Size,unsigned char ChromaKey,unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned short w,unsigned short s,unsigned char *c);
|
||||
/* nor flash used define font */
|
||||
/* 16*16 24*24 32*32 48*48 72*72 SBC case */
|
||||
int Get_User_Font_P(char chH,
|
||||
char chL);
|
||||
void LT768_Print_Outside_UserDefineFont_GB2312(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr,
|
||||
uint32_t ShowAddr,
|
||||
uint16_t width,
|
||||
uint8_t Size,
|
||||
uint8_t ChromaKey,
|
||||
uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint16_t w,
|
||||
uint16_t s,
|
||||
uint8_t *c);
|
||||
|
||||
/* 文字光标 */
|
||||
void LT768_Text_cursor_Init(unsigned char On_Off_Blinking,unsigned short Blinking_Time,unsigned short X_W,unsigned short Y_W);
|
||||
/* text cursor */
|
||||
void LT768_Text_cursor_Init(uint8_t On_Off_Blinking,
|
||||
uint16_t Blinking_Time,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_W);
|
||||
void LT768_Enable_Text_Cursor(void);
|
||||
void LT768_Disable_Text_Cursor(void);
|
||||
|
||||
/* 图像光标 */
|
||||
void LT768_Graphic_cursor_Init(unsigned char Cursor_N,unsigned char Color1,unsigned char Color2,unsigned short X_Pos,unsigned short Y_Pos,unsigned char *Cursor_Buf);
|
||||
void LT768_Set_Graphic_cursor_Pos(unsigned char Cursor_N,unsigned short X_Pos,unsigned short Y_Pos);
|
||||
/* graphic cursor */
|
||||
void LT768_Graphic_cursor_Init(uint8_t Cursor_N,
|
||||
uint8_t Color1,
|
||||
uint8_t Color2,
|
||||
uint16_t X_Pos,
|
||||
uint16_t Y_Pos,
|
||||
uint8_t *Cursor_Buf);
|
||||
void LT768_Set_Graphic_cursor_Pos(uint8_t Cursor_N,
|
||||
uint16_t X_Pos,
|
||||
uint16_t Y_Pos);
|
||||
void LT768_Enable_Graphic_Cursor(void);
|
||||
void LT768_Disable_Graphic_Cursor(void);
|
||||
|
||||
/* 区块传输引擎(BitBLT) */
|
||||
void BTE_Solid_Fill(unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned short color,unsigned short X_W,unsigned short Y_H);
|
||||
void LT768_BTE_Memory_Copy(unsigned long S0_Addr,unsigned short S0_W,unsigned short XS0,unsigned short YS0,unsigned long S1_Addr,unsigned short S1_W,unsigned short XS1,unsigned short YS1,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned int ROP_Code,unsigned short X_W,unsigned short Y_H);
|
||||
void LT768_BTE_Memory_Copy_Chroma_key(unsigned long S0_Addr,unsigned short S0_W,unsigned short XS0,unsigned short YS0,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned long Background_color,unsigned short X_W,unsigned short Y_H);
|
||||
void LT768_BTE_Pattern_Fill(unsigned char P_8x8_or_16x16,unsigned long S0_Addr,unsigned short S0_W,unsigned short XS0,unsigned short YS0,unsigned long Des_Addr,unsigned short Des_W, unsigned short XDes,unsigned short YDes,unsigned int ROP_Code ,unsigned short X_W,unsigned short Y_H);
|
||||
void LT768_BTE_Pattern_Fill_With_Chroma_key(unsigned char P_8x8_or_16x16,unsigned long S0_Addr,unsigned short S0_W,unsigned short XS0,unsigned short YS0,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned int ROP_Code,unsigned long Background_color,unsigned short X_W,unsigned short Y_H);
|
||||
void LT768_BTE_MCU_Write_MCU_16bit(unsigned long S1_Addr,unsigned short S1_W,unsigned short XS,unsigned short YS1,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned int ROP_Code,unsigned short X_W,unsigned short Y_H ,const unsigned short *data);
|
||||
void LT768_BTE_MCU_Write_Chroma_key_MCU_16bit(unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned long Background_color,unsigned short X_W,unsigned short Y_H,const unsigned short *data);
|
||||
void LT768_BTE_MCU_Write_ColorExpansion_MCU_16bit(unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned short X_W,unsigned short Y_H,unsigned long Foreground_color ,unsigned long Background_color ,const unsigned short *data);
|
||||
void LT768_BTE_MCU_Write_ColorExpansion_Chroma_key_MCU_16bit(unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned short X_W,unsigned short Y_H,unsigned long Foreground_color,const unsigned short *data);
|
||||
void BTE_Alpha_Blending(unsigned long S0_Addr,unsigned short S0_W,unsigned short XS0,unsigned short YS0,unsigned long S1_Addr,unsigned short S1_W,unsigned short XS1,unsigned short YS1,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned short X_W,unsigned short Y_H,unsigned char alpha);
|
||||
void BTE_Pixel_8bpp_Alpha_Blending(unsigned long S0_Addr,unsigned short S0_W,unsigned short XS0,unsigned short YS0,unsigned long S1_Addr,unsigned short S1_W,unsigned short XS1,unsigned short YS1,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned short X_W,unsigned short Y_H);
|
||||
void BTE_Pixel_16bpp_Alpha_Blending(unsigned long S0_Addr,unsigned short S0_W,unsigned short XS0,unsigned short YS0,unsigned long S1_Addr,unsigned short S1_W,unsigned short XS1,unsigned short YS1,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned short X_W,unsigned short Y_H);
|
||||
/* block transport enginer (BitBLT) */
|
||||
void BTE_Solid_Fill(uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint16_t color,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
void LT768_BTE_Memory_Copy(uint32_t S0_Addr,
|
||||
uint16_t S0_W,
|
||||
uint16_t XS0,
|
||||
uint16_t YS0,
|
||||
uint32_t S1_Addr,
|
||||
uint16_t S1_W,
|
||||
uint16_t XS1,
|
||||
uint16_t YS1,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
unsigned int ROP_Code,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
void LT768_BTE_Memory_Copy_Chroma_key(uint32_t S0_Addr,
|
||||
uint16_t S0_W,
|
||||
uint16_t XS0,
|
||||
uint16_t YS0,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint32_t Background_color,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
void LT768_BTE_Pattern_Fill(uint8_t P_8x8_or_16x16,
|
||||
uint32_t S0_Addr,
|
||||
uint16_t S0_W,
|
||||
uint16_t XS0,
|
||||
uint16_t YS0,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
unsigned int ROP_Code,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
void LT768_BTE_Pattern_Fill_With_Chroma_key(uint8_t P_8x8_or_16x16,
|
||||
uint32_t S0_Addr,
|
||||
uint16_t S0_W,
|
||||
uint16_t XS0,
|
||||
uint16_t YS0,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
unsigned int ROP_Code,
|
||||
uint32_t Background_color,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
void LT768_BTE_MCU_Write_MCU_16bit(uint32_t S1_Addr,
|
||||
uint16_t S1_W,
|
||||
uint16_t XS,
|
||||
uint16_t YS1,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
unsigned int ROP_Code,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
const uint16_t *data);
|
||||
void LT768_BTE_MCU_Write_Chroma_key_MCU_16bit(uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint32_t Background_color,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
const uint16_t *data);
|
||||
void LT768_BTE_MCU_Write_ColorExpansion_MCU_16bit(uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint32_t Foreground_color,
|
||||
uint32_t Background_color,
|
||||
const uint16_t *data);
|
||||
void LT768_BTE_MCU_Write_ColorExpansion_Chroma_key_MCU_16bit(uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint32_t Foreground_color,
|
||||
const uint16_t *data);
|
||||
void BTE_Alpha_Blending(uint32_t S0_Addr,
|
||||
uint16_t S0_W,
|
||||
uint16_t XS0,
|
||||
uint16_t YS0,
|
||||
uint32_t S1_Addr,
|
||||
uint16_t S1_W,
|
||||
uint16_t XS1,
|
||||
uint16_t YS1,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint8_t alpha);
|
||||
void BTE_Pixel_8bpp_Alpha_Blending(uint32_t S0_Addr,
|
||||
uint16_t S0_W,
|
||||
uint16_t XS0,
|
||||
uint16_t YS0,
|
||||
uint32_t S1_Addr,
|
||||
uint16_t S1_W,
|
||||
uint16_t XS1,
|
||||
uint16_t YS1,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
void BTE_Pixel_16bpp_Alpha_Blending(uint32_t S0_Addr,
|
||||
uint16_t S0_W,
|
||||
uint16_t XS0,
|
||||
uint16_t YS0,
|
||||
uint32_t S1_Addr,
|
||||
uint16_t S1_W,
|
||||
uint16_t XS1,
|
||||
uint16_t YS1,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
|
||||
/* PIP */
|
||||
void LT768_PIP_Init(unsigned char On_Off,unsigned char Select_PIP,unsigned long PAddr,unsigned short XP,unsigned short YP,unsigned long ImageWidth,unsigned short X_Dis,unsigned short Y_Dis,unsigned short X_W,unsigned short Y_H);
|
||||
void LT768_Set_DisWindowPos(unsigned char On_Off,unsigned char Select_PIP,unsigned short X_Dis,unsigned short Y_Dis);
|
||||
void LT768_PIP_Init(uint8_t On_Off,
|
||||
uint8_t Select_PIP,
|
||||
uint32_t PAddr,
|
||||
uint16_t XP,
|
||||
uint16_t YP,
|
||||
uint32_t ImageWidth,
|
||||
uint16_t X_Dis,
|
||||
uint16_t Y_Dis,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
void LT768_Set_DisWindowPos(uint8_t On_Off,
|
||||
uint8_t Select_PIP,
|
||||
uint16_t X_Dis,
|
||||
uint16_t Y_Dis);
|
||||
|
||||
/* PWM */
|
||||
void LT768_PWM0_Init(unsigned char on_off,unsigned char Clock_Divided,unsigned char Prescalar,unsigned short Count_Buffer,unsigned short Compare_Buffer);
|
||||
void LT768_PWM1_Init(unsigned char on_off,unsigned char Clock_Divided,unsigned char Prescalar,unsigned short Count_Buffer,unsigned short Compare_Buffer);
|
||||
void LT768_PWM0_Duty(unsigned short Compare_Buffer);
|
||||
void LT768_PWM1_Duty(unsigned short Compare_Buffer);
|
||||
void LT768_PWM0_Init(uint8_t on_off,
|
||||
uint8_t Clock_Divided,
|
||||
uint8_t Prescalar,
|
||||
uint16_t Count_Buffer,
|
||||
uint16_t Compare_Buffer);
|
||||
void LT768_PWM1_Init(uint8_t on_off,
|
||||
uint8_t Clock_Divided,
|
||||
uint8_t Prescalar,
|
||||
uint16_t Count_Buffer,
|
||||
uint16_t Compare_Buffer);
|
||||
void LT768_PWM0_Duty(uint16_t Compare_Buffer);
|
||||
void LT768_PWM1_Duty(uint16_t Compare_Buffer);
|
||||
|
||||
/* Standby Mode */
|
||||
void LT768_Standby(void);
|
||||
|
@ -273,34 +788,126 @@ void LT768_SleepMode(void);
|
|||
void LT768_Wkup_Sleep(void);
|
||||
|
||||
/* W25QXX */
|
||||
void LT768_SPI_Init(uint8_t cs,uint8_t div);
|
||||
void LT768_SPI_Init(uint8_t cs,
|
||||
uint8_t div);
|
||||
void W25QXX_Enter_4Byte_AddressMode(void);
|
||||
void LT_W25QXX_Read(uint8_t* pBuffer,uint32_t ReadAddr,uint16_t NumByteToRead);
|
||||
void LT_W25QXX_Read(uint8_t *pBuffer,
|
||||
uint32_t ReadAddr,
|
||||
uint16_t NumByteToRead);
|
||||
|
||||
/* nand flash W25N01GV */
|
||||
uint8_t W25N01GV_ReadSR(uint8_t reg);
|
||||
void W25N01GV_Write_SR(uint8_t reg,uint8_t val);
|
||||
void W25N01GV_Write_SR(uint8_t reg,
|
||||
uint8_t val);
|
||||
void W25N01GV_Wait_Busy(void);
|
||||
void W25N01GV_ContinuousRead_Mode(void);
|
||||
void W25N01GV_Write_Page(uint16_t page);
|
||||
void W25N01GV_ReadPageAddr_Data(uint8_t* pBuffer,uint32_t PageNum,uint32_t PageAddr,uint16_t NumByteToRead);
|
||||
void LT_W25N01GV_Read(uint8_t* pBuffer,uint32_t ReadAddr,uint16_t NumByteToRead);
|
||||
void W25N01GV_ReadPageAddr_Data(uint8_t *pBuffer,
|
||||
uint32_t PageNum,
|
||||
uint32_t PageAddr,
|
||||
uint16_t NumByteToRead);
|
||||
void LT_W25N01GV_Read(uint8_t *pBuffer,
|
||||
uint32_t ReadAddr,
|
||||
uint16_t NumByteToRead);
|
||||
|
||||
/* nand flash显示图片 */
|
||||
void LT768_Nand_Pic(unsigned char SCS,unsigned short X1,unsigned short Y1,unsigned short X_W,unsigned short Y_H,unsigned long Addr,unsigned long lay0,unsigned long lay1);
|
||||
/* nand flash draw picture */
|
||||
void LT768_Nand_Pic(uint8_t SCS,
|
||||
uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint32_t Addr,
|
||||
uint32_t lay0,
|
||||
uint32_t lay1);
|
||||
|
||||
/* nand flash使用外建字库初始化 */
|
||||
/* nand flash use outside font */
|
||||
/* 16*16 24*24 32*32 */
|
||||
void NandFlash_Select_Outside_Font_Init(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr,unsigned long Num,unsigned char Size,unsigned char XxN,unsigned char YxN,unsigned char ChromaKey,unsigned char Alignment);
|
||||
void NandFlash_Select_Outside_Font_Init(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr,
|
||||
uint32_t Num,
|
||||
uint8_t Size,
|
||||
uint8_t XxN,
|
||||
uint8_t YxN,
|
||||
uint8_t ChromaKey,
|
||||
uint8_t Alignment);
|
||||
|
||||
/* nand flash使用外建字库 */
|
||||
/* 48*48 72*72全角 */
|
||||
void LT768_BTE_Memory_Copy_8(unsigned long S0_Addr,unsigned short S0_W,unsigned short XS0,unsigned short YS0,unsigned long S1_Addr,unsigned short S1_W,unsigned short XS1,unsigned short YS1,unsigned long Des_Addr,unsigned short Des_W,unsigned short XDes,unsigned short YDes,unsigned int ROP_Code,unsigned short X_W,unsigned short Y_H);
|
||||
void LT768_Nand_8bpp_font(unsigned char SCS,unsigned char Clk,unsigned short X1,unsigned short Y1,unsigned short X_W,unsigned short Y_H,unsigned long Addr,unsigned long lay1,unsigned long lay2);
|
||||
void LT768_Print_Outside_Font_GB2312_48_72_Nand(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr1,unsigned long MemoryAddr2,unsigned long ShowAddr,unsigned short width,unsigned char Size,unsigned char ChromaKey,unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned short w,unsigned short s,unsigned char *c);
|
||||
void LT768_Print_Outside_Font_GBK_48_72_Nand(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr1,unsigned long MemoryAddr2,unsigned long ShowAddr,unsigned short width,unsigned char Size,unsigned char ChromaKey,unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned short w,unsigned short s,unsigned char *c);
|
||||
/* nand flash use outside font */
|
||||
/* 48*48 72*72 SBC case */
|
||||
void LT768_BTE_Memory_Copy_8(uint32_t S0_Addr,
|
||||
uint16_t S0_W,
|
||||
uint16_t XS0,
|
||||
uint16_t YS0,
|
||||
uint32_t S1_Addr,
|
||||
uint16_t S1_W,
|
||||
uint16_t XS1,
|
||||
uint16_t YS1,
|
||||
uint32_t Des_Addr,
|
||||
uint16_t Des_W,
|
||||
uint16_t XDes,
|
||||
uint16_t YDes,
|
||||
unsigned int ROP_Code,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H);
|
||||
void LT768_Nand_8bpp_font(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint16_t X1,
|
||||
uint16_t Y1,
|
||||
uint16_t X_W,
|
||||
uint16_t Y_H,
|
||||
uint32_t Addr,
|
||||
uint32_t lay1,
|
||||
uint32_t lay2);
|
||||
void LT768_Print_Outside_Font_GB2312_48_72_Nand(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr1,
|
||||
uint32_t MemoryAddr2,
|
||||
uint32_t ShowAddr,
|
||||
uint16_t width,
|
||||
uint8_t Size,
|
||||
uint8_t ChromaKey,
|
||||
uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint16_t w,
|
||||
uint16_t s,
|
||||
uint8_t *c);
|
||||
void LT768_Print_Outside_Font_GBK_48_72_Nand(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr1,
|
||||
uint32_t MemoryAddr2,
|
||||
uint32_t ShowAddr,
|
||||
uint16_t width,
|
||||
uint8_t Size,
|
||||
uint8_t ChromaKey,
|
||||
uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint16_t w,
|
||||
uint16_t s,
|
||||
uint8_t *c);
|
||||
|
||||
/* nand flash使用自定义字库 */
|
||||
/* 16*16 24*24 32*32 48*48 72*72全角 */
|
||||
void LT768_Print_Outside_UserDefineFont_GB2312_Nand(unsigned char SCS,unsigned char Clk,unsigned long FlashAddr,unsigned long MemoryAddr1,unsigned long MemoryAddr2,unsigned long ShowAddr,unsigned short width,unsigned char Size,unsigned char ChromaKey,unsigned short x,unsigned short y,unsigned long FontColor,unsigned long BackGroundColor,unsigned short w,unsigned short s,unsigned char *c);
|
||||
/* nand flash user defined font */
|
||||
/* 16*16 24*24 32*32 48*48 72*72 SBC case */
|
||||
void LT768_Print_Outside_UserDefineFont_GB2312_Nand(uint8_t SCS,
|
||||
uint8_t Clk,
|
||||
uint32_t FlashAddr,
|
||||
uint32_t MemoryAddr1,
|
||||
uint32_t MemoryAddr2,
|
||||
uint32_t ShowAddr,
|
||||
uint16_t width,
|
||||
uint8_t Size,
|
||||
uint8_t ChromaKey,
|
||||
uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
uint16_t w,
|
||||
uint16_t s,
|
||||
uint8_t *c);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue