当前位置: 首页>>代码示例>>C++>>正文


C++ DE_WRN函数代码示例

本文整理汇总了C++中DE_WRN函数的典型用法代码示例。如果您正苦于以下问题:C++ DE_WRN函数的具体用法?C++ DE_WRN怎么用?C++ DE_WRN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DE_WRN函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: disp_lcd_set_bright

s32 disp_lcd_set_bright(struct disp_lcd *lcd, u32 bright)
{
	u32 duty_ns;
	__u64 backlight_bright = bright;
	__u64 backlight_dimming;
	__u64 period_ns;
	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
	bool need_enable_bl = false, need_disable_bl = false;

	if((NULL == lcd) || (NULL == lcdp)) {
		DE_WRN("NULL hdl!\n");
		return DIS_FAIL;
	}

	if((0 == lcdp->lcd_cfg.backlight_bright) && (0 != bright))
		need_enable_bl = true;
	if((0 != lcdp->lcd_cfg.backlight_bright) && (0 == bright))
		need_disable_bl = true;

	backlight_bright = (backlight_bright > 255)? 255:backlight_bright;
	if(lcdp->lcd_cfg.backlight_bright != backlight_bright) {
		lcdp->lcd_cfg.backlight_bright = backlight_bright;
		disp_notifier_call_chain(DISP_EVENT_BACKLIGHT_UPDATE, lcd->channel_id, (void*)bright);
	}

	if(backlight_bright != 0)	{
		backlight_bright += 1;
	}

	lcdp->lcd_cfg.backlight_dimming = (0 == lcdp->lcd_cfg.backlight_dimming)? 256:lcdp->lcd_cfg.backlight_dimming;
	backlight_dimming = lcdp->lcd_cfg.backlight_dimming;
	period_ns = lcdp->pwm_info.period_ns;
	duty_ns = (backlight_bright * backlight_dimming *  period_ns/256 + 128) / 256;
	lcdp->pwm_info.duty_ns = duty_ns;

//		DE_DBG("[PWM]bright=%d, bright_modify=%d, backlight_dimming=%d, period_ns=%d, duty_ns=%d\n",
//		bright,(u32)backlight_bright, lcdp->lcd_cfg.backlight_dimming,  (u32)period_ns, (u32)duty_ns);
	sunxi_pwm_config(lcdp->pwm_info.channel, duty_ns, period_ns);

	if(need_enable_bl)
		disp_lcd_backlight_enable(lcd);
	if(need_disable_bl)
		disp_lcd_backlight_enable(lcd);

	return DIS_SUCCESS;
}
开发者ID:tempbottle,项目名称:InDashNet.Open.UN2000,代码行数:46,代码来源:disp_lcd.c

示例2: disp_lcd_get_driver_name

s32 disp_lcd_get_driver_name(struct disp_lcd *lcd, char* name)
{
	char primary_key[20];
	s32 ret;
	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);

	if((NULL == lcd) || (NULL == lcdp)) {
		DE_WRN("NULL hdl!\n");
		return DIS_FAIL;
	}

	sprintf(primary_key, "lcd%d_para", lcd->channel_id);

	ret = OSAL_Script_FetchParser_Data(primary_key, "lcd_driver_name",  (int*)name, 32);
	DE_INF("disp_lcd_get_driver_name, %s\n", name);
	return ret;
}
开发者ID:tempbottle,项目名称:InDashNet.Open.UN2000,代码行数:17,代码来源:disp_lcd.c

示例3: BSP_disp_tv_get_interface

__s32 BSP_disp_tv_get_interface(__u32 sel)
{
    __u8 dac[4];
    __s32 i = 0;
	__u32  ret = DISP_TV_NONE;

    if(!(gdisp.screen[sel].status & TV_ON))
    {
        tve_clk_on();
    }

    for(i=0; i<4; i++)
    {
        dac[i] = TVE_get_dac_status(i);
    }

    if(dac[0]>1 || dac[1]>1 || dac[2]>1 || dac[3]>1)
    {
        DE_WRN("shor to ground\n");
    }
    else
    {
        for(i=0; i<4; i++)
        {
            if(gdisp.screen[sel].dac_source[i] == DISP_TV_DAC_SRC_COMPOSITE && dac[i] == 1)
            {
                ret |= DISP_TV_CVBS;
            }
            else if(gdisp.screen[sel].dac_source[i] == DISP_TV_DAC_SRC_Y && dac[i] == 1)
            {
                ret |= DISP_TV_YPBPR;
            }
            else if(gdisp.screen[sel].dac_source[i] == DISP_TV_DAC_SRC_LUMA && dac[i] == 1)
            {
                ret |= DISP_TV_SVIDEO;
            }
        }
    }

    if(!(gdisp.screen[sel].status & TV_ON))
    {
        tve_clk_off();
    }

    return  ret;
}
开发者ID:godark,项目名称:A10-Linux-2.6.36,代码行数:46,代码来源:disp_tv.c

示例4: disp_lcd_set_panel_funs

s32 disp_lcd_set_panel_funs(struct disp_lcd* lcd, disp_lcd_panel_fun * lcd_cfg)
{
	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);

	if((NULL == lcd) || (NULL == lcdp)) {
		DE_WRN("NULL hdl!\n");
		return DIS_FAIL;
	}

	memset(&lcdp->lcd_panel_fun, 0, sizeof(disp_lcd_panel_fun));
	lcdp->lcd_panel_fun.cfg_panel_info= lcd_cfg->cfg_panel_info;
	lcdp->lcd_panel_fun.cfg_open_flow = lcd_cfg->cfg_open_flow;
	lcdp->lcd_panel_fun.cfg_close_flow = lcd_cfg->cfg_close_flow;
	lcdp->lcd_panel_fun.lcd_user_defined_func = lcd_cfg->lcd_user_defined_func;

	return 0;
}
开发者ID:tempbottle,项目名称:InDashNet.Open.UN2000,代码行数:17,代码来源:disp_lcd.c

示例5: disp_hdmi_get_vendor_id

s32 disp_hdmi_get_vendor_id(struct disp_hdmi* hdmi, __u8 *id)
{
	struct disp_hdmi_private_data *hdmip = disp_hdmi_get_priv(hdmi);

	__inf("disp_hdmi_get_vendor_id\n");

	if((NULL == hdmi) || (NULL == hdmip)){
		DE_WRN("hdmi set func null hdl!\n");
		return DIS_FAIL;
	}
	if(hdmip->hdmi_func.hdmi_get_vendor_id == NULL){
		__inf("hdmi_get_vendor_id NULL");
		return -1;
	}

	return hdmip->hdmi_func.hdmi_get_vendor_id(id);
}
开发者ID:GREYFOXRGR,项目名称:BPI-M3-bsp,代码行数:17,代码来源:disp_hdmi.c

示例6: bsp_disp_lcd_post_enable

s32 bsp_disp_lcd_post_enable(u32 screen_id)
{
	struct disp_lcd* lcd;
	int ret = 0;

	lcd = disp_get_lcd(screen_id);
	if(!lcd) {
		DE_WRN("get lcd%d fail\n", screen_id);
	}

	if(lcd->post_enable)
		ret = lcd->post_enable(lcd);
#if defined(__LINUX_PLAT__)
	Display_set_fb_timming(screen_id);
#endif
	return ret;
}
开发者ID:weety,项目名称:CC-A80-kernel-source,代码行数:17,代码来源:disp_display.c

示例7: hdmi_clk_enable

s32 hdmi_clk_enable(struct disp_hdmi *hdmi)
{
	struct disp_hdmi_private_data *hdmip = disp_hdmi_get_priv(hdmi);
	if(!hdmi || !hdmip) {
	    DE_WRN("hdmi clk init null hdl!\n");
	    return DIS_FAIL;
	}

	hdmi_clk_config(hdmi);

	if(hdmip->drc_clk.clk)
		disp_al_hdmi_clk_enable(hdmip->drc_clk.clk);

	disp_al_hdmi_enable(hdmi->channel_id);

	return 0;
}
开发者ID:alex-deng,项目名称:a33_linux,代码行数:17,代码来源:disp_hdmi.c

示例8: bsp_disp_get_timming

s32 bsp_disp_get_timming(u32 screen_id, disp_video_timing * tt)
{
	memset(tt, 0, sizeof(disp_video_timing));
	if(DISP_OUTPUT_TYPE_LCD == bsp_disp_get_output_type(screen_id)) {
		struct disp_lcd *lcd;

		lcd = disp_get_lcd(screen_id);
		if(!lcd) {
			DE_WRN("get lcd%d failed\n", screen_id);
			return DIS_FAIL;
		}
		if(lcd->get_timing)
			return lcd->get_timing(lcd, tt);
	}
#if 0
	struct disp_hdmi* hdmi;
	else if(DISP_OUTPUT_TYPE_HDMI == bsp_disp_get_output_type(screen_id)) {
开发者ID:Gucan,项目名称:h3_lichee,代码行数:17,代码来源:disp_display.c

示例9: disp_lcd_set_close_func

s32 disp_lcd_set_close_func(struct disp_lcd* lcd, LCD_FUNC func, u32 delay)
{
	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);

	if((NULL == lcd) || (NULL == lcdp)) {
		DE_WRN("NULL hdl!\n");
		return -1;
	}

	if(func) {
		lcdp->close_flow.func[lcdp->close_flow.func_num].func = func;
		lcdp->close_flow.func[lcdp->close_flow.func_num].delay = delay;
		lcdp->close_flow.func_num ++;
	}

	return DIS_SUCCESS;
}
开发者ID:tempbottle,项目名称:InDashNet.Open.UN2000,代码行数:17,代码来源:disp_lcd.c

示例10: BSP_disp_hdmi_open

__s32 BSP_disp_hdmi_open(__u32 sel)
{
    if(!(gdisp.screen[sel].status & HDMI_ON))
    {
    	__disp_tv_mode_t     tv_mod;
        
    	tv_mod = gdisp.screen[sel].hdmi_mode;

        hdmi_clk_on();
    	lcdc_clk_on(sel);
    	image_clk_on(sel);
		Image_open(sel);//set image normal channel start bit , because every de_clk_off( )will reset this bit
    	disp_clk_cfg(sel,DISP_OUTPUT_TYPE_HDMI, tv_mod);

        BSP_disp_set_output_csc(sel, DISP_OUTPUT_TYPE_HDMI);
    	DE_BE_set_display_size(sel, tv_mode_to_width(tv_mod), tv_mode_to_height(tv_mod));
    	DE_BE_Output_Select(sel, sel);

    	TCON1_set_hdmi_mode(sel,tv_mod);		 	 
    	TCON1_open(sel);
    	if(gdisp.init_para.Hdmi_open)
    	{
    	    gdisp.init_para.Hdmi_open();
    	}
    	else
    	{
    	    DE_WRN("Hdmi_open is NULL\n");
    	    return -1;
    	}
    	
    	Disp_Switch_Dram_Mode(DISP_OUTPUT_TYPE_HDMI, tv_mod);

    	gdisp.screen[sel].b_out_interlace = Disp_get_screen_scan_mode(tv_mod);
    	gdisp.screen[sel].status |= HDMI_ON;
        gdisp.screen[sel].lcdc_status |= LCDC_TCON1_USED;
        gdisp.screen[sel].output_type = DISP_OUTPUT_TYPE_HDMI;

        Disp_set_out_interlace(sel);
#ifdef __LINUX_OSAL__
        Display_set_fb_timming(sel);
#endif
    }
    
    return DIS_SUCCESS;
}
开发者ID:Bruce-Zou,项目名称:dragonboard_bananapro_test,代码行数:45,代码来源:disp_hdmi.c

示例11: disp_sync_all

s32 disp_sync_all(u32 screen_id)
{
	struct disp_manager *mgr;
	struct disp_smcl *smcl;
	struct disp_smbl *smbl;
#if defined(CONFIG_ARCH_SUN9IW1P1)
	struct disp_cursor *cursor;
#endif

	mgr = disp_get_layer_manager(screen_id);
	if(!mgr) {
		DE_WRN("get mgr%d fail\n", screen_id);
	}

	if(mgr->sync)
		mgr->sync(mgr);

	smcl = disp_get_smcl(screen_id);
	if(!smcl) {
		//DE_WRN("get smcl %d fail\n", screen_id);
	} else {
		if(smcl->sync)
			smcl->sync(smcl);
		}

	smbl = disp_get_smbl(screen_id);
	if(!smbl) {
		//DE_WRN("get smbl%d fail\n", screen_id);
	} else {
		if(smbl->sync)
			smbl->sync(smbl);
		}

#if defined(CONFIG_ARCH_SUN9IW1P1)
	cursor = disp_get_cursor(screen_id);
	if(!cursor) {
		//DE_WRN("get cursor%d fail\n", screen_id);
	} else {
		if(cursor->sync)
			cursor->sync(cursor);
		}

#endif
	return 0;
}
开发者ID:Gucan,项目名称:h3_lichee,代码行数:45,代码来源:disp_display.c

示例12: lcd_clk_config

static s32 lcd_clk_config(struct disp_lcd* lcd)
{
	u32 lcd_dclk_freq;	//Hz
	u32 pll_freq = 0;
	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);

	if((NULL == lcd) || (NULL == lcdp)) {
		DE_WRN("NULL hdl!\n");
		return -1;
	}

	lcd_dclk_freq = lcdp->panel_info.lcd_dclk_freq * 1000000;
	if ((lcdp->panel_info.lcd_if == LCD_IF_HV) || (lcdp->panel_info.lcd_if == LCD_IF_CPU)
	    || (lcdp->panel_info.lcd_if == LCD_IF_EDP))	{
		lcdp->lcd_clk.clk_div = 6;//todo?
	}	else if(lcdp->panel_info.lcd_if == LCD_IF_LVDS) {
		lcdp->lcd_clk.clk_div = 7;
	}	else if(lcdp->panel_info.lcd_if == LCD_IF_DSI) {
		u32 lane = lcdp->panel_info.lcd_dsi_lane;
		u32 bitwidth = 0;

		switch(lcdp->panel_info.lcd_dsi_format) {
			case LCD_DSI_FORMAT_RGB888:
			bitwidth = 24;
			break;
			case LCD_DSI_FORMAT_RGB666:
			bitwidth = 24;
			break;
			case LCD_DSI_FORMAT_RGB565:
			bitwidth = 16;
			break;
			case LCD_DSI_FORMAT_RGB666P://todo?
			bitwidth = 18;
			break;
		}

		lcdp->lcd_clk.clk_div = bitwidth/lane;
	}

	pll_freq = lcd_dclk_freq * (lcdp->lcd_clk.clk_div);

	set_src_freq(lcdp->lcd_clk.clk_src, pll_freq);

	return 0;
}
开发者ID:tempbottle,项目名称:InDashNet.Open.UN2000,代码行数:45,代码来源:disp_lcd.c

示例13: bsp_disp_hdmi_check_support_mode

__s32 bsp_disp_hdmi_check_support_mode(__u32 screen_id, __u8  mode)
{
	if(disp_hdmi_get_support(screen_id) && (gdisp.screen[screen_id].hdmi_used)
	    && (gdisp.init_para.hdmi_mode_support)) {
		if(gdisp.screen[screen_id].hdmi_test_mode < DISP_TV_MODE_NUM)	{
			if(mode == gdisp.screen[screen_id].hdmi_test_mode) {
				return 1;
			} else {
				return 0;
			}
		} else {
			return gdisp.init_para.hdmi_mode_support(mode);
		}
	}	else {
		DE_WRN("hdmi_mode_support is NULL\n");
		return DIS_NOT_SUPPORT;
	}
}
开发者ID:Aorjoa,项目名称:bootloader,代码行数:18,代码来源:disp_hdmi.c

示例14: disp_vdevice_unregister

s32 disp_vdevice_unregister(struct disp_device *vdevice)
{
	struct disp_vdevice_private_data *vdevicep;

	if(NULL == vdevice) {
		DE_WRN("null hdl\n");
		return DIS_FAIL;
	}
	disp_device_unset_manager(vdevice);
	disp_device_unregister(vdevice);
	vdevice->exit(vdevice);
	vdevicep = (struct disp_vdevice_private_data *)vdevice->priv_data;

	disp_sys_free((void*)vdevice);
	disp_sys_free((void*)vdevicep);

	return 0;
}
开发者ID:phi-psi,项目名称:linux-3.4-sunxi,代码行数:18,代码来源:disp_vdevice.c

示例15: hdmi_clk_disable

static s32 hdmi_clk_disable(struct disp_hdmi *hdmi)
{
	struct disp_hdmi_private_data *hdmip = disp_hdmi_get_priv(hdmi);
	if(!hdmi || !hdmip) {
	    DE_WRN("hdmi clk init null hdl!\n");
	    return DIS_FAIL;
	}

	disp_al_hdmi_disable(hdmi->channel_id);

	hdmip->lcd_clk.h_clk = OSAL_CCMU_OpenMclk(hdmip->lcd_clk.clk);
	OSAL_CCMU_MclkOnOff(hdmip->lcd_clk.h_clk, CLK_OFF);
	OSAL_CCMU_CloseMclk(hdmip->lcd_clk.h_clk);

	if(hdmip->drc_clk.clk)
		disp_al_hdmi_clk_disable(hdmip->drc_clk.clk);

	return 0;
}
开发者ID:GREYFOXRGR,项目名称:BPI-M3-bsp,代码行数:19,代码来源:disp_hdmi.c


注:本文中的DE_WRN函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。