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


C++ dbg函数代码示例

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


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

示例1: snmp_rsa_set_power_state

SaErrorT snmp_rsa_set_power_state(void *hnd, SaHpiResourceIdT id,
				  SaHpiHsPowerStateT state)
{
	gchar *oid;
	int rtn_code = SA_OK;
        struct snmp_value set_value;
        struct oh_handler_state *handle = (struct oh_handler_state *)hnd;
        struct snmp_rsa_hnd *custom_handle = (struct snmp_rsa_hnd *)handle->data;

        SaHpiRptEntryT *res = oh_get_resource_by_id(handle->rptcache, id);
	if(res == NULL) {
		return SA_ERR_HPI_NOT_PRESENT;
	}
        struct RSA_ResourceInfo *s =
                (struct RSA_ResourceInfo *)oh_get_resource_data(handle->rptcache, id);
	if(s == NULL) {
		return -1;
	}
	if(s->mib.OidPowerOnOff == NULL) { 
		return SA_ERR_HPI_INVALID_CMD; 
	}

	oid = snmp_derive_objid(res->ResourceEntity, s->mib.OidPowerOnOff);
	if(oid == NULL) {
		dbg("NULL SNMP OID returned for %s\n",s->mib.OidPowerOnOff);
		return -1;
	}

	set_value.type = ASN_INTEGER;
	set_value.str_len = 1;
	switch (state) {
	case SAHPI_HS_POWER_OFF:
		set_value.integer = 0;
		if((snmp_set(custom_handle->ss, oid, set_value) != 0)) {
			dbg("SNMP could not set %s; Type=%d.\n",s->mib.OidPowerOnOff,set_value.type);
			rtn_code = SA_ERR_HPI_NO_RESPONSE;
		}
		break;
		
	case SAHPI_HS_POWER_ON:
		set_value.integer = 1;
		if((snmp_set(custom_handle->ss, oid, set_value) != 0)) {
			dbg("SNMP could not set %s; Type=%d.\n",s->mib.OidPowerOnOff,set_value.type);
			rtn_code = SA_ERR_HPI_NO_RESPONSE;
		}
		break;
		
	case SAHPI_HS_POWER_CYCLE:
	        {
			SaHpiResetActionT act = SAHPI_COLD_RESET;
			rtn_code=snmp_rsa_set_reset_state(hnd, id, act);
	        }
		break;
	default:
		dbg("Invalid Power Action Type - %d\n", state);
		rtn_code = SA_ERR_HPI_INVALID_PARAMS;
	}

	g_free(oid);
        return rtn_code;
}
开发者ID:openhpi1,项目名称:testrepo,代码行数:61,代码来源:snmp_rsa_hotswap.c

示例2: save_kbm_conf

void save_kbm_conf()
{
  if (kbm_widget == NULL)
  {
    fprintf(stderr, "save_kbm_conf: kbm_widget is NULL!\n");
    return;
  }

  int idx = gtk_combo_box_get_active (GTK_COMBO_BOX (opt_kbm_opts));

  int idx_selkeys = gtk_combo_box_get_active (GTK_COMBO_BOX (opt_selkeys));

  pho_candicate_col_N = (int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinner_pho_candicate_col_N));

  if (pho_candicate_col_N > strlen(selkeys[idx_selkeys].kstr))
    pho_candicate_col_N = strlen(selkeys[idx_selkeys].kstr);

  dbg("pho_candicate_col_N %d\n", pho_candicate_col_N);

  char tt[128];
  sprintf(tt, "%s %s %d %d", kbm_sel[idx].kbm, selkeys[idx_selkeys].kstr, pho_candicate_col_N, selkeys[idx_selkeys].RL);

  char phokbm_name[128];
  get_hime_conf_fstr(PHONETIC_KEYBOARD, phokbm_name, "");

  if (strcmp(phokbm_name, tt)) {
    save_hime_conf_str(PHONETIC_KEYBOARD_BAK, phokbm_name);
  }
  save_hime_conf_str(PHONETIC_KEYBOARD, tt);

  save_tsin_eng_pho_key();

  save_hime_conf_int(TSIN_SPACE_OPT,
                     tsin_space_options[new_select_idx_tsin_space_opt].key);

  save_hime_conf_int(TSIN_PHRASE_PRE_SELECT,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_phrase_pre_select)));

  save_hime_conf_int(PHONETIC_CHAR_DYNAMIC_SEQUENCE,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_phonetic_char_dynamic_sequence)));
  save_hime_conf_int(PHO_HIDE_ROW2,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_pho_hide_row2)));

  save_hime_conf_int(PHO_IN_ROW1,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_pho_in_row1)));

  save_hime_conf_int(PHONETIC_HUGE_TAB,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_phonetic_huge_tab)));

  save_hime_conf_int(TSIN_TONE_CHAR_INPUT,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tone_char_input)));

  save_hime_conf_int(TSIN_USE_PHO_NEAR,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_use_pho_near)));


  save_hime_conf_int(TSIN_TAB_PHRASE_END,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tab_phrase_end)));


  save_hime_conf_int(TSIN_TAIL_SELECT_KEY,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_tail_select_key)));

  save_hime_conf_int(TSIN_BUFFER_EDITING_MODE,
       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_tsin_buffer_editing_mode)));

  tsin_buffer_size = (int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinner_tsin_buffer_size));
  save_hime_conf_int(TSIN_BUFFER_SIZE, tsin_buffer_size);

#if 0
  gchar *cstr;
  cstr = gtk_color_selection_palette_to_string(&tsin_phrase_line_gcolor, 1);
  dbg("color %s\n", cstr);
  save_hime_conf_str(TSIN_PHRASE_LINE_COLOR, cstr);
  g_free(cstr);
#endif


  save_omni_config();
  /* caleb- does found where "reload kbm" is used.
   * caleb- think the send_hime_message() here does nothing.
   */
  send_hime_message(GDK_DISPLAY(), "reload kbm");
}
开发者ID:czchen,项目名称:hime,代码行数:84,代码来源:hime-setup-pho.c

示例3: dbg

HRESULT IDXGISwapChainNew::Present(UINT SyncInterval,UINT Flags)
{
  if(newbb11)
    dbg("dxgi_sc: BB11 Present %d %d", SyncInterval, newbb11);
  else if(newbb10)
    dbg("dxgi_sc: BB10 Present %d %d", SyncInterval, newbb10);

  if(!newbb10 && !newbb11) {
    // Not multihead mode, plain old present
    dbg("dxgi_sc: Not multihead, just plain present");
    return dxgsc->Present(SyncInterval, Flags);
  }

  #if defined(SOFTTHMAIN) || defined(D3D11)
  if(dev11)
  {
    D3D11_TEXTURE2D_DESC dt, ds;
    dbg("dxgi_sc: realbbdesc11... %d", realbb11);
    realbb11->GetDesc(&dt);
    newbb11->GetDesc(&ds);

    dbg("dxgi_sc: Source           : %dx%d ms%d %s", ds.Width, ds.Height, ds.SampleDesc.Count, getFormatDXGI(ds.Format));
    dbg("dxgi_sc: Primary Head     : %dx%d ms%d %s", dt.Width, dt.Height, dt.SampleDesc.Count, getFormatDXGI(dt.Format));

    // Copy and Present the Primary Head
    HEAD *h = config.getPrimaryHead();
    D3D11_BOX sb = {h->sourceRect.left, h->sourceRect.top, 0, h->sourceRect.right, h->sourceRect.bottom, 1};
    ID3D11DeviceContext *dev11context;
    dev11->GetImmediateContext(&dev11context);
    dev11context->CopySubresourceRegion(realbb11, 0, 0, 0, 0, newbb11, 0, &sb);

    /*if(GetKeyState('O') < 0)
      D3DX11SaveTextureToFile(realbb10, D3DX10_IFF_JPG, "d:\\pelit\\_realbb.jpg");
    if(GetKeyState('P') < 0)
      D3DX11SaveTextureToFile(newbb10, D3DX10_IFF_JPG, "d:\\pelit\\_newbb.jpg");*/

    // If we have non-local adapters, stage a copy of the buffer for non-local access
    /*if (has_nonlocal) {
      // Copy from the main backbuffer to the main staged texture
      dev11context->CopyResource(newbb11staged,newbb11);
      // Map the main staged texture
      D3D11_MAPPED_SUBRESOURCE submain;
      dev11context->Map(newbb11staged, 0, D3D11_MAP_READ, 0, &submain);
    }*/




    // Copy and Present Secondary Heads
    for(int i=0;i<numDevs;i++)
    {
      OUTDEVICE11 *o  = &outDevs11[i];
      STAGINGOUT11 *so = &stagingOuts11[i];

      o->localSurf->GetDesc(&dt);
      dbg("dxgi_sc: Secondary Head %d : %dx%d ms%d %s", i+1, dt.Width, dt.Height, dt.SampleDesc.Count, getFormatDXGI(dt.Format));
      sb = {o->cfg->sourceRect.left, o->cfg->sourceRect.top, 0, o->cfg->sourceRect.right, o->cfg->sourceRect.bottom, 1};

      // Check if the head is local and copy accordingly
      if (o->cfg->transportMethod == OUTMETHOD_LOCAL) {
        // Local head (on the primary video adapter)
        // - just copy the region directly to the head's localSurf
        dbg("dxgi_sc: Local head: CopySubresourceRegion");
        dev11context->CopySubresourceRegion(o->localSurf, 0, 0, 0, 0, newbb11, 0, &sb);
      } else {
        // Non-local head (on a secondary adapter
        dbg("dxgi_sc: Non-local head: Map/Unmap");
        // Copy from the main backbuffer to the main staged texture
        dev11context->CopySubresourceRegion(so->stagingSurf, 0, 0, 0, 0, newbb11, 0, &sb);
        // Map the main staged texture
        D3D11_MAPPED_SUBRESOURCE submain;
        if (dev11context->Map(so->stagingSurf, 0, D3D11_MAP_READ, 0, &submain) != S_OK)
          dbg("Mapping Main staging surface failed!");
        // Map the head's staged texture
        D3D11_MAPPED_SUBRESOURCE subhead;
        if (o->output->devContext->Map(o->output->stagingSurface, 0, D3D11_MAP_WRITE, 0, &subhead) != S_OK)
          dbg("Mapping Head %d staging surface failed!",i+1);
        // Copy from the main staged texture to the head's staged texture
        memcpy(subhead.pData, submain.pData, dt.Width*dt.Height*4);
        // Unmap the head's staged texture
        o->output->devContext->Unmap(o->output->stagingSurface, 0);
        // Unmap the main staged texture
        dev11context->Unmap(so->stagingSurf, 0);
        // Copy from head's staged texture to the head's localSurf
        o->output->devContext->CopyResource(o->localSurf, o->output->stagingSurface);
        //o->output->devContext->CopySubresourceRegion(o->localSurf, 0, 0, 0, 0, o->output->stagingSurface, 0, NULL);
        // Release the main staged texture
        //so->stagingSurf->Release();
      }

      /*if (has_nonlocal) {
        // Unmap the main staged texture
        dev11context->Unmap(newbb11staged, 0);
      }*/

      // Flush the main render pipeline (full SoftTH buffer)
      dev11context->Flush(); // DOESN'T APPEAR TO BE A NEED TO DO THIS MANUALLY!!!

      // Draw each secondary output
      o->output->present();
//.........这里部分代码省略.........
开发者ID:KimimaroTsukimiya,项目名称:SoftTH,代码行数:101,代码来源:dxgiSwapChain.cpp

示例4: dbg

void c_haship_addr::print(ostream &ostr) const {
	string_as_hex dbg( string_as_bin(*this) );
	ostr << "hip:" << dbg.get();
}
开发者ID:damianbb,项目名称:galaxy42,代码行数:4,代码来源:haship.cpp

示例5: s3cmci_setup_data

static int s3cmci_setup_data(struct s3cmci_host *host, struct mmc_data *data)
{
	u32 dcon, imsk, stoptries = 3;

	/* write DCON register */

	if (!data) {
		writel(0, host->base + S3C2410_SDIDCON);
		return 0;
	}

	if ((data->blksz & 3) != 0) {
		/* We cannot deal with unaligned blocks with more than
		 * one block being transfered. */

		if (data->blocks > 1)
			return -EINVAL;

		/* No support yet for non-word block transfers. */
		return -EINVAL;
	}

	while (readl(host->base + S3C2410_SDIDSTA) &
	       (S3C2410_SDIDSTA_TXDATAON | S3C2410_SDIDSTA_RXDATAON)) {

		dbg(host, dbg_err,
		    "mci_setup_data() transfer stillin progress.\n");

		writel(S3C2410_SDIDCON_STOP, host->base + S3C2410_SDIDCON);
		s3cmci_reset(host);

		if ((stoptries--) == 0) {
			dbg_dumpregs(host, "DRF");
			return -EINVAL;
		}
	}

	dcon  = data->blocks & S3C2410_SDIDCON_BLKNUM_MASK;

	if (host->dodma)
		dcon |= S3C2410_SDIDCON_DMAEN;

	if (host->bus_width == MMC_BUS_WIDTH_4)
		dcon |= S3C2410_SDIDCON_WIDEBUS;

	if (!(data->flags & MMC_DATA_STREAM))
		dcon |= S3C2410_SDIDCON_BLOCKMODE;

	if (data->flags & MMC_DATA_WRITE) {
		dcon |= S3C2410_SDIDCON_TXAFTERRESP;
		dcon |= S3C2410_SDIDCON_XFER_TXSTART;
	}

	if (data->flags & MMC_DATA_READ) {
		dcon |= S3C2410_SDIDCON_RXAFTERCMD;
		dcon |= S3C2410_SDIDCON_XFER_RXSTART;
	}

	if (host->is2440) {
		dcon |= S3C2440_SDIDCON_DS_WORD;
		dcon |= S3C2440_SDIDCON_DATSTART;
	}

	writel(dcon, host->base + S3C2410_SDIDCON);

	/* write BSIZE register */

	writel(data->blksz, host->base + S3C2410_SDIBSIZE);

	/* add to IMASK register */
	imsk = S3C2410_SDIIMSK_FIFOFAIL | S3C2410_SDIIMSK_DATACRC |
	       S3C2410_SDIIMSK_DATATIMEOUT | S3C2410_SDIIMSK_DATAFINISH;

	enable_imask(host, imsk);

	/* write TIMER register */

	if (host->is2440) {
		writel(0x007FFFFF, host->base + S3C2410_SDITIMER);
	} else {
		writel(0x0000FFFF, host->base + S3C2410_SDITIMER);

		/* FIX: set slow clock to prevent timeouts on read */
		if (data->flags & MMC_DATA_READ)
			writel(0xFF, host->base + S3C2410_SDIPRE);
	}

	return 0;
}
开发者ID:maraz,项目名称:linux-2.6,代码行数:89,代码来源:s3cmci.c

示例6: iowarrior_ioctl

/**
 *	iowarrior_ioctl
 */
static long iowarrior_ioctl(struct file *file, unsigned int cmd,
							unsigned long arg)
{
	struct iowarrior *dev = NULL;
	__u8 *buffer;
	__u8 __user *user_buffer;
	int retval;
	int io_res;		/* checks for bytes read/written and copy_to/from_user results */

	dev = file->private_data;
	if (dev == NULL) {
		return -ENODEV;
	}

	buffer = kzalloc(dev->report_size, GFP_KERNEL);
	if (!buffer)
		return -ENOMEM;

	/* lock this object */
	mutex_lock(&iowarrior_mutex);
	mutex_lock(&dev->mutex);

	/* verify that the device wasn't unplugged */
	if (!dev->present) {
		retval = -ENODEV;
		goto error_out;
	}

	dbg("%s - minor %d, cmd 0x%.4x, arg %ld", __func__, dev->minor, cmd,
	    arg);

	retval = 0;
	io_res = 0;
	switch (cmd) {
	case IOW_WRITE:
		if (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW24 ||
		    dev->product_id == USB_DEVICE_ID_CODEMERCS_IOWPV1 ||
		    dev->product_id == USB_DEVICE_ID_CODEMERCS_IOWPV2 ||
		    dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW40) {
			user_buffer = (__u8 __user *)arg;
			io_res = copy_from_user(buffer, user_buffer,
						dev->report_size);
			if (io_res) {
				retval = -EFAULT;
			} else {
				io_res = usb_set_report(dev->interface, 2, 0,
							buffer,
							dev->report_size);
				if (io_res < 0)
					retval = io_res;
			}
		} else {
			retval = -EINVAL;
			dev_err(&dev->interface->dev,
				"ioctl 'IOW_WRITE' is not supported for product=0x%x.\n",
				dev->product_id);
		}
		break;
	case IOW_READ:
		user_buffer = (__u8 __user *)arg;
		io_res = usb_get_report(dev->udev,
					dev->interface->cur_altsetting, 1, 0,
					buffer, dev->report_size);
		if (io_res < 0)
			retval = io_res;
		else {
			io_res = copy_to_user(user_buffer, buffer, dev->report_size);
			if (io_res)
				retval = -EFAULT;
		}
		break;
	case IOW_GETINFO:
		{
			/* Report available information for the device */
			struct iowarrior_info info;
			/* needed for power consumption */
			struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc;

			memset(&info, 0, sizeof(info));
			/* directly from the descriptor */
			info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor);
			info.product = dev->product_id;
			info.revision = le16_to_cpu(dev->udev->descriptor.bcdDevice);

			/* 0==UNKNOWN, 1==LOW(usb1.1) ,2=FULL(usb1.1), 3=HIGH(usb2.0) */
			info.speed = le16_to_cpu(dev->udev->speed);
			info.if_num = dev->interface->cur_altsetting->desc.bInterfaceNumber;
			info.report_size = dev->report_size;

			/* serial number string has been read earlier 8 chars or empty string */
			memcpy(info.serial, dev->chip_serial,
			       sizeof(dev->chip_serial));
			if (cfg_descriptor == NULL) {
				info.power = -1;	/* no information available */
			} else {
				/* the MaxPower is stored in units of 2mA to make it fit into a byte-value */
				info.power = cfg_descriptor->bMaxPower * 2;
//.........这里部分代码省略.........
开发者ID:rrowicki,项目名称:Chrono_Kernel-1,代码行数:101,代码来源:iowarrior.c

示例7: opengl_endpage

void opengl_endpage(struct _gfxdevice*dev)
{
    dbg("endpage");
}
开发者ID:GaetanBeurrier,项目名称:Refresh,代码行数:4,代码来源:opengl.c

示例8: opengl_result_save

int opengl_result_save(struct _gfxresult*gfx, const char*filename)
{
    dbg("result:save");
    return 0;
}
开发者ID:GaetanBeurrier,项目名称:Refresh,代码行数:5,代码来源:opengl.c

示例9: opengl_fillgradient

void opengl_fillgradient(struct _gfxdevice*dev, gfxline_t*line, gfxgradient_t*gradient, gfxgradienttype_t type, gfxmatrix_t*matrix)
{
    dbg("fillgradient");
}
开发者ID:GaetanBeurrier,项目名称:Refresh,代码行数:4,代码来源:opengl.c

示例10: opengl_drawlink

void opengl_drawlink(struct _gfxdevice*dev, gfxline_t*line, const char*action)
{
    dbg("link");
}
开发者ID:GaetanBeurrier,项目名称:Refresh,代码行数:4,代码来源:opengl.c

示例11: opengl_fillbitmap

void opengl_fillbitmap(struct _gfxdevice*dev, gfxline_t*line, gfximage_t*img, gfxmatrix_t*matrix, gfxcxform_t*cxform)
{
    dbg("fillbitmap");
    internal_t*i = (internal_t*)dev->internal;
    char running = 0;
    int len = 0;
    double*xyz=0;
    gfxline_t*l=0;
    glColor4f(1.0,0,0.7,1.0);
    
    i->currentz ++;
  
    imgopengl_t* txt = addTexture(img);

    gfxmatrix_t m2;
    gfxmatrix_invert(matrix, &m2);
    m2.m00 /= txt->width;
    m2.m10 /= txt->width;
    m2.tx /= txt->width;
    m2.m01 /= txt->height;
    m2.m11 /= txt->height;
    m2.ty /= txt->height;

    glEnable(GL_TEXTURE_2D);
    glBindTexture(GL_TEXTURE_2D, txt->texID);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
    
    gluTessBeginPolygon(i->tesselator_tex, NULL);
    l = line;
    len = 0;
    while(l) {
	len++;
	l = l->next;
    }
    xyz = malloc(sizeof(double)*5*len);
    l = line;
    len = 0;
    while(l) {
	if(l->type == gfx_moveTo) {
	    if(running) {
		running = 0;
		gluTessEndContour(i->tesselator_tex);
	    }
	}
	if(!running) {
	    running = 1;
	    gluTessBeginContour(i->tesselator_tex);
	}

	xyz[len*5+0] = l->x;
	xyz[len*5+1] = l->y;
	xyz[len*5+2] = (i->currentz*ZSTEP);
	xyz[len*5+3] = 0;
	xyz[len*5+4] = 0;
	gfxmatrix_transform(&m2, /*src*/&xyz[len*5+0], /*dest*/&xyz[len*5+3]);

	gluTessVertex(i->tesselator_tex, &xyz[len*5], &xyz[len*5]);
	len++;

	l=l->next;
    }

    if(running) {
	running = 0;
	gluTessEndContour(i->tesselator_tex);
    }
    gluTessEndPolygon(i->tesselator_tex);
    free(xyz);
    
    glDisable(GL_TEXTURE_2D);
}
开发者ID:GaetanBeurrier,项目名称:Refresh,代码行数:75,代码来源:opengl.c

示例12: opengl_endclip

void opengl_endclip(struct _gfxdevice*dev)
{
    dbg("endclip");
}
开发者ID:GaetanBeurrier,项目名称:Refresh,代码行数:4,代码来源:opengl.c

示例13: opengl_startclip

void opengl_startclip(struct _gfxdevice*dev, gfxline_t*line)
{
    dbg("startclip");
}
开发者ID:GaetanBeurrier,项目名称:Refresh,代码行数:4,代码来源:opengl.c

示例14: s3cmci_irq

static irqreturn_t s3cmci_irq(int irq, void *dev_id)
{
	struct s3cmci_host *host = dev_id;
	struct mmc_command *cmd;
	u32 mci_csta, mci_dsta, mci_fsta, mci_dcnt, mci_imsk;
	u32 mci_cclear, mci_dclear;
	unsigned long iflags;

	spin_lock_irqsave(&host->complete_lock, iflags);

	mci_csta = readl(host->base + S3C2410_SDICMDSTAT);
	mci_dsta = readl(host->base + S3C2410_SDIDSTA);
	mci_dcnt = readl(host->base + S3C2410_SDIDCNT);
	mci_fsta = readl(host->base + S3C2410_SDIFSTA);
	mci_imsk = readl(host->base + host->sdiimsk);
	mci_cclear = 0;
	mci_dclear = 0;

	if ((host->complete_what == COMPLETION_NONE) ||
	    (host->complete_what == COMPLETION_FINALIZE)) {
		host->status = "nothing to complete";
		clear_imask(host);
		goto irq_out;
	}

	if (!host->mrq) {
		host->status = "no active mrq";
		clear_imask(host);
		goto irq_out;
	}

	cmd = host->cmd_is_stop ? host->mrq->stop : host->mrq->cmd;

	if (!cmd) {
		host->status = "no active cmd";
		clear_imask(host);
		goto irq_out;
	}

	if (!host->dodma) {
		if ((host->pio_active == XFER_WRITE) &&
		    (mci_fsta & S3C2410_SDIFSTA_TFDET)) {

			disable_imask(host, S3C2410_SDIIMSK_TXFIFOHALF);
			tasklet_schedule(&host->pio_tasklet);
			host->status = "pio tx";
		}

		if ((host->pio_active == XFER_READ) &&
		    (mci_fsta & S3C2410_SDIFSTA_RFDET)) {

			disable_imask(host,
				      S3C2410_SDIIMSK_RXFIFOHALF |
				      S3C2410_SDIIMSK_RXFIFOLAST);

			tasklet_schedule(&host->pio_tasklet);
			host->status = "pio rx";
		}
	}

	if (mci_csta & S3C2410_SDICMDSTAT_CMDTIMEOUT) {
		dbg(host, dbg_err, "CMDSTAT: error CMDTIMEOUT\n");
		cmd->error = -ETIMEDOUT;
		host->status = "error: command timeout";
		goto fail_transfer;
	}

	if (mci_csta & S3C2410_SDICMDSTAT_CMDSENT) {
		if (host->complete_what == COMPLETION_CMDSENT) {
			host->status = "ok: command sent";
			goto close_transfer;
		}

		mci_cclear |= S3C2410_SDICMDSTAT_CMDSENT;
	}

	if (mci_csta & S3C2410_SDICMDSTAT_CRCFAIL) {
		if (cmd->flags & MMC_RSP_CRC) {
			if (host->mrq->cmd->flags & MMC_RSP_136) {
				dbg(host, dbg_irq,
				    "fixup: ignore CRC fail with long rsp\n");
			} else {
				/* note, we used to fail the transfer
				 * here, but it seems that this is just
				 * the hardware getting it wrong.
				 *
				 * cmd->error = -EILSEQ;
				 * host->status = "error: bad command crc";
				 * goto fail_transfer;
				*/
			}
		}

		mci_cclear |= S3C2410_SDICMDSTAT_CRCFAIL;
	}

	if (mci_csta & S3C2410_SDICMDSTAT_RSPFIN) {
		if (host->complete_what == COMPLETION_RSPFIN) {
			host->status = "ok: command response received";
			goto close_transfer;
//.........这里部分代码省略.........
开发者ID:maraz,项目名称:linux-2.6,代码行数:101,代码来源:s3cmci.c

示例15: opengl_result_get

void* opengl_result_get(struct _gfxresult*gfx, const char*name)
{
    dbg("result:get");
    return 0;
}
开发者ID:GaetanBeurrier,项目名称:Refresh,代码行数:5,代码来源:opengl.c


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