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

C++ ADDR函数代码示例

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

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



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


示例16: spol_file

VOID spol_file(BYTE *fname, WORD tabexp, WORD prntr)
{
	spol_path = (LONG)ADDR(fname);
	spol_pbuf = (LONG)ADDR( spol_bufr );
	spol_prn = prntr;
	spol_sts = FALSE;
	spol_cntr = 0;
	spol_fcnt = 0;
	spol_texp = tabexp;
	spol_tcnt = 0;
	spol_gblk();	
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:12,代码来源:SPOL.C


示例17: file_exists

WORD file_exists(BYTE *dir, BYTE *name)
{
	BYTE f_name[80];

	strcpy( dir, f_name );
	strcat( f_name, name );
#if GEMDOS
	return( Fsfirst( ADDR(f_name), 0 ) );
#else
	return( dos_sfirst( ADDR(f_name), 0 ) );
#endif
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:12,代码来源:SPOL.C


示例18: main

int main()
{
  START_MACHINE;

  void print_heap(){
	int i;
	printf("printing heap\n");
	for (i=ADDR(0); i>=0; i--){
		printf("\t element %d: ", i);
		SHOW(" ",ADDR(i));
		}
	}
开发者ID:mustiman,项目名称:arch,代码行数:12,代码来源:example.c


示例19: hndl_spbut

VOID hndl_spbut(WORD ob)
{
	BYTE		*pstr;
	WORD		isok;
	WORD		i, j, k, remvd_1st, isgrafic;
	WORD		exists;
	BYTE		dir[ 80 ];
	BYTE		new_wc[ 14 ];
	BYTE		new_file[ 14 ];
	BYTE		dir_wc[ 80 ];
	

	if ( ob == ADDNAME ) 
	{
		strcpy(&gl_fname[0], "");
		fsel_input(ADDR(&gl_fspec[0]), ADDR(&gl_fname[0]), &isok); 
		strcpy( dir_wc, gl_fspec );
		strcpy( new_file, gl_fname );
		splt_dir( dir_wc, dir, new_wc );
		exists = file_exists( dir, new_file );
		if ( exists )
		{
			if ( (isok) &&
				(gl_fname[0]) &&
				(gl_fspec[0]) )
			{
				strcpy(&gl_fspol[0], &gl_fspec[0]);
				pstr = &gl_fspol[0];
				while (*pstr)
					pstr++;
				pstr--;
				while ( (*pstr) &&
					(*pstr != '\\') &&
					(*pstr != ':') )
					pstr--;
				if (*pstr)
					pstr++;
				strcpy(pstr, &gl_fname[0]);
				if ( istext( &gl_fname[0] ) )
					hndl_spmsg((WORD)strlen(&gl_fspol[0]), 
					(LONG)ADDR(&gl_fspol[0]), 1, FALSE, 0);
				else
				{
					form_alert(1, 
ADDR("[1][The Print Spooler is only able to|\
directly print text files.  If you wish|\
to print a graphic file in background,|\
go to the OUTPUT application, and select|\
the Print in Background option.][  OK  ]") );
				}
			}
		}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:52,代码来源:SPOL.C


示例20: sqliteDropProc

void sqliteDropProc(Parse *pParse, Token *pName){
  Object *pObj;
  char *zName;
  Vdbe *v = sqliteGetVdbe(pParse);
  sqlite *db = pParse->db;

  zName = sqliteStrNDup(pName->z, pName->n);
  sqliteDequote(zName);
  pObj = sqliteHashFind(&(db->aDb[0].objectHash), zName, pName->n+1);
  if( !pParse->explain && !pObj ){
    sqliteErrorMsg(pParse, "no such object: %T", pName);
    goto dropobject_cleanup;
  }

  /* Generate code to destroy the database record of the trigger.
  */
  if( v ){
    int base;
    static VdbeOpList dropObject[] = {
      { OP_Rewind,     0, ADDR(9),  0},
      { OP_String,     0, 0,        0}, /* 1 */
      { OP_Column,     0, 1,        0},
      { OP_Ne,         0, ADDR(8),  0},
      { OP_String,     0, 0,        "procedure"},
      { OP_Column,     0, 0,        0},
      { OP_Ne,         0, ADDR(8),  0},
      { OP_Delete,     0, 0,        0},
      { OP_Next,       0, ADDR(1),  0}, /* 8 */
    };

    sqliteBeginWriteOperation(pParse, 0, 0);
    sqliteOpenMasterTable(v, 0);
    base = sqliteVdbeAddOpList(v,  ArraySize(dropObject), dropObject);
    sqliteVdbeChangeP3(v, base+1, zName, 0);
    if( pObj && pObj->iDb==0 ){
      sqliteChangeCookie(db, v);
    }
    sqliteVdbeAddOp(v, OP_Close, 0, 0);
    sqliteEndWriteOperation(pParse);
  }

  /*
   * If this is not an "explain", then delete the trigger structure.
   */
  if( !pParse->explain ){
    sqliteHashInsert(&(db->aDb[pObj->iDb].objectHash), zName, pName->n+1, 0);
    sqliteDeleteObject(pObj);
  }

dropobject_cleanup:
  sqliteFree(zName);
}
开发者ID:araymund,项目名称:sqlite-2.8.17-proc,代码行数:52,代码来源:proc.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ADDRESS_MAP_NAME函数代码示例发布时间:2022-05-30
下一篇:
C++ ADDMSG函数代码示例发布时间: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