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


C++ ADDR函数代码示例

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


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

示例1: hwt_stop

/************************
 *
 *	hwt_stop
 *
 *	Stop hardware timer.
 *
 *	void hwt_stop(
 *		struct s_smc *smc) ;
 * In
 *	smc - A pointer to the SMT Context structure.
 * Out
 *	Nothing.
 *
 ************************/
void hwt_stop(struct s_smc *smc)
{
	outpw(ADDR(B2_TI_CRTL), TIM_STOP) ;
	outpw(ADDR(B2_TI_CRTL), TIM_CL_IRQ) ;

	smc->hw.timer_activ = FALSE ;
}
开发者ID:Core2idiot,项目名称:Kernel-Samsung-3.0...-,代码行数:21,代码来源:hwt.c

示例2: read_address

void read_address(struct s_smc *smc, u_char *mac_addr)
{
	char ConnectorType ;
	char PmdType ;
	int	i ;

#ifdef	PCI
	for (i = 0; i < 6; i++) {	/* read mac address from board */
		smc->hw.fddi_phys_addr.a[i] =
			bitrev8(inp(ADDR(B2_MAC_0+i)));
	}
#endif

	ConnectorType = inp(ADDR(B2_CONN_TYP)) ;
	PmdType = inp(ADDR(B2_PMD_TYP)) ;

	smc->y[PA].pmd_type[PMD_SK_CONN] =
	smc->y[PB].pmd_type[PMD_SK_CONN] = ConnectorType ;
	smc->y[PA].pmd_type[PMD_SK_PMD ] =
	smc->y[PB].pmd_type[PMD_SK_PMD ] = PmdType ;

	if (mac_addr) {
		for (i = 0; i < 6 ;i++) {
			smc->hw.fddi_canon_addr.a[i] = mac_addr[i] ;
			smc->hw.fddi_home_addr.a[i] = bitrev8(mac_addr[i]);
		}
		return ;
	}
	smc->hw.fddi_home_addr = smc->hw.fddi_phys_addr ;

	for (i = 0; i < 6 ;i++) {
		smc->hw.fddi_canon_addr.a[i] =
			bitrev8(smc->hw.fddi_phys_addr.a[i]);
	}
}
开发者ID:adis1313,项目名称:android_kernel_samsung_msm8974,代码行数:35,代码来源:drvfbi.c

示例3: i_igspill

/* i_igspill: spill node i, removing it from index j in interference graph g */
static void i_igspill (i_local_t i, i_local_t j, ig_t g) {
     SCLASS(i) = STACK;		/* Update storage location */
     if (TYPE(i) == I_B)
	  ADDR(i) = v_localb(ADDR(i));
     else ADDR(i) = v_local(TYPE(i));
     i_igremove(j, g);		/* Remove node i from integer IG */
}
开发者ID:berkus,项目名称:lang-e,代码行数:8,代码来源:reg-gc.c

示例4: ADDR

JNIEXPORT jint JNICALL Java_au_notzed_jjmpeg_SwsContextNative_scaleByteArray
(JNIEnv *env, jclass jc, jobject jptr, jobject jsrc, jint srcSliceY, jint srcSliceH, jintArray jdst, jint fmt, jint width, jint height) {
	struct SwsContext *sws = ADDR(jptr);
	struct AVFrame *src = ADDR(jsrc);

	return scaleArray(env, sws, src, srcSliceY, srcSliceH, jdst, 1, fmt, width, height);
}
开发者ID:ideastorm,项目名称:jjmpeg,代码行数:7,代码来源:jjmpeg.c

示例5: chkmem

/**
 * @brief Checks access permissions to a memory area.
 * 
 * @param addr Address to be checked.
 * @param size Size of memory area.
 * @param mask Access permissions mask.
 * 
 * @returns Non-zero if access is authorized, and zero otherwise.
 */
PUBLIC int chkmem(const void *addr, size_t size, mode_t mask)
{
	int ret;              /* Return value.           */
	struct region *reg;   /* Working memory region.  */
	struct pregion *preg; /* Working process region. */
	
	/* Get associated process memory region. */
	if ((preg = findreg(curr_proc, ADDR(addr))) == NULL)
		return (-1);
	
	lockreg(reg = preg->reg);
	
	/* Not allowed. */
	if (!(accessreg(curr_proc, reg) & mask))
	{
		unlockreg(reg);
		return (-1);
	}
		
	ret = withinreg(preg, ADDR(addr));
	ret &= withinreg(preg, ADDR(addr) + size);

	unlockreg(reg);
	
	return (ret);
}
开发者ID:ppenna,项目名称:nanvix,代码行数:35,代码来源:mm.c

示例6: insa_icon

VOID insa_icon(LONG tree, WORD obj, WORD nicon, ICONBLK *pic, BYTE *ptext)
{
	memcpy(pic, &G.g_iblist[nicon], sizeof(ICONBLK));
	pic->ib_ptext = ADDR( ptext );
	LWSET(OB_TYPE(obj), G_ICON);
	LLSET(OB_SPEC(obj), ADDR(pic));
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:7,代码来源:DESKINS.C

示例7: ted_set

VOID ted_set(LONG taddr, BYTE *tmplt, BYTE *valid, BYTE *text)
{
	WORD	imap, itmp;

	if (!tmplt[0])
	{
		tmplt[0] = '@';
		LLSTRCPY(LLGET(TE_PVALID(taddr)), (LONG)ADDR(valid));
		LLSTRCPY(LLGET(TE_PTEXT(taddr)), (LONG)ADDR(text));
		if (!valid[0])
			valid[0] = '@';
		if (!text[0])
			text[0] = '@';
	}
	else
	{
		for (imap = itmp = 0; tmplt[itmp]; itmp++)
			if (tmplt[itmp] == '_')
			{
				tmplt[itmp] = '~';
				valid[itmp] = LBGET(imap + LLGET(TE_PVALID(taddr)));
				text[itmp] = LBGET(imap + LLGET(TE_PTEXT(taddr)));
				imap++;
			}
			else
				valid[itmp] = text[itmp] = '~';
		valid[itmp] = text[itmp] = '\0';
	}
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:29,代码来源:RCSEDIT.C

示例8: update_if

VOID update_if(LONG taddr, BYTE *naddr)
{
	if (!LLSTRCMP(LLGET(taddr), (LONG)ADDR(naddr)))
	{
		LLSET(taddr, get_mem( (UWORD) strlen(naddr)+1));
		LLSTRCPY((LONG)ADDR(naddr), LLGET(taddr));
	}
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:8,代码来源:RCSDATA.C

示例9: forker

void forker(void)
{
        register FPD    *f;
        register PD     *oldrl;
        register LONG   amt;
        FPD             g;
        
        oldrl = rlr;
        rlr = (PD *) -1;
        while(fpcnt)
        {
/* critical area        */
          cli();
          fpcnt--;
          f = &D.g_fpdx[fph++];
                                        /* copy FPD so an interrupt     */
                                        /*  doesn't overwrite it.       */
          LBCOPY(ADDR(&g), ADDR(f), sizeof(FPD) );
          if (fph == NFORKS) 
            fph = 0;
          sti();
/* */
                                                /* see if recording     */
          if (gl_recd)
          {
                                                  /* check for stop key */
            if ( ((void *)g.f_code == (void *)kchange) &&
                 ((g.f_data & 0x0000ffffL) == KEYSTOP) )
              gl_recd = FALSE;
                                                /* if still recording   */
                                                /*   then handle event  */
            if (gl_recd)
            {
                                                /* if its a time event &*/
                                                /*   previously recorded*/
                                                /*   was a time event   */
                                                /*   then coalesce them */ 
                                                /*   else record the    */
                                                /*   event              */
              if ( ((void *)g.f_code == (void *)tchange) &&
                   (LLGET(gl_rbuf - sizeof(FPD)) == (LONG)tchange) )
              {
                amt = g.f_data + LLGET(gl_rbuf-sizeof(LONG));
                LLSET(gl_rbuf - sizeof(LONG), amt);           
              }
              else
              {
                LBCOPY(gl_rbuf, ADDR(f), sizeof(FPD));
                gl_rbuf += sizeof(FPD);
                gl_rlen--;
                gl_recd = gl_rlen;
              }
            }
          }
          (*g.f_code)(g.f_data);
        }
        rlr = oldrl;
}
开发者ID:ragnar76,项目名称:emutos,代码行数:58,代码来源:gemdisp.c

示例10: tx_scl_en

/*
** 函数功能:SCL_EN引脚输出电平
** 输入参数:a=HIGH 输出高电平, a=LOW 输出低电平
** 输出参数:无
** 返回值:无
** 备注:
*/
void tx_scl_en(unsigned char a)
{
	gpio_data = SCL_EN;
	if(a == HIGH){
		iowrite32(gpio_data, ADDR(gpio_reg, gpio_t, set_data23));
	}else{
		iowrite32(gpio_data, ADDR(gpio_reg, gpio_t, clr_data23));
	}
}
开发者ID:DavionKnight,项目名称:omc_aeu_60m,代码行数:16,代码来源:main.c

示例11: pumpOn

static void pumpOn(UArm *uarm)
{
	if(FALSE == uarm->status.pump)
	{
    	Xil_Out32(ADDR(PUMP_EN),LOW);
    	Xil_Out32(ADDR(VALVE_EN),HIGH);
    	uarm->status.pump = TRUE;
    }
}
开发者ID:chhx001,项目名称:fs-zrobot-zed,代码行数:9,代码来源:uarm.c

示例12: set_dir_sda

/*
** 函数功能:设置SDA引脚方向,输入/输出
** 输入参数:dir=IN 输入, dir=OUT 输出
** 输出参数:无
** 返回值:无
** 备注:
*/
void set_dir_sda(int dir)
{
	gpio_data = ioread32(ADDR(gpio_reg, gpio_t, dir01));
	if(dir == OUT){
		gpio_data &= ~SDA;
	}else{
		gpio_data |= SDA;
	}
	iowrite32(gpio_data, ADDR(gpio_reg, gpio_t,dir01));
}
开发者ID:DavionKnight,项目名称:omc_aeu_60m,代码行数:17,代码来源:main.c

示例13: set_dir_scl_en

/*
** 函数功能:设置SCL_EN引脚方向,输入/输出
** 输入参数:dir=IN 输入, dir=OUT 输出
** 输出参数:无
** 返回值:无
** 备注:
*/
void set_dir_scl_en(int dir)
{
	gpio_data = ioread32(ADDR(gpio_reg, gpio_t, dir23));
	if(dir == OUT){
		gpio_data &= ~SCL_EN;
	}else{
		gpio_data |= SCL_EN;
	}
	iowrite32(gpio_data, ADDR(gpio_reg, gpio_t,dir23));
}
开发者ID:DavionKnight,项目名称:omc_aeu_60m,代码行数:17,代码来源:main.c

示例14: sqlite3DropTriggerPtr

/*
** Drop a trigger given a pointer to that trigger. 
*/
void sqlite3DropTriggerPtr(Parse *pParse, Trigger *pTrigger){
  Table   *pTable;
  Vdbe *v;
  sqlite3 *db = pParse->db;
  int iDb;

  iDb = sqlite3SchemaToIndex(pParse->db, pTrigger->pSchema);
  assert( iDb>=0 && iDb<db->nDb );
  pTable = tableOfTrigger(pTrigger);
  assert( pTable );
  assert( pTable->pSchema==pTrigger->pSchema || iDb==1 );
#ifndef SQLITE_OMIT_AUTHORIZATION
  {
    int code = SQLITE_DROP_TRIGGER;
    const char *zDb = db->aDb[iDb].zName;
    const char *zTab = SCHEMA_TABLE(iDb);
    if( iDb==1 ) code = SQLITE_DROP_TEMP_TRIGGER;
    if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
      sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){
      return;
    }
  }
#endif

  /* Generate code to destroy the database record of the trigger.
  */
  assert( pTable!=0 );
  if( (v = sqlite3GetVdbe(pParse))!=0 ){
    int base;
    static const int iLn = VDBE_OFFSET_LINENO(2);
    static const VdbeOpList dropTrigger[] = {
      { OP_Rewind,     0, ADDR(9),  0},
      { OP_String8,    0, 1,        0}, /* 1 */
      { OP_Column,     0, 1,        2},
      { OP_Ne,         2, ADDR(8),  1},
      { OP_String8,    0, 1,        0}, /* 4: "trigger" */
      { OP_Column,     0, 0,        2},
      { OP_Ne,         2, ADDR(8),  1},
      { OP_Delete,     0, 0,        0},
      { OP_Next,       0, ADDR(1),  0}, /* 8 */
    };

    sqlite3BeginWriteOperation(pParse, 0, iDb);
    sqlite3OpenMasterTable(pParse, iDb);
    base = sqlite3VdbeAddOpList(v,  ArraySize(dropTrigger), dropTrigger, iLn);
    sqlite3VdbeChangeP4(v, base+1, pTrigger->zName, P4_TRANSIENT);
    sqlite3VdbeChangeP4(v, base+4, "trigger", P4_STATIC);
    sqlite3ChangeCookie(pParse, iDb);
    sqlite3VdbeAddOp2(v, OP_Close, 0, 0);
    sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);
    if( pParse->nMem<3 ){
      pParse->nMem = 3;
    }
  }
}
开发者ID:AchironOS,项目名称:chromium-2,代码行数:58,代码来源:trigger.c

示例15: tx_scl

/*
** 函数功能:SCL引脚输出电平
** 输入参数:a=HIGH 输出高电平, a=LOW 输出低电平
** 输出参数:无
** 返回值:无
** 备注:
*/
void tx_scl(unsigned char a)
{
	tx_scl_en(HIGH);// 使能CPLD中SCL的方向,ARM->LASER
	set_dir_scl(OUT);
	gpio_data = SCL;
	if(a == HIGH){
		iowrite32(gpio_data, ADDR(gpio_reg, gpio_t, set_data01));
	}else{
		iowrite32(gpio_data, ADDR(gpio_reg, gpio_t, clr_data01));
	}
}
开发者ID:DavionKnight,项目名称:omc_aeu_60m,代码行数:18,代码来源:main.c


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