⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tft_uf12r27a.c

📁 ARMSTM32 lcd驱动程序集锦
💻 C
📖 第 1 页 / 共 2 页
字号:
/******************************************************************************
 ** File Name:      TFT_UF12R27A.c                                             *
 ** Author:         Nick.Zhao                                                 *
 ** DATE:           12/08/2004                                                *
 ** Copyright:      2004 Spreatrum, Incoporated. All Rights Reserved.         *
 ** Description:                                                              *
 **    This file contains driver for TFT UF12R27A.(S6D0110A driver)             *
 ******************************************************************************

 ******************************************************************************
 **                        Edit History                                       *
 ** ------------------------------------------------------------------------- *
 ** DATE           NAME             DESCRIPTION                               *
 ** 12/08/2004     Nick.Zhao	    Create.                                   *
 ******************************************************************************/

#include "os_api.h"
#include "sci_types.h"
#include "gpio_api.h"
#include "lcd.h"
#include "TFT_UF12R27A.h"



/**---------------------------------------------------------------------------*
 **                         Compiler Flag                                     
 **---------------------------------------------------------------------------*/
#ifdef   __cplusplus
    extern   "C" 
    {
#endif
/**---------------------------------------------------------------------------*
 **                         Function Prototypes                               
 **---------------------------------------------------------------------------*/
 void S6D0110A_powerOn(void);
 LOCAL void S6D0110A_set_display_window(
    uint16 left, 	// start Horizon address
	uint16 right, 	// end Horizon address
	uint16 top, 		// start Vertical address
	uint16 bottom	// end Vertical address
	);
	
 LOCAL void S6D0110A_set_start_address(
	uint8 left, 
	uint8 top
	);
	
 LOCAL void S6D0110A_DisplayOn(void);
/**---------------------------------------------------------------------------*
 **      						External variable
 **---------------------------------------------------------------------------*/

// Following Defined in lcd_cfg.c

extern void *LCD_GetLCDBuffer(void);
extern void GPIO_SetLcdBackLight(BOOLEAN ctl);


#ifndef _USE_MTK
  extern uint32 lcd_command_adr;	//address of command for main lcd. 
  extern uint32 lcd_data_adr;  	    //address of data for main lcd. 
#endif

/**---------------------------------------------------------------------------*
 **                            Macro Define
 **---------------------------------------------------------------------------*/

#define	S6D0110A_WIDTH	128
#define	S6D0110A_HEIGHT	160

#ifdef _USE_MTK
  #define S6D0110A_SEND_COMMAND(cmd)         mv3MainLcdWriteCmd(cmd)
  #define S6D0110A_SEND_DATA(data)           mv3MainLcdWriteData(data)

#else 

  #define S6D0110A_SEND_COMMAND(c)   		*((volatile uint16 *)lcd_command_adr) = c
  #define S6D0110A_SEND_DATA(c) 			*((volatile uint16 *)lcd_data_adr) = c

#endif
/**---------------------------------------------------------------------------*
 **                      Function  Definitions
 **---------------------------------------------------------------------------*/


/*********************************************************************/
//  Description:   send a command with a parameter.
//  Input:
//      command: command to send
//      para: parameter to send.
//  Return:
//      None.
//	Note:           
/*********************************************************************/


/*********************************************************************/
//  Description:   Initialize color LCD : S6D0110A
//  Input:
//      None.
//  Return:
//      None.
//	Note:           
/*********************************************************************/
LOCAL ERR_LCD_E S6D0110A_Init(void)
{


    return ERR_LCD_NONE;
       
}


/******************************************************************************/
//  Description:   invalidate a rectang of in LCD
//	Global resource dependence: 
//  Author:         Nick.Zhao
//	Note:
/******************************************************************************/
LOCAL ERR_LCD_E S6D0110A_InvalidateRect(
								 uint16 left,	//left of the rectangle 
								 uint16 top, 	//top of the rectangle
								 uint16 right, 	//right of the rectangle
								 uint16 bottom	//bottom of the rectangle
								 )
{
}




/******************************************************************************/
//  Description:   Set the windows address to display, in this windows
//                 color is  refreshed.
//	Global resource dependence: 
//  Author:         Nick.zhao
//	Note:
/******************************************************************************/
LOCAL void S6D0110A_set_display_window(
    uint16 left, 	// start Horizon address
	uint16 right, 	// end Horizon address
	uint16 top, 		// start Vertical address
	uint16 bottom	// end Vertical address
	)
{
}
/******************************************************************************/
//  Description:  Set start RAM address which is write to AC(Address
//                Counter) register.
//  Input:
//      left: start Horizon address of AC
//      top: start Vertical address of AC.
//  Return:
//      None.
//	Note:           
/******************************************************************************/
LOCAL void S6D0110A_set_start_address(
	uint8 left, 
	uint8 top
	)
{
}

LOCAL void S6D0110A_DisplayOn(void)
{
 

}
/******************************************************************************/
//  Description:   invalidate the whole lcd.
//	Global resource dependence: 
//  Author:         Nick.Zhao
//	Note:
/******************************************************************************/
LOCAL ERR_LCD_E  S6D0110A_Invalidate(void)
{
	
		
	return ERR_LCD_NONE;
}

/******************************************************************************/
//  Description:   Enter/Exit sleep mode .
//	Global resource dependence: 
//  Author:         Nick.Zhao
//	Note:
/******************************************************************************/
LOCAL ERR_LCD_E   S6D0110A_EnterSleep(
									BOOLEAN is_sleep //SCI_TRUE: exter sleep mode
													 //SCI_FALSE:exit sleep mode.
									)
{
 
	
	return ERR_LCD_NONE;
}

/******************************************************************************/
//  Description:  set the contrast value 
//	Global resource dependence: 
//  Author:         Nick.Zhao
//	Note:
/******************************************************************************/
LOCAL ERR_LCD_E   S6D0110A_SetContrast(
									 uint16  contrast	//contrast value to set
									 )
{
	return ERR_LCD_FUNC_NOT_SUPPORT;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -