• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AS_UINT32函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: DPI_DisableClk

DPI_STATUS DPI_DisableClk()
{
   #define DPI_TIMEOUT  500  // 500 ms
   DPI_REG_EN en = DPI_REG->DPI_EN;
   unsigned int dpi_timeout_cnt = 0;
   unsigned int reg;
   

   en.EN = 0;
   OUTREG32(&DPI_REG->DPI_EN, AS_UINT32(&en));

   // wait for DPI back to idle
   while (dpi_timeout_cnt < DPI_TIMEOUT)
   {
       reg = AS_UINT32(&DPI_REG->STATUS);
       if (0x0 == (reg & 0x10000))
       {
           break;
       }
       mdelay(1);
       dpi_timeout_cnt++;
   }
   if (DPI_TIMEOUT <= dpi_timeout_cnt)
   {
       ASSERT(0);
   }
   printk("[DISP] cnt:%d \n", dpi_timeout_cnt);
   
   return DPI_STATUS_OK;
}
开发者ID:LosTigeros,项目名称:Trooper2_4.0_5.0_kernel,代码行数:30,代码来源:dpi_drv.c


示例2: DPI_Init_PLL

DPI_STATUS DPI_Init_PLL(unsigned int mipi_pll_clk_ref,unsigned int mipi_pll_clk_div1,unsigned int mipi_pll_clk_div2)
{
#if 1
    MIPITX_CFG0_REG con0 = DSI_PHY_REG_DPI->MIPITX_CON0;
    MIPITX_CFG1_REG con1 = DSI_PHY_REG_DPI->MIPITX_CON1;
#ifdef DPI_MIPI_API 
	enable_mipi(MT65XX_MIPI_TX, "DPI");
#endif
    #ifdef BUILD_UBOOT
	OUTREG16(0xc2080858, 0x8000);
	OUTREG16(0xc20a3824, 0x4008);
	MASKREG16(0xc20a380c, 0x000c, 0x0000); //default value is 0x7008, but should be 0x7000
    #else
	OUTREG16(0xf2080858, 0x8000); //??
	OUTREG16(0xf20a3824, 0x4008);
	MASKREG16(0xf20a380c, 0x000c, 0x0000); //default value is 0x7008, but should be 0x7000
    #endif	
	MASKREG16(PLL_SOURCE, 0x0010, 0x0010); //

    con1.RG_PLL_DIV1 = mipi_pll_clk_div1;
    con1.RG_PLL_DIV2 = mipi_pll_clk_div2;

	con0.PLL_CLKR_EN = 1;
	con0.PLL_EN = 1;
	con0.RG_DPI_EN = 1;

    // Set to DSI_PHY_REG
    
    OUTREG32(&DSI_PHY_REG_DPI->MIPITX_CON0, AS_UINT32(&con0));
    OUTREG32(&DSI_PHY_REG_DPI->MIPITX_CON1, AS_UINT32(&con1));
#endif
	return DPI_STATUS_OK;
}
开发者ID:ramgar,项目名称:mt6577_kernel_3.4.67,代码行数:33,代码来源:dpi_drv.c


示例3: DPI_ConfigBG

DPI_STATUS DPI_ConfigBG(bool enable, int BG_W, int GB_H)
{
    if(enable = false)
    {
        DPI_REG_CNTL pol = DPI_REG->CNTL;
        pol.DPI_BG_EN = 0;
        OUTREG32(&DPI_REG->CNTL, AS_UINT32(&pol));
        return DPI_STATUS_OK;
    }
          
    DPI_REG_CNTL pol = DPI_REG->CNTL;
    pol.DPI_BG_EN = 1;
    if((BG_W == 0) || (GB_H == 0))
		pol.DPI_BG_EN = 0;
    OUTREG32(&DPI_REG->CNTL, AS_UINT32(&pol));

    DPI_REG_BG_HCNTL pol2 = DPI_REG->BG_HCNTL;
    pol2.BG_RIGHT = BG_W/2;
    pol2.BG_LEFT = BG_W/2;
    OUTREG32(&DPI_REG->BG_HCNTL, AS_UINT32(&pol2));

    DPI_REG_BG_VCNTL pol3 = DPI_REG->BG_VCNTL;
    pol3.BG_BOT = GB_H/2;
    pol3.BG_TOP = GB_H/2;
    OUTREG32(&DPI_REG->BG_VCNTL, AS_UINT32(&pol3));

    DPI_REG_BG_COLOR pol4 = DPI_REG->BG_COLOR;
    pol4.BG_B = 0;
    pol4.BG_G = 0;
    pol4.BG_R = 0;
    OUTREG32(&DPI_REG->BG_COLOR, AS_UINT32(&pol4));
    
    return DPI_STATUS_OK;
}
开发者ID:degrus,项目名称:zopo_kernel,代码行数:34,代码来源:dpi_drv.c


示例4: DPI_Init

DPI_STATUS DPI_Init(BOOL isDpiPoweredOn)
{
    DPI_REG_CNTL cntl;

    if (isDpiPoweredOn) {
        _BackupDPIRegisters();
    } else {
        _ResetBackupedDPIRegisterValues();
    }

    DPI_PowerOn();
    // Always enable frame shift protection and recovery
    cntl = DPI_REG->CNTL;
    cntl.FS_PROT_EN = 1;
    cntl.FS_RC_EN = 1;

    // Enable adaptive FIFO high/low threshold control
    cntl.ADP_EN = 1;
     
    OUTREG32(&DPI_REG->CNTL, AS_UINT32(&cntl));

    // Config ultra high threshold water mark
    {
        DPI_REG_FIFO_TH th = DPI_REG->FIFO_TH;

        th.LOW = 512;
        th.HIGH = 512;

        OUTREG32(&DPI_REG->FIFO_TH, AS_UINT32(&th));
        DPI_REG->FIFO_INC.FIFO_TH_INC = 8;
		DPI_REG->FIFO_INC.FIFO_TH_DEC = 8;
    }

#if ENABLE_DPI_INTERRUPT
    if (request_irq(MT_DPI_IRQ_ID,
        _DPI_InterruptHandler, IRQF_TRIGGER_LOW, "mtkdpi", NULL) < 0)
    {
        DISP_LOG_PRINT(ANDROID_LOG_INFO, "DPI", "[ERROR] fail to request DPI irq\n"); 
        return DPI_STATUS_ERROR;
    }
//    init_waitqueue_head(&_vsync_wait_queue_dpi);
    {
        DPI_REG_INTERRUPT enInt = DPI_REG->INT_ENABLE;
        enInt.FIFO_EMPTY = 1;
		enInt.FIFO_FULL = 0;
        enInt.OUT_EMPTY = 0;
		enInt.CNT_OVERFLOW = 0;
        enInt.LINE_ERR = 0;
        enInt.VSYNC = 1;
        OUTREG32(&DPI_REG->INT_ENABLE, AS_UINT32(&enInt));
    }
#endif
#ifndef BUILD_UBOOT
	init_waitqueue_head(&_vsync_wait_queue_dpi);
#endif
    OUTREG32(&DPI_REG->GMC_CNTL, 0x41);
	LCD_W2M_NeedLimiteSpeed(TRUE);
    return DPI_STATUS_OK;
}
开发者ID:ramgar,项目名称:mt6577_kernel_3.4.67,代码行数:59,代码来源:dpi_drv.c


示例5: TVC_ConfigSize

void TVC_ConfigSize(unsigned int src_width, unsigned int src_height, unsigned int tar_width, unsigned int tar_height)
{

    _SIZE tarSize = {0};

    TV_INFO("src %d, %d, tar %d, %d\n", src_width, src_height, tar_width, tar_height);


    //src size
    if (_tvcContext.srcSize.width != src_width ||
        _tvcContext.srcSize.height != src_height)
    {
        _tvcContext.srcSize.width  = src_width;
        _tvcContext.srcSize.height = src_height;
        _tvcContext.srcFormatSizeDirty = TRUE;
    }
    // Config Source Size
    OUTREG32(&TVC_REG->SRC_WIDTH, _tvcContext.srcSize.width);
    OUTREG32(&TVC_REG->SRC_HEIGHT, _tvcContext.srcSize.height);

    // Config Line Pitch
    {
        TVC_REG_LINE_OFFSET OFFSET = TVC_REG->LINE_OFFSET;
        OFFSET.LINE_OFFSET = (TVC_YUV420_BLK == _tvcContext.srcFormat ||
                              TVC_YUV420_PLANAR == _tvcContext.srcFormat) ?
                             (_tvcContext.srcSize.width * 1) :
                             (_tvcContext.srcSize.width * 2);
        OUTREG32(&TVC_REG->LINE_OFFSET, AS_UINT32(&OFFSET));
    }




    //tar size
    tarSize.width = tar_width;
    tarSize.height = tar_height;

    _SetTarSize(tar_width, tar_height);
    _tvcContext.tarSize = tarSize;

    _SetResizCoeff(_tvcContext.srcSize, tarSize);

    _ConfigFullDisplayRegion();

    {
        TVC_REG_UPDATE update = TVC_REG->REG_UPDATE;
        update.REG_RDY = 1;
        OUTREG32(&TVC_REG->REG_UPDATE, AS_UINT32(&update));
    }


}
开发者ID:Lesozav25,项目名称:ZOPO-TSN,代码行数:52,代码来源:tvc_drv.c


示例6: DPI_ConfigHsync

DPI_STATUS DPI_ConfigHsync(DPI_POLARITY polarity, UINT32 pulseWidth, UINT32 backPorch,
                           UINT32 frontPorch)
{
   DPI_REG_TGEN_HPORCH hporch = DPI_REG->TGEN_HPORCH;
   
   hporch.HBP = backPorch;
   hporch.HFP = frontPorch;
   
   OUTREG32(&DPI_REG->TGEN_HWIDTH, AS_UINT32(&pulseWidth));
   OUTREG32(&DPI_REG->TGEN_HPORCH, AS_UINT32(&hporch));

    return DPI_STATUS_OK;
}
开发者ID:LosTigeros,项目名称:Trooper2_4.0_5.0_kernel,代码行数:13,代码来源:dpi_drv.c


示例7: DPI_ConfigVsync

DPI_STATUS DPI_ConfigVsync(DPI_POLARITY polarity, UINT32 pulseWidth, UINT32 backPorch,
                           UINT32 frontPorch)
{
   DPI_REG_TGEN_VPORCH vporch = DPI_REG->TGEN_VPORCH;
   
   vporch.VBP = backPorch;
   vporch.VFP = frontPorch;
   
   OUTREG32(&DPI_REG->TGEN_VWIDTH, AS_UINT32(&pulseWidth));
   OUTREG32(&DPI_REG->TGEN_VPORCH, AS_UINT32(&vporch));
    
    return DPI_STATUS_OK;
}
开发者ID:LosTigeros,项目名称:Trooper2_4.0_5.0_kernel,代码行数:13,代码来源:dpi_drv.c


示例8: DPI_Init

DPI_STATUS DPI_Init(BOOL isDpiPoweredOn)
{
    _BackupDPIRegisters();
    DPI_PowerOn();
        
#if 0
    // gpio setting
    OUTREG32(0xf0005000 + 0xCC4, 0x0000000f);
    OUTREG32(0xf0005000 + 0xB18, 0x00000ff0);
    OUTREG32(0xf0005000 + 0xB14, 0x00000660);
    OUTREG32(0xf0005000 + 0xB28, 0x000000ff);
    OUTREG32(0xf0005000 + 0xB24, 0x00000066);
#endif

#if ENABLE_DPI_INTERRUPT
    if (request_irq(MT_DISP_DPI0_IRQ_ID,
        _DPI_InterruptHandler, IRQF_TRIGGER_LOW, "mtkdpi", NULL) < 0)
    {
        DISP_LOG_PRINT(ANDROID_LOG_INFO, "DPI", "[ERROR] fail to request DPI irq\n");
        return DPI_STATUS_ERROR;
    }

    {
        DPI_REG_INTERRUPT enInt = DPI_REG->INT_ENABLE;
        enInt.VSYNC = 1;
        OUTREG32(&DPI_REG->INT_ENABLE, AS_UINT32(&enInt));
    }
#endif
	///LCD_W2M_NeedLimiteSpeed(TRUE);
    return DPI_STATUS_OK;
}
开发者ID:degrus,项目名称:zopo_kernel,代码行数:31,代码来源:dpi_drv.c


示例9: DPI_Init

DPI_STATUS DPI_Init(BOOL isDpiPoweredOn)
{
    //DPI_REG_CNTL cntl;
    //DPI_REG_EMBSYNC_SETTING embsync;

    if (isDpiPoweredOn) {
        DPI_BackupRegisters();
    } else {
        _ResetBackupedDPIRegisterValues();
    }

    DPI_PowerOn();

#if ENABLE_DPI_INTERRUPT
    if (request_irq(MT_DISP_DPI_IRQ_ID,
        _DPI_InterruptHandler, IRQF_TRIGGER_LOW, "mtkdpi", NULL) < 0)
    {
        DISP_LOG_PRINT(ANDROID_LOG_INFO, "DPI", "[ERROR] fail to request DPI irq\n"); 
        return DPI_STATUS_ERROR;
    }

    {
        DPI_REG_INTERRUPT enInt = DPI_REG->INT_ENABLE;
        enInt.VSYNC = 1;
        OUTREG32(&DPI_REG->INT_ENABLE, AS_UINT32(&enInt));
    }
#endif

   LCD_W2M_NeedLimiteSpeed(TRUE);

   return DPI_STATUS_OK;
}
开发者ID:LosTigeros,项目名称:Trooper2_4.0_5.0_kernel,代码行数:32,代码来源:dpi_drv.c


示例10: _DPI_InterruptHandler

static irqreturn_t _DPI_InterruptHandler(int irq, void *dev_id)
{   
   static int counter = 0;
   DPI_REG_INTERRUPT status = DPI_REG->INT_STATUS;
   MMProfileLogEx(DDP_MMP_Events.ROT_IRQ, MMProfileFlagPulse, AS_UINT32(&status), 0);
   //    if (status.FIFO_EMPTY) ++ counter;
   
   OUTREG32(&DPI_REG->INT_STATUS, 0);
   if(status.VSYNC)
   {
      if(dpiIntCallback)
         dpiIntCallback(DISP_DPI_VSYNC_INT);
      #ifndef BUILD_UBOOT
         if(wait_dpi_vsync){
            if(-1 != hrtimer_try_to_cancel(&hrtimer_vsync_dpi)){
               dpi_vsync = true;
               //			hrtimer_try_to_cancel(&hrtimer_vsync_dpi);
               wake_up_interruptible(&_vsync_wait_queue_dpi);
            }
         }
      #endif
   }
   
   if (status.VSYNC && counter) {
      DISP_LOG_PRINT(ANDROID_LOG_ERROR, "DPI", "[Error] DPI FIFO is empty, "
      "received %d times interrupt !!!\n", counter);
      counter = 0;
   }
   
   _DPI_LogRefreshRate(status);
   OUTREG32(&DPI_REG->INT_STATUS, 0);

   return IRQ_HANDLED;
}
开发者ID:LosTigeros,项目名称:Trooper2_4.0_5.0_kernel,代码行数:34,代码来源:dpi_drv.c


示例11: DPI_Init

DPI_STATUS DPI_Init(BOOL isDpiPoweredOn)
{
   if (isDpiPoweredOn) {
      _BackupDPIRegisters();
   } else {
      _ResetBackupedDPIRegisterValues();
   }
   
   DPI_PowerOn();

#if ENABLE_DPI_INTERRUPT
   if (request_irq(MT65XX_DPI_IRQ_ID,
        _DPI_InterruptHandler, IRQF_TRIGGER_LOW, "mtkdpi", NULL) < 0)
   {
      DISP_LOG_PRINT(ANDROID_LOG_INFO, "DPI", "[ERROR] fail to request DPI irq\n"); 
      return DPI_STATUS_ERROR;
   }

   {
      DPI_REG_INTERRUPT enInt = DPI_REG->INT_ENABLE;
      enInt.VSYNC = 1;
      OUTREG32(&DPI_REG->INT_ENABLE, AS_UINT32(&enInt));
   }
#endif

   return DPI_STATUS_OK;
}
开发者ID:WayWingsDev,项目名称:mediatek,代码行数:27,代码来源:dpi_drv.c


示例12: TVC_Disable

TVC_STATUS TVC_Disable(void)
{
    TV_INFO("\n");

    if (_tvcContext.isTvcEnabled == false)
    {
        TV_WARNING("TVC is disabled, but disable again\n");
        return TVC_STATUS_OK;
    }

	_tvcContext.isTvcEnabled = false;
    OUTREG32(&TVC_REG->ENABLE, 0);

	{
        TVC_REG_UPDATE update = TVC_REG->REG_UPDATE;
        update.REG_RDY = 1;
        OUTREG32(&TVC_REG->REG_UPDATE, AS_UINT32(&update));
    }

	_WaitForRegUpdated();


    _FreeInternalSRAM();

    return TVC_STATUS_OK;
}
开发者ID:Lesozav25,项目名称:ZOPO-TSN,代码行数:26,代码来源:tvc_drv.c


示例13: dump_lcd_layer_info

static void dump_lcd_layer_info(void)
{
#ifndef MT65XX_NEW_DISP
    unsigned int roi_ctl = AS_UINT32(&LCD_REG->WROI_CONTROL);

    unsigned int i = 0;

    DISP_LOG_PRINT(ANDROID_LOG_INFO, "DBG", 
           "------------------------------------------\n"
           "[mtkfb] dump lcd layer information\n"
           "------------------------------------------\n");

    for (i = 0; i < 6; ++ i)
    {
        unsigned int layer_en = is_layer_enable(roi_ctl, i);
        
        DISP_LOG_PRINT(ANDROID_LOG_INFO, "DBG", "Layer[%d] is %s\n", i, layer_en ? "enabled" : "disabled");
        if (!layer_en) continue;

        DISP_LOG_PRINT(ANDROID_LOG_INFO, "DBG", "   size   : %d x %d\n", LCD_REG->LAYER[i].SIZE.WIDTH,
                                        LCD_REG->LAYER[i].SIZE.HEIGHT);
        DISP_LOG_PRINT(ANDROID_LOG_INFO, "DBG", "   offset : (%d, %d)\n", LCD_REG->LAYER[i].OFFSET.X,
                                         LCD_REG->LAYER[i].OFFSET.Y);
        DISP_LOG_PRINT(ANDROID_LOG_INFO, "DBG", "   format : %s\n", 
               narrate_lcd_layer_format(LCD_REG->LAYER[i].CONTROL.CLRDPT));
        DISP_LOG_PRINT(ANDROID_LOG_INFO, "DBG", "   dlink  : %d\n", 
               (AS_UINT32(&LCD_REG->WROI_DC) >> (31 - i)) & 0x1);
    }

    DISP_LOG_PRINT(ANDROID_LOG_INFO, "DBG", "\n");
#else
	LCD_DumpLayer();
#endif
}
开发者ID:Lesozav25,项目名称:ZOPO-TSN,代码行数:34,代码来源:debug.c


示例14: DPI1_DisableClk

DPI_STATUS DPI1_DisableClk()
{
	DPI_REG_EN en = DPI1_REG->DPI_EN;
    en.EN = 0;
    OUTREG32(&DPI1_REG->DPI_EN, AS_UINT32(&en));

    return DPI_STATUS_OK;
}
开发者ID:JustAndroids,项目名称:ZTEBladeL2,代码行数:8,代码来源:dpi1_drv.c


示例15: DPI_EnableIrq

void DPI_EnableIrq(void)
{
#if ENABLE_DPI_INTERRUPT
	DPI_REG_INTERRUPT enInt = DPI_REG->INT_ENABLE;
	enInt.VSYNC = 1;
	OUTREG32(&DPI_REG->INT_ENABLE, AS_UINT32(&enInt));
#endif
}
开发者ID:degrus,项目名称:zopo_kernel,代码行数:8,代码来源:dpi_drv.c


示例16: TVE_EnableColorBar

TVE_STATUS TVE_EnableColorBar(BOOL enable)
{
    TVE_REG_MODE mode = TVE_REG->MODE;
    mode.CBON = enable ? 1 : 0;
    OUTREG32(&TVE_REG->MODE, AS_UINT32(&mode));

    return TVE_STATUS_OK;
}
开发者ID:Banjo0917,项目名称:mt6577_kernel3.4,代码行数:8,代码来源:tve_drv.c


示例17: DPI_ConfigDataEnable

DPI_STATUS DPI_ConfigDataEnable(DPI_POLARITY polarity)
{

    DPI_REG_CLKCNTL pol = DPI_REG->CLK_CNTL;
    pol.DE_POL = (DPI_POLARITY_FALLING == polarity) ? 1 : 0;
    OUTREG32(&DPI_REG->CLK_CNTL, AS_UINT32(&pol));
    return DPI_STATUS_OK;
}
开发者ID:degrus,项目名称:zopo_kernel,代码行数:8,代码来源:dpi_drv.c


示例18: DPI_EnableClk

DPI_STATUS DPI_EnableClk()
{
    ///DPI_EnableColorBar();
	DPI_REG_EN en = DPI_REG->DPI_EN;
    en.EN = 1;
    OUTREG32(&DPI_REG->DPI_EN, AS_UINT32(&en));
    return DPI_STATUS_OK;
}
开发者ID:degrus,项目名称:zopo_kernel,代码行数:8,代码来源:dpi_drv.c


示例19: DPI1_ConfigDataEnable

DPI_STATUS DPI1_ConfigDataEnable(DPI_POLARITY polarity)
{
	DPI_REG_TGEN_POL pol = DPI1_REG->TGEN_POL;
    pol.DE_POL = (DPI_POLARITY_FALLING == polarity) ? 1 : 0;
    OUTREG32(&DPI1_REG->TGEN_POL, AS_UINT32(&pol));

    return DPI_STATUS_OK;
}
开发者ID:JustAndroids,项目名称:ZTEBladeL2,代码行数:8,代码来源:dpi1_drv.c


示例20: DPI1_ConfigHsync

DPI_STATUS DPI1_ConfigHsync(DPI_POLARITY polarity, UINT32 pulseWidth, UINT32 backPorch,
                           UINT32 frontPorch)
{
	DPI_REG_TGEN_HPORCH hporch = DPI1_REG->TGEN_HPORCH;
    DPI_REG_TGEN_POL pol = DPI1_REG->TGEN_POL;

	pol.HSYNC_POL = (DPI_POLARITY_FALLING == polarity) ? 1 : 0;
    //DPI1_REG->TGEN_HWIDTH = pulseWidth;
    OUTREG32(&DPI1_REG->TGEN_HWIDTH,pulseWidth);
    hporch.HBP = backPorch;
    hporch.HFP = frontPorch;

    OUTREG32(&DPI1_REG->TGEN_POL, AS_UINT32(&pol));
    OUTREG32(&DPI1_REG->TGEN_HPORCH, AS_UINT32(&hporch));

    return DPI_STATUS_OK;
}
开发者ID:JustAndroids,项目名称:ZTEBladeL2,代码行数:17,代码来源:dpi1_drv.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AString函数代码示例发布时间:2022-05-30
下一篇:
C++ ASWGameRules函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap