亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tft_nt39102_dijing.c

?? ARMSTM32 lcd驅動程序集錦
?? C
?? 第 1 頁 / 共 2 頁
字號:
//     uint16 are write continuously always.) So, some dummy uint16 
//     should be inserted to satisfy this mode.   Please refer to spec.
//  modify:  jim.cui  2005.0728  use  dma to transport data  
/******************************************************************************/

LOCAL ERR_LCD_E NT39102_Dijing_InvalidateRect(
	uint16 left, 	//the left value of the rectangel
	uint16 top, 	//top of the rectangle
	uint16 right, 	//right of the rectangle
	uint16 bottom	//bottom of the rectangle
	)
{
	uint32 i, j;
	uint32 dummy_before, dummy_after;
	uint32 row, column,rect_width;
	uint16 *buf_ptr = (uint16 *)LCD_GetLCDBuffer();
	if(udisk_plugin)
	{
	 	SetAIT701_ByPassMode(1);
	}
	else
	{
		if (LCD_GetRefreshFlag() != TRUE )
		{
		      SCI_TRACE_LOW(" LCD_GetRefreshFlag");
			return ERR_LCD_OPERATE_FAIL ;
		}
	}
	
    //SCI_TRACE_LOW("tft_NT39102_Dijing.c NT39102_Dijing_InvalidateRect line%d: left = %d, top = %d, right = %d, bottom = %d", __LINE__, left, top, right,bottom);
  	left 	= (left >= NT39102_Dijing_WIDTH)    ? NT39102_Dijing_WIDTH-1 : left;
	right 	= (right >= NT39102_Dijing_WIDTH)   ? NT39102_Dijing_WIDTH-1 : right;
	top 	= (top >= NT39102_Dijing_HEIGHT)    ? NT39102_Dijing_HEIGHT-1 : top;
	bottom 	= (bottom >= NT39102_Dijing_HEIGHT) ? NT39102_Dijing_HEIGHT-1 : bottom;

	if ( ( right < left ) || ( bottom < top ) )
	{
		return ERR_LCD_PARAMETER_WRONG;
	}
 
 	 	
	NT39102_Dijing_set_display_window(left, top, right, bottom);
	
	// In High Speed RAM Write Mode. Maybe some dummy data are insterted.
	dummy_before =  (left) % 4;		// Inserted numbers befor every arrow.
	dummy_after =  3 - (right % 4);	// Inserted numbers after every arrow.
	
#ifdef LCD_USE_DMA 		
	//NT39102_Dijing_set_start_address(left, top);
       rect_width = right-left+1;
       
	for (j = top; j <= bottom; j++)
	{	

            dma_request(0, (uint32)(buf_ptr + j * NT39102_Dijing_WIDTH+left), 0x58020000, rect_width, 
                    1, 0);	
	
	}

#else

	row = bottom - top;
	column = right - left;

	for (i = 0; i <= row; i++)
	{	
		for(j = 0; j<dummy_before; j++) // Insert dummy write befor real write.
			NT39102_Dijing_SEND_DATA(0x00);
			
		for (j = 0; j <= column; j++)	// real write 
			NT39102_Dijing_SEND_DATA( *(buf_ptr + (top+i)*NT39102_Dijing_WIDTH + left+j) );
	
		for(j=0; j<dummy_after; j++)	// Insert dummy write after real write.
			NT39102_Dijing_SEND_DATA(0x00);
	}			
#endif
	if(udisk_plugin)
		SetAIT701_ByPassMode(0);
	return ERR_LCD_NONE;
}

/******************************************************************************/
//  Description:  for mp4 display
//	Global resource dependence: 
//  Author:  juan.zhang

/******************************************************************************/
LOCAL ERR_LCD_E NT39102_Dijing_InvalidateRectImage(
	uint16 left, 	//the left value of the rectangel
	uint16 top, 	//top of the rectangle
	uint16 right, 	//right of the rectangle
	uint16 bottom,	//bottom of the rectangle
	uint16 *buf_ptr,
	uint8  is_invert//ignore
	)
{
	uint32 i, j;
	uint32 dummy_before, dummy_after;
	uint32 row, column,rect_width;

  	left 	= (left >= MP4_MAX_WIDTH)    ? MP4_MAX_WIDTH-1 : left;
	right 	= (right >= MP4_MAX_WIDTH)   ? MP4_MAX_WIDTH-1 : right;
	top 	= (top >= MP4_MAX_HEIGHT)    ? MP4_MAX_HEIGHT-1 : top;
	bottom 	= (bottom >= MP4_MAX_HEIGHT) ? MP4_MAX_HEIGHT-1 : bottom;

	left = 0;
	right = 127;
	top = 0;
	bottom = 159;	//175;	

	
	if ( ( right < left ) || ( bottom < top ) )
	{
		return ERR_LCD_PARAMETER_WRONG;
	}
 
 	//SCI_TRACE_LOW("tft_NT39102_Dijing.c NT39102_Dijing_InvalidateRectImage() left=%d,right=%d,top=%d,bottom=%d,is_invert=%d line%d", left,right,top,bottom,is_invert,__LINE__); 	

 	if (is_invert)
	{
		NT39102_Dijing_SEND_COMMAND(0x36);
		NT39102_Dijing_SEND_DATA(0x60);
	}
	else
	{
		NT39102_Dijing_SEND_COMMAND(0x36);
		NT39102_Dijing_SEND_DATA(0x00);
	}


	NT39102_Dijing_set_display_window(top,left , bottom, right);	

	if (is_invert)
	{
		for (j = left; j <= right; j++)
		{		
			for (i = top; i <= bottom; i++)
			{
				NT39102_Dijing_SEND_DATA( *(buf_ptr + j * MP4_MAX_WIDTH+ i) ); 
			}
		}			
	}
	else
	{
		for (j = top; j <= bottom; j++)
		{
			for (i = left; i <= right; i++)
			{
				NT39102_Dijing_SEND_DATA( *(buf_ptr + j * MP4_MAX_WIDTH+ i) );
			}
		}				
	}	

	NT39102_Dijing_SEND_COMMAND(0x36);
	NT39102_Dijing_SEND_DATA(0x00);
	
	return ERR_LCD_NONE;
}
/*@Zhemin.Lin, CR9122, begin*/

static LCD_SPEC_T g_NT39102_Dijing_spec =
{
	0,		//uint8	rgb_sequence; 		/*rgb sequence*/
										/*0: R-G-B, 1: B-G-R*/
	10,		//uint8	min_cycle_read;		/*read cycle:  ns*/
	50,		//uint8	min_cycle_write;	/*write cycle: ns*/
	0,		//uint8	cyclenum_sendaddr;	/*operation cycle to send address*/
										/* 0: once, 1:twice*/
	0,		//uint8	cyclenum_senddata;	/*operation cycle to send data */
										/* 0; once, 1:twice*/
	1,		//uint8	cmd_num_setupwin;	/*command number to settint up widnow space*/
										/*0: 4 commands for setting up window space: x-start, x-end, y-start, y-end*/
										/*1: 2 commands for setting up window space: x-address, y-address*/
										/*2: 1 commanns for setting up window space window address*/
										/*3: no commands for setting up window space*/
	1,		//uint8	method_send_cmdaddr;/*how to send command & address*/
										/*0: sending together, 1:sending separately*/
	1,		//uint8	ads_is_high;		/*status of ADS when sending parameter*/
										/*0: low, 1: high*/
	0,		//uint8	sequence_cmdaddr;	/*the sequence of command & address, if not send command & address together as 16 bits*/
										/*0: write 2 window area on a 16bit bus, Hitachi*/
										/*1, write 1 sindow area with one command, Casio*/
										/*2, write 1 command and 2 parameters separately, Samsung*/
										/*3, reserved*/
										/*4, write 1 command, 2 parameters for page, 4 parameters for column, Epson*/
										/*5, write 1 command, 4 parameters for page, 2 parameters for column*/
										/*6, write 1 command, write 4 parameters for each page/column*/
	4,		//uint8	cyclenum_setupwin;	/*operation cycle to set up window*/
	1,		//uint8	method_gram_access;	/*select method to begin actul data read/write address for selected window area in GRAM*/
										/*0: without any assigning x/y address, use initial start address of window*/
										/*1: assign 1 x/y set command and parameter onto 16bit bus at onece*/
										/*2: use separate for X and Y, with upper byte consists of command and lower byte for parameter*/
										/*3, 1 command for selecting X/Y adn 2 parameters, us command and parameter separately*/
										/*4, set different command for x and y, and command and parameter differs*/
	1,		//uint8	sequence_gram_access;/*read/write command and sequence for GRAM*/
										/*0: perform read/write without seperate read/write command but by strobe 'high' ADS(RS)pin, samsung*/
										/*1: data cycle comes right afer read/write command, Toshiba/Matsushita/Hitachi/NEC*/
										/*2: after read/write command follows start address parameter for X and Y and follows data cycle, Casio*/
										/*3: similiar to 2 but sends X and Y parameters together on 16 bit BUS*/
	0,		//uint8	order_xy;			/*order of x and y address, I think, this field is active when sequence_gram_access = 2*/
										/*0: X first*/
										/*1: Y first*/
	1,		//uint8	is_dummy_read;		/*deciding first read data when reading GRAM*/
										/*0: acknowledge first data as valid data*/
										/*1: acknowledge first data as dummy data*/
	3,		//uint8	cyclenum_read;		/*total cycle numbers needed to access GRAM read/write*/
	0x44,	//uint8	win_setstartx_cmd;	/*window x start address set command*/
	0x00,	//uint8	win_setendx_cmd;	/*window x end address set command*/
	0x45,	//uint8	win_setstarty_cmd;	/*window y start address set command*/
	0x00,	//uint8	win_setendy_cmd;	/*window y end address set command*/
	0x21,	//uint8	gram_setx_cmd;		/*gram x address set command*/
	0x00,	//uint8	gram_sety_cmd;		/*gram y address set command*/
	0x22,	//uint8	gram_read_cmd;		/*gram read command*/
	0x22,	//uint8	gram_write_cmd;		/*gram write command*/
	//@zhemin.lin, add 1 line, CR9590
	0x00,	//uint8	line_offset;		/*line offset for display on lcd*/
	0x00	//uint8 colum_offset        /*columoffset for display on lcd*/
};


/******************************************************************************/
//  Description:    get the important parameter for digital camera
//	Global resource dependence: 
//  Author:         Zhemin.lin
//	Note:           
/******************************************************************************/
LOCAL ERR_LCD_E  NT39102_Dijing_GetMainLcdSpec(
	LCD_SPEC_T *spec_ptr 	//spec struct pointer
	)
{
	if (spec_ptr == PNULL)
	{
		return 1;
	}
	
	memcpy(spec_ptr, &g_NT39102_Dijing_spec, sizeof(LCD_SPEC_T));
	
	return ERR_LCD_NONE;
}
/******************************************************************************/
//  Description:   Enter/Exit sleep mode .
//	Global resource dependence: 
//  Author:         Jim.zhang
//	Note:
/******************************************************************************/
LOCAL ERR_LCD_E  NT39102_Dijing_EnterSleep(
	BOOLEAN is_sleep 	//SCI_TRUE: exter sleep mode;SCI_FALSE:exit sleep mode.
	)
{

	if ( is_sleep ) // enter sleep mode.
	{
	
		NT39102_Dijing_GoSleep(); 
	}
	else 			// out sleep mode 
	{
		//NT39102_Dijing_reset();
		NT39102_Dijing_ExitSleep();
		Delayms(100);
	}

	/*
	if( !GetUdiskState())
	DC_EnterSleep(is_sleep);
	*/
	return ERR_LCD_NONE;
	}


/*****************************************************************************/
//  Description:    Enable lcd to partial display mode, so can save power.
//	Global resource dependence: 
//  Author:         Jim.zhang
//  Return:         SCI_TRUE:SUCCESS ,SCI_FALSE:failed.
//	Note:           If all input parameters are 0, exit partial display mode.
/*****************************************************************************/
LOCAL ERR_LCD_E NT39102_Dijing_SetDisplayWindow(
	uint16 left, 		//left of the window
	uint16 top,			//top of the window
	uint16 right,		//right of the window
	uint16 bottom		//bottom of the window
	)
{
	NT39102_Dijing_set_display_window(left, top, right, bottom);

	return ERR_LCD_NONE;
}

/*********************************************************************/
//  Description:   Initialize color LCD : NT39102_Dijing
//  Input:
//      None.
//  Author:         yinchun.li
//  Return:
//      None.
//	Note:
//  modify:  jim.cui  2005.0728 add dma init  
/*********************************************************************/
LOCAL ERR_LCD_E NT39102_Dijing_Init(void)
{
	
	//dma init
	dma_init ();
	
	//NT39102_Dijing_HW_reset();
	NT39102_Dijing_reset();
	
	NT39102_Dijing_Clear( 0xf25f );
	
	return ERR_LCD_NONE;
}


/******************************************************************************/
//  Description:  set the contrast value 
//	Global resource dependence: 
//  Author:         Jim.zhang
//	Note:
/******************************************************************************/
LOCAL ERR_LCD_E   NT39102_Dijing_SetContrast(
	uint16  contrast	//contrast value to set
	)
{
	return ERR_LCD_FUNC_NOT_SUPPORT;
} 


/*****************************************************************************/
//  Description:    Set the brightness of LCD.
//	Global resource dependence: 
//  Author:         Jim.zhang
//	Note:
/*****************************************************************************/
LOCAL ERR_LCD_E   NT39102_Dijing_SetBrightness(
	uint16 brightness	//birghtness to set
	)
{
	return ERR_LCD_FUNC_NOT_SUPPORT;
}

/******************************************************************************/
//  Description:   Close the lcd.(include sub lcd.)
//	Global resource dependence: 
//  Author:         Jim.zhang
//	Note:
/******************************************************************************/
LOCAL void NT39102_Dijing_Close()
{
    GPIO_SetLcdBackLight( SCI_FALSE );
    NT39102_Dijing_EnterSleep( SCI_TRUE );	
}


LOCAL LCD_OPERATIONS_T NT39102_Dijing_operations = 
{
	NT39102_Dijing_Init,
	NT39102_Dijing_EnterSleep,
	NT39102_Dijing_SetContrast,
	NT39102_Dijing_SetBrightness,
	NT39102_Dijing_SetDisplayWindow,
	NT39102_Dijing_GetInfo,
	NT39102_Dijing_InvalidateRect,
	NT39102_Dijing_InvalidateRectImage,
	NT39102_Dijing_Invalidate,
	NT39102_Dijing_Clear,
	NT39102_Dijing_Close,
	NT39102_Dijing_GetMainLcdSpec
};

/******************************************************************************/
//  Description:  return the NT39102_Dijing lcd driver funtion pointer
//	Global resource dependence: 
//  Author:         Jim.zhang
//	Note:
/******************************************************************************/
PUBLIC LCD_OPERATIONS_T* NT39102_Dijing_GetOperations()
{
	return &NT39102_Dijing_operations;
}

PUBLIC BOOLEAN NT39102_Dijing_Probe(void)
{
	return SCI_TRUE;
}


LOCAL NT39102_Dijing_GoSleep(void)
{
	NT39102_Dijing_SEND_COMMAND(0x28); // display off 
	NT39102_Dijing_SEND_COMMAND(0x10); // into sleep
}

LOCAL NT39102_Dijing_ExitSleep(void)
{
	NT39102_Dijing_SEND_COMMAND(0x11); // out sleep
	Delayms(150);
	NT39102_Dijing_SEND_COMMAND(0x29); // display on
    Delayms(20);

}
#if 0
LOCAL void main_lcd_fill_rect(uint16 left, uint16 top,uint16 right,  uint16 bottom,uint16 color)
{
	uint16 i,j;
	uint16 *buf_ptr = (uint16 *)LCD_GetLCDBuffer();
	for(i = top; i < bottom;i++)
  {
    for(j = left; j < right; j++)
    {                 
    	*(buf_ptr+i*NT39102_Dijing_WIDTH+j)=color;
    }
  }

}
 void TestMainLcd(void)
{
	main_lcd_fill_rect(0,NT39102_Dijing_WIDTH-1, 0, NT39102_Dijing_HEIGHT-1, 0x0780);	
	while(1)
	{
		NT39102_Dijing_Invalidate();			
	}
}
#endif

/**---------------------------------------------------------------------------*
 **                         Compiler Flag                                     *
 **---------------------------------------------------------------------------*/
#ifdef   __cplusplus
    }
#endif 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱人伦偷精品视频不卡 | 日韩欧美高清dvd碟片| 一区二区理论电影在线观看| 99精品久久只有精品| 亚洲人吸女人奶水| 欧美亚洲图片小说| 奇米色一区二区| 久久久不卡影院| www.色综合.com| 午夜av一区二区三区| 日韩欧美国产三级| 床上的激情91.| 亚洲六月丁香色婷婷综合久久| 欧美丝袜第三区| 精品一区二区三区在线视频| 国产日韩综合av| 在线免费av一区| 狠狠色综合播放一区二区| 国产精品理论片| 7777精品伊人久久久大香线蕉的| 黄页视频在线91| 亚洲男同性视频| 日韩美女在线视频| fc2成人免费人成在线观看播放| 一二三四社区欧美黄| 精品国产一区二区三区久久久蜜月 | 欧美成人欧美edvon| 粉嫩久久99精品久久久久久夜| 亚洲激情网站免费观看| 日韩视频一区二区三区在线播放| 国产91精品露脸国语对白| 亚洲成av人片在线观看无码| 精品不卡在线视频| 色丁香久综合在线久综合在线观看| 美女视频黄 久久| 亚洲欧美日本韩国| 精品国产露脸精彩对白| 在线观看免费一区| 懂色av中文字幕一区二区三区| 亚洲成人1区2区| 综合激情成人伊人| 2024国产精品视频| 欧美日精品一区视频| 国产成人免费视频网站| 秋霞影院一区二区| 一区二区三区不卡在线观看| 亚洲欧美日韩成人高清在线一区| 欧美美女一区二区在线观看| 成人免费视频网站在线观看| 日韩黄色小视频| 一区二区三区四区国产精品| 久久综合国产精品| 7777精品伊人久久久大香线蕉超级流畅 | 精品国产91久久久久久久妲己| 欧美曰成人黄网| 99天天综合性| 国产suv精品一区二区三区| 免费在线观看视频一区| 亚洲国产欧美日韩另类综合| 中文字幕一区二区三区蜜月| 久久久久久9999| 精品国产a毛片| 精品国偷自产国产一区| 欧美一区二区黄色| 欧美日本在线播放| 欧美日韩免费观看一区二区三区| av影院午夜一区| 97超碰欧美中文字幕| 成人一道本在线| 成熟亚洲日本毛茸茸凸凹| 国产在线精品一区二区三区不卡 | 国产精品亚洲专一区二区三区 | 精品91自产拍在线观看一区| 欧美久久久久久蜜桃| 欧美理论片在线| 91精品国产色综合久久久蜜香臀| 欧美午夜一区二区三区| 欧美亚一区二区| 欧美日韩日本视频| 欧美日韩三级一区二区| 欧美日韩视频一区二区| 91精品国产综合久久国产大片| 91精品福利在线一区二区三区| 中文字幕一区二区三区在线观看| 精品99久久久久久| 国产欧美日韩一区二区三区在线观看| 久久只精品国产| 日本一区二区久久| 国产精品对白交换视频| 亚洲最新在线观看| 日韩不卡在线观看日韩不卡视频| 免费成人在线视频观看| 精品一区二区三区av| 国产激情精品久久久第一区二区 | 蜜臀av性久久久久蜜臀aⅴ流畅 | 国产亚洲欧美一区在线观看| 久久九九久精品国产免费直播| 国产目拍亚洲精品99久久精品| 国产欧美日韩麻豆91| 亚洲欧美另类久久久精品 | 欧美浪妇xxxx高跟鞋交| 日韩区在线观看| 久久蜜桃av一区精品变态类天堂 | 欧美午夜精品久久久久久超碰| 欧美亚洲一区二区在线观看| 在线不卡的av| 国产日韩精品一区| 亚洲国产wwwccc36天堂| 久草中文综合在线| av在线这里只有精品| 在线成人午夜影院| 中文字幕高清一区| 亚洲一区二区三区国产| 捆绑紧缚一区二区三区视频| 国产91色综合久久免费分享| 色综合久久中文综合久久牛| 在线播放日韩导航| 国产精品久久久久aaaa| 亚洲精品成人少妇| 国内精品久久久久影院薰衣草| 日本精品视频一区二区| 精品奇米国产一区二区三区| 国产精品传媒入口麻豆| 日本不卡一区二区三区高清视频| 不卡视频一二三四| 精品日韩99亚洲| 亚洲成av人片在www色猫咪| 国产激情精品久久久第一区二区 | 午夜视频一区二区三区| 国产精品91一区二区| 欧美日韩免费观看一区二区三区| 中文字幕精品一区二区三区精品| 亚洲mv在线观看| 99亚偷拍自图区亚洲| 精品欧美一区二区在线观看| 亚洲综合免费观看高清完整版| 国产福利视频一区二区三区| 制服丝袜日韩国产| 亚洲女同ⅹxx女同tv| 成人一区二区三区视频 | 国产区在线观看成人精品| 日韩中文欧美在线| 色婷婷av久久久久久久| 久久久噜噜噜久久中文字幕色伊伊| 一区二区三区欧美日| 丰满亚洲少妇av| 久久先锋资源网| 久久精品国产99| 91精品国产麻豆| 亚洲已满18点击进入久久| 成人动漫一区二区| 欧美激情在线看| 成人三级在线视频| 国产亚洲欧美一级| 高清久久久久久| 欧美国产日韩一二三区| 粉嫩aⅴ一区二区三区四区 | 国产精品美女久久福利网站| 麻豆视频一区二区| 日韩欧美国产系列| 精品一区二区三区蜜桃| 亚洲精品一区二区三区蜜桃下载| 蜜桃久久精品一区二区| 777午夜精品免费视频| 亚洲18女电影在线观看| 欧美亚洲一区三区| 五月天婷婷综合| 欧美一区二区在线看| 日韩不卡一二三区| 日韩美女视频一区二区在线观看| 日本不卡中文字幕| 日韩精品在线网站| 国产精品99久| 国产精品高清亚洲| 在线观看视频一区| 日韩综合小视频| 日韩久久免费av| 国产jizzjizz一区二区| 中文字幕一区二区三区蜜月| 色老汉av一区二区三区| 午夜电影久久久| 精品少妇一区二区三区| 国产不卡在线视频| 亚洲精品中文在线影院| 欧美日韩国产精品成人| 日本一区中文字幕| 久久久国产午夜精品| 成人福利电影精品一区二区在线观看| 1024成人网| 欧美另类高清zo欧美| 国产在线视频一区二区| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 成人av手机在线观看| 亚洲欧美另类综合偷拍| 欧美疯狂做受xxxx富婆| 国产一区欧美日韩| 亚洲乱码国产乱码精品精小说| 欧美日韩精品电影| 国产成人在线视频网站| 亚洲在线视频免费观看|