本文整理汇总了C++中BITCSET函数的典型用法代码示例。如果您正苦于以下问题:C++ BITCSET函数的具体用法?C++ BITCSET怎么用?C++ BITCSET使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BITCSET函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VIOC_VIN_SetImageOffset
/* Image offset setting */
void VIOC_VIN_SetImageOffset(VIOC_VIN *pVIN, unsigned int offs_width, unsigned int offs_height, unsigned int offs_height_intl)
{
//pVIN->uVIN_OFFS.bVIN_OFFS.offs_width = offs_width;
//pVIN->uVIN_OFFS.bVIN_OFFS.offs_height = offs_height;
//pVIN->uVIN_OFFS_INTL.bVIN_OFFS.offs_height = offs_height_intl;
BITCSET(pVIN->uVIN_OFFS.nREG, 0xFFFFFFFF, (offs_height << 16) | (offs_width) );
BITCSET(pVIN->uVIN_OFFS_INTL.nREG, 0xFFFF0000, (offs_height_intl << 16) );
}
示例2: Gre2d_src_ctrl
/*------------------------------------------------------------------
Gre2d_src_ctrl
graphic engine sorce control
-------------------------------------------------------------------*/
void Gre2d_src_ctrl(G2D_SRC_CTRL reg)
{
unsigned int sf_ctrl_reg = 0, sa_ctrl_reg = 0,ctrl_reg = 0;
POVERLAYMIXER pHwOVERLAYMIXER;
pHwOVERLAYMIXER = (volatile POVERLAYMIXER)tcc_p2v(HwOVERLAYMIXER_BASE);
#if defined(CONFIG_ARCH_TCC892X)
// source YUV to RGB converter enable sf_ctrl
sf_ctrl_reg |= (((reg.src0_y2r.src_y2r <<24) & Hw2D_SFCTRL_S0_Y2REN) |
((reg.src1_y2r.src_y2r <<25) & Hw2D_SFCTRL_S1_Y2REN) | ((reg.src2_y2r.src_y2r <<26) & Hw2D_SFCTRL_S2_Y2REN));
// source YUV to RGB coverter type sf_ctrl
sf_ctrl_reg |= (((reg.src0_y2r.src_y2r_type<<16) & Hw2D_SFCTRL_S0_Y2RMODE) |
((reg.src1_y2r.src_y2r_type <<18) & Hw2D_SFCTRL_S1_Y2RMODE) | ((reg.src2_y2r.src_y2r_type <<20) & Hw2D_SFCTRL_S2_Y2RMODE));
// source select sf_ctrl
sf_ctrl_reg |= ((reg.src_sel_0) & Hw2D_SFCTRL_S0_SEL) |((reg.src_sel_1<<2) & Hw2D_SFCTRL_S1_SEL)
| ((reg.src_sel_2<<4) & Hw2D_SFCTRL_S2_SEL) | ((reg.src_sel_3<<6) & Hw2D_SFCTRL_S3_SEL) ;
// source arithmetic mode sa_ctrl
sa_ctrl_reg |= (((reg.src0_arith ) & Hw2D_SACTRL_S0_ARITHMODE) |
((reg.src1_arith<<4) & Hw2D_SACTRL_S1_ARITHMODE) | ((reg.src2_arith<<8) & Hw2D_SACTRL_S2_ARITHMODE));
// source chroma key enable : for arithmetic sa_ctrl
sa_ctrl_reg |= (((reg.src0_chroma_en<<16) & Hw2D_SACTRL_S0_CHROMAEN) |
((reg.src1_chroma_en<<17) & Hw2D_SACTRL_S1_CHROMAEN) | ((reg.src2_chroma_en<<18) & Hw2D_SACTRL_S2_CHROMAEN));
BITCSET(pHwOVERLAYMIXER->SF_CTRL.nREG, 0x0FFFFFFF, sf_ctrl_reg);
BITCSET(pHwOVERLAYMIXER->SA_CTRL.nREG, 0x0FFFFFFF, sa_ctrl_reg);
#else
// source arithmetic mode
ctrl_reg |= (((reg.src0_arith<<19) & Hw2D_SCTRL_S0_ARITHMODE) |
((reg.src1_arith<<22) & Hw2D_SCTRL_S1_ARITHMODE) | ((reg.src2_arith<<25) & Hw2D_SCTRL_S2_ARITHMODE));
// source YUV to RGB converter enable
ctrl_reg |= (((reg.src0_y2r.src_y2r <<16) & Hw2D_SCTRL_S0_Y2REN) |
((reg.src1_y2r.src_y2r <<17) & Hw2D_SCTRL_S1_Y2REN) | ((reg.src2_y2r.src_y2r <<18) & Hw2D_SCTRL_S2_Y2REN));
// source YUV to RGB coverter type
ctrl_reg |= (((reg.src0_y2r.src_y2r_type<<9) & Hw2D_SCTRL_S0_Y2RMODE) |
((reg.src1_y2r.src_y2r_type <<11) & Hw2D_SCTRL_S1_Y2RMODE) | ((reg.src2_y2r.src_y2r_type <<13) & Hw2D_SCTRL_S2_Y2RMODE));
// source chroma key enable : for arithmetic
ctrl_reg |= (((reg.src0_chroma_en<<6) & Hw2D_SCTRL_S0_CHROMAEN) |
((reg.src1_chroma_en<<7) & Hw2D_SCTRL_S1_CHROMAEN) | ((reg.src2_chroma_en<<8) & Hw2D_SCTRL_S2_CHROMAEN));
// source select
ctrl_reg |= (((reg.src_sel_0) & Hw2D_SCTRL_S0_SEL) |
((reg.src_sel_1<<2) & Hw2D_SCTRL_S1_SEL) | ((reg.src_sel_2<<4) & Hw2D_SCTRL_S2_SEL));
BITCSET(pHwOVERLAYMIXER->S_CTRL, 0x0FFFFFFF, ctrl_reg);
#endif
}
示例3: VIOC_RDMA_SetImageEnable
void VIOC_RDMA_SetImageEnable(VIOC_RDMA *pRDMA )
{
/*
pRDMA->uCTRL.bREG.IEN = 1;
pRDMA->uCTRL.bREG.UPD = 1;
*/
BITCSET(pRDMA->uCTRL.nREG, 1<<28, 1<<28 );
BITCSET(pRDMA->uCTRL.nREG, 1<<16, 1<<16 );
}
示例4: Gre2d_Grp_enable
/*------------------------------------------------------------------
Gre2d_Grp_enable
graphic engine channel enable control
-------------------------------------------------------------------*/
void Gre2d_Grp_enable(G2D_EN grp_enalbe, unsigned char int_en)
{
POVERLAYMIXER pHwOVERLAYMIXER;
pHwOVERLAYMIXER = (volatile POVERLAYMIXER)tcc_p2v(HwOVERLAYMIXER_BASE);
#if defined(CONFIG_ARCH_TCC892X)
BITCSET( pHwOVERLAYMIXER->OM_CTRL.nREG, (HwGE_GE_CTRL_EN|HwGE_GE_INT_EN), ((int_en<<16)|grp_enalbe));
#else
BITCSET( pHwOVERLAYMIXER->OM_CTRL, (HwGE_GE_CTRL_EN|HwGE_GE_INT_EN), ((int_en<<16)|grp_enalbe));
#endif
}
示例5: Gre2d_Grp_int_en
/*------------------------------------------------------------------
Gre2d_Grp_int_en
graphic engine interrupt enable
-------------------------------------------------------------------*/
void Gre2d_Grp_int_en(unsigned int int_en)
{
POVERLAYMIXER pHwOVERLAYMIXER;
pHwOVERLAYMIXER = (volatile POVERLAYMIXER)tcc_p2v(HwOVERLAYMIXER_BASE);
#if defined(CONFIG_ARCH_TCC892X)
BITCSET( pHwOVERLAYMIXER->OM_IREQ.nREG, 0xFFFFFFFF, int_en);
#else
BITCSET( pHwOVERLAYMIXER->OM_IREQ, 0xFFFFFFFF, int_en);
#endif
}
示例6: VIOC_WDMA_SetImageBase
void VIOC_WDMA_SetImageBase(VIOC_WDMA *pWDMA, unsigned int nBase0, unsigned int nBase1, unsigned int nBase2)
{
/*
pWDMA->uBASE0 = nBase0;
pWDMA->uBASE1 = nBase1;
pWDMA->uBASE2 = nBase2;
*/
BITCSET(pWDMA->uBASE0, 0xFFFFFFFF, nBase0);
BITCSET(pWDMA->uBASE1, 0xFFFFFFFF, nBase1);
BITCSET(pWDMA->uBASE2, 0xFFFFFFFF, nBase2);
}
示例7: VIOC_RDMA_SetIreqMask
/* set 1 : IREQ Masked( interrupt disable), set 0 : IREQ UnMasked( interrput enable) */
void VIOC_RDMA_SetIreqMask(VIOC_RDMA * pRDMA, unsigned int mask, unsigned int set)
{
if( set == 0 ) /* Interrupt Enable*/
{
//pRDMA->uIRQMSK.nREG &= ~mask;
BITCSET(pRDMA->uIRQMSK.nREG, 0x0000001F, ~mask);
}
else/* Interrupt Diable*/
{
//pRDMA->uIRQMSK.nREG |= mask;
BITCSET(pRDMA->uIRQMSK.nREG, 0x0000001F, mask);
}
}
示例8: VIOC_WDMA_SetIreqMask
void VIOC_WDMA_SetIreqMask(VIOC_WDMA * pWDMA, unsigned int mask, unsigned int set)
{ /* set 1 : IREQ Masked(interrupt disable), set 0 : IREQ UnMasked(interrput enable) */
if(set == 0) /* Interrupt Enable*/
{
//pWDMA->uIRQMSK.nREG &= ~mask;
BITCSET(pWDMA->uIRQMSK.nREG, 0x0000001F, ~mask);
}
else/* Interrupt Diable*/
{
//pWDMA->uIRQMSK.nREG |= mask;
BITCSET(pWDMA->uIRQMSK.nREG, 0x0000001F, mask);
}
}
示例9: goodix_wakeup_init
static void goodix_wakeup_init(void)
{
BITCSET(TS_WAKEUP_PORT_EN, TS_WAKEUP_PIN, TS_WAKEUP_PIN); //output mode
BITCSET(TS_WAKEUP_PORT_DAT, TS_WAKEUP_PIN, TS_WAKEUP_PIN);//HIGH to enter sleep mode
mdelay(100);
BITCSET(TS_WAKEUP_PORT_DAT, TS_WAKEUP_PIN, 0);//set low to wakeup goodix device
mdelay(100);
/*if(TS_WAKEUP_ENABLE == mode){
BITCSET(TS_WAKEUP_PORT_DAT, TS_WAKEUP_PIN, 0);//set low to wakeup goodix device
}
else{//(TS_WAKEUP_DISABLE == mode)
BITCSET(TS_WAKEUP_PORT_DAT, TS_WAKEUP_PIN, TS_WAKEUP_PIN);//HIGH to enter sleep mode
}*/
}
示例10: VIOC_VIN_SetInterlaceMode
/* Interlace mode setting */
void VIOC_VIN_SetInterlaceMode(VIOC_VIN *pVIN, unsigned int intl_en, unsigned int intpl_en)
{
//pVIN->uVIN_CTRL.bVIN_CTRL.intl_en = intl_en;
//pVIN->uVIN_CTRL.bVIN_CTRL.intpl_en = intpl_en;
BITCSET(pVIN->uVIN_CTRL.nREG, 0x0000000C, (intl_en<<2) | (intpl_en<<3));
}
示例11: VIOC_VIN_SetImageSize
/* Image size setting */
void VIOC_VIN_SetImageSize(VIOC_VIN *pVIN, unsigned int width, unsigned int height)
{ /* pkjin20 : Chip Bug... To Prevent Read Operation */
//pVIN->uVIN_SIZE.bVIN_SIZE.width = width; //(height << 16) | width;
//pVIN->uVIN_SIZE.bVIN_SIZE.height = height;
BITCSET(pVIN->uVIN_SIZE.nREG, 0xFFFFFFFF, (height << 16) | width);
}
示例12: Gre2d_SetBCh_position
/*------------------------------------------------------------------
Gre2d_SetBCh_position
graphic engine BACK END channel position settig
frameps_x, frameps_y : frame pixsel size
poffset_x, poffset_y : pixsel offset
-------------------------------------------------------------------*/
void Gre2d_SetBCh_position(G2D_CHANNEL ch, unsigned int frameps_x, unsigned int frameps_y, unsigned int poffset_x, unsigned int poffset_y)
{
POVERLAYMIXER pHwOVERLAYMIXER;
pHwOVERLAYMIXER = (volatile POVERLAYMIXER)tcc_p2v(HwOVERLAYMIXER_BASE);
if(ch == DEST_CH)
{
#if defined(CONFIG_ARCH_TCC892X)
BITCSET(pHwOVERLAYMIXER->BCH_DFSIZE.nREG, 0x0FFF0FFF, ((frameps_y<<16) | frameps_x)); // pHwOVERLAYMIXER->BCH_DFSIZE
BITCSET(pHwOVERLAYMIXER->BCH_DOFF.nREG, 0x0FFF0FFF, ((poffset_y<<16) | poffset_x)); // pHwOVERLAYMIXER->BCH_DOFF
#else
BITCSET(pHwOVERLAYMIXER->BCH_DFSIZE, 0x0FFF0FFF, ((frameps_y<<16) | frameps_x)); // pHwOVERLAYMIXER->BCH_DFSIZE
BITCSET(pHwOVERLAYMIXER->BCH_DOFF, 0x0FFF0FFF, ((poffset_y<<16) | poffset_x)); // pHwOVERLAYMIXER->BCH_DOFF
#endif
}
}
示例13: VIOC_RDMA_SetImageAlpha
void VIOC_RDMA_SetImageAlpha(VIOC_RDMA *pRDMA, unsigned int nAlpha0, unsigned int nAlpha1)
{
//pRDMA->uALPHA.bREG.ALPHA0 = nAlpha0;
//pRDMA->uALPHA.bREG.ALPHA1 = nAlpha1;
BITCSET(pRDMA->uALPHA.nREG, 0x00FF00FF, ( nAlpha1 << 16 ) | nAlpha0 );
}
示例14: VIOC_VIN_SetLUTEnable
/* LUT Enable/Disable */
void VIOC_VIN_SetLUTEnable(VIOC_VIN *pVIN, unsigned int lut0_en, unsigned int lut1_en, unsigned int lut2_en)
{
//pVIN->uVIN_MISC1.bVIN_MISC1.lut0_en = lut0_en; /* Color Y (or R) */
//pVIN->uVIN_MISC1.bVIN_MISC1.lut1_en = lut1_en; /* Color Cb (or G) */
//pVIN->uVIN_MISC1.bVIN_MISC1.lut2_en = lut2_en; /* Color Cr (or B) */
BITCSET(pVIN->uVIN_MISC1.nREG, 0x00000007, (lut2_en << 2) | (lut1_en << 1) | (lut0_en));
}
示例15: VIOC_WDMA_SetImageSize
void VIOC_WDMA_SetImageSize(VIOC_WDMA *pWDMA, unsigned int sw, unsigned int sh)
{
//pWDMA->uSIZE.bREG.WIDTH = sw;
//pWDMA->uSIZE.bREG.HEIGHT = sh;
BITCSET(pWDMA->uSIZE.nREG, 0xFFFFFFFF, (sh << 16) | (sw) );
}