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

📄 drv_lcd.c

📁 ROHM 公司BU9432:application:应用范围
💻 C
📖 第 1 页 / 共 5 页
字号:
//{
//return;
//}
//else
	if(gu08_kind_tuner!=3)
	{
#if LCD_DM	//[dyna-DM]
	CPU_LCD_SDR2 |= B00010000;
#else
#if	LINE4
	gu08_FORCEdisp[0] = LINE_FORCE;
														//"0123456789AB"
	DrvLCD_DisplayData(( LINE_1 | LINE_FORCE ), DIGIT_00, "  VOLUME " );
#else
// !!make 2.5line!!
#endif	// end of LINE4
#endif	// end of LCD_DM
	}
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_Volume_Off											  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:void														  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_Volume_Off( void )
{
if(gu08_kind_tuner!=3)
{

#if LCD_DM	//[dyna-DM]
	CPU_LCD_SDR2 &= B11101111;
#else
#if	LINE4
//	DrvLCD_ClearLine( LINE_1 );
	if(( gu08_sts_User >= STS_USER_PLAY_ESP ) && gu08_mode_ESP )
	{	/*	"ASP"暅婣	*/
		DrvLCD_ESP_On();
	}
#else
// !!make 2.5line!!
#endif	// end of LINE4
#endif	// end of LCD_DM
}
	return;
}

//Sxxx
//	"BassBooSt" ICON
/*----------------------------------------------------------------------------*/
/*	[NAME]     :                            								  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :      														  */
/*	[PARAMETER]:    														  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
/* B0004 --->
void DrvLCD_BassBoost_On( void )
{
#if LCD_DM	//[dyna-DM]
	CPU_LCD_SDR0 |= B00010000;
	CPU_LCD_SDR1 |= B00001000;
#else
#endif	// end of LCD_DM
	return;
}
B00004 <---
*/
/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_BassBoost_Off										  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:void														  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
/* B0004 --->
void DrvLCD_BassBoost_Off( void )
{
#if LCD_DM	//[dyna-DM]
	CPU_LCD_SDR0 &= B11101111;
	CPU_LCD_SDR1 &= B11110111;
#else
#endif	// end of LCD_DM
	return;
}
B00004 <---
*/

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_ProgramNumber_On										  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 num													  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_ProgramNumber_On(UINT08 num)	//[dyna04-12]ProgramPlay懳墳
{
#if LCD_DM	//[dyna-DM]
	UINT08 bcd_num;
	
	bcd_num = Common_Hex2BCD(num);
	
	CPU_LCD_SDR4 &= B00010000;
	CPU_LCD_SDR4 |= Tbl_DISP_NUM[(bcd_num & 0xF0) >> 4];
	CPU_LCD_SDR5 = Tbl_DISP_NUM[bcd_num & 0x0F];
//	CPU_LCD_SDR5 |= B00010000;
#else
//	UINT08 program_num[3];

#if	ROM	// SDC 050212
	DrvLCD_Num2Str( (UINT16)num, cWork, 2, ON );
#else
	DrvLCD_Num2Str2( num, cWork );
#endif
#if	LINE4
	DrvLCD_DisplayData(LINE_4, DIGIT_08, "P-");
	DrvLCD_DisplayData(LINE_4, DIGIT_10, cWork);
#else
// !!make 2.5line!!
#endif	// end of LINE4
#endif	// end of LCD_DM
	return;
}


//AC803 --->
void DrvLCD_PlayIcon_On( void )
{
	CPU_LCD_SIOSR1 |= B00001000;
	return;
}

void DrvLCD_PlayIcon_Off( void )
{
	CPU_LCD_SIOSR1 &= B11110111;
	return;
}
//AC803<---


#if !LCD_DM	//[dyna-DM]
/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_ClearDisplay											  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:void														  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :wait 1ms埲忋												  */
/*----------------------------------------------------------------------------*/
void DrvLCD_ClearDisplay(void)
{
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, 0x01);
#else
	CPU_LCD_SIOSR0 = B00000000; /*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = 0x01;	/*	DB7-0	*/

	DrvLCD_SendSignal_Write(MODE_INST);
#endif	// end of LINE4
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_ReturnHome											  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:void														  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :wait 1ms埲忋												  */
/*----------------------------------------------------------------------------*/
void DrvLCD_ReturnHome(void)
{
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, 0x02);
#else
	CPU_LCD_SIOSR0 = B00000000;	/*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = 0x02;	/*	DB7-0	*/

	DrvLCD_SendSignal_Write(MODE_INST);
#endif
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_EntryModeSet											  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 sts													  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :bit1:I/D bit0:S												  */
/*	           :sts = MODE_INC/MODE_DEC | SHIFT_ON/SHIFT_OFF				  */
/*----------------------------------------------------------------------------*/
void DrvLCD_EntryModeSet(UINT08 sts)
{
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, (0x04 | sts));
#else
	CPU_LCD_SIOSR0 = B00000000;	/*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = 0x04 | sts;	/*	DB7-0	*/

	DrvLCD_SendSignal_Write(MODE_INST);
#endif
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_DisplayCtrl											  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 disp_sts												  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_DisplayCtrl(UINT08 disp_sts)
{
	UINT08 send_data;
	
	if(disp_sts == ON){
#if 1
		send_data = (0x08 | BIT_DISPLAY) & ~(BIT_CURSOR | BIT_BLINK);
#else
		send_data = (0x08 | BIT_DISPLAY | BIT_BLINK) & ~(BIT_CURSOR);	//for test
#endif
	}
	else{	/*	OFF	*/
		send_data = 0x08 & ~(BIT_DISPLAY | BIT_CURSOR | BIT_BLINK);
	}
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, send_data);
#else
	CPU_LCD_SIOSR0 = B00000000;	/*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = send_data;	/*	DB7-0	*/

	DrvLCD_SendSignal_Write(MODE_INST);
#endif
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_ExtFunctionSet										  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:void														  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :4LINE 偐偮 bitRE == 1偺偲偒巊梡壜							  */
/*----------------------------------------------------------------------------*/
void DrvLCD_ExtFunctionSet(void)
{
	DrvLCD_Serial_Write(MODE_INST, 0x09);	/*	5dot,,4line	*/

	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_CursorShift											  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 direction											  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_CursorShift(UINT08 direction)
{
	UINT08 send_data;
	
	if(direction == RIGHT){
		send_data = 0x14;
	}
	else{	/*	LEFT	*/
		send_data = 0x10;
	}
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, send_data);
#else
	CPU_LCD_SIOSR0 = B00000000;	/*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = send_data;	/*	DB7-0	*/

	DrvLCD_SendSignal_Write(MODE_INST);
#endif
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_DisplayShift											  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 direction											  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_DisplayShift(UINT08 direction)
{
	UINT08 send_data;
	
	if(direction == RIGHT){
		send_data = 0x1C;
	}
	else{	/*	LEFT	*/
		send_data = 0x18;
	}
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, send_data);
#else
	CPU_LCD_SIOSR0 = B00000000;	/*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = send_data;	/*	DB7-0	*/

	DrvLCD_SendSignal_Write(MODE_INST);
#endif
	return;
}

#if	!LINE4
/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_FunctionSet_2L										  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:void														  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_FunctionSet_2L(void)
{
	CPU_LCD_SIOSR0 = B00000000;	/*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = (0x30 | BIT_LINE_MODE) & ~BIT_DOTS_MODE;	/*	DB7-0	*/
	
	DrvLCD_SendSignal_Write(MODE_INST);
	
	return;
}
#endif

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_FunctionSet_4L										  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 re_flg												  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_FunctionSet_4L(UINT08 re_flg)
{
	if(re_flg == RE_ON){
//		DrvLCD_Serial_Write(MODE_INST, 0x3E);
		DrvLCD_Serial_Write(MODE_INST, 0x34);
	}
	else{	/*	RE_OFF	*/
//		DrvLCD_Serial_Write(MODE_INST, 0x3A);
		DrvLCD_Serial_Write(MODE_INST, 0x30);
	}
	
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_SetCGRAMAddress										  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 addr													  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_SetCGRAMAddress(UINT08 addr)
{
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, (0x40 | addr));
#else
	CPU_LCD_SIOSR0 = B00000000;	/*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = 0x40 | addr;	/*	DB7-0	*/

	DrvLCD_SendSignal_Write(MODE_INST);
#endif
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_SetDDRAMAddress										  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 addr													  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :															  */
/*----------------------------------------------------------------------------*/
void DrvLCD_SetDDRAMAddress(UINT08 addr)
{
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, (0x80 | addr));
#else
	CPU_LCD_SIOSR0 = B00000000;	/*	SEG07-00 output	*/
	CPU_LCD_SIODR0 = 0x80 | addr;	/*	DB7-0	*/

	DrvLCD_SendSignal_Write(MODE_INST);
#endif
	return;
}

/*----------------------------------------------------------------------------*/
/*	[NAME]     :DrvLCD_SetScrollQuantity									  */
/*	[FUNCTION] :															  */
/*	[RETURN]   :void  														  */
/*	[PARAMETER]:UINT08 scroll_dot											  */
/*	[HISTORY]  :															  */
/*	[NOTE]     :4LINE 偐偮 bitRE == 1偺偲偒巊梡壜							  */
/*----------------------------------------------------------------------------*/
void DrvLCD_SetScrollQuantity(UINT08 scroll_dot)
{
#if	LINE4
	DrvLCD_Serial_Write(MODE_INST, (0x80 | scroll_dot));
#else
	CPU_LC

⌨️ 快捷键说明

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