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

C++ deb_info函数代码示例

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

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



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

示例1: anysee_read_reg

static int anysee_read_reg(struct dvb_usb_device *d, u16 reg, u8 *val)
{
	u8 buf[] = {CMD_REG_READ, reg >> 8, reg & 0xff, 0x01};
	int ret;
	ret = anysee_ctrl_msg(d, buf, sizeof(buf), val, 1);
	deb_info("%s: reg:%04x val:%02x\n", __func__, reg, *val);
	return ret;
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:8,代码来源:anysee.c


示例2: ec168_probe

static int ec168_probe(struct usb_interface *intf,
	const struct usb_device_id *id)
{
	int ret;
	deb_info("%s: interface:%d\n", __func__,
		intf->cur_altsetting->desc.bInterfaceNumber);

	ret = dvb_usb_device_init(intf, &ec168_properties, THIS_MODULE, NULL,
		adapter_nr);
	if (ret)
		goto error;

	return ret;
error:
	deb_info("%s: failed:%d\n", __func__, ret);
	return ret;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:17,代码来源:ec168.c


示例3: az6007_streaming_ctrl

static int az6007_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
{
	struct dvb_usb_device *d = adap->dev;

	deb_info("%s: %s", __func__, onoff ? "enable" : "disable");

	return az6007_write(d, 0xbc, onoff, 0, NULL, 0);
}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:8,代码来源:az6007.c


示例4: mtvhd_fe_sleep

/* Sleep adapter */
static int mtvhd_fe_sleep(struct dvb_frontend *fe)
{
    struct mtvhd_fe_state *st = fe->demodulator_priv;

    deb_info("FE sleep\n");

    return mtvhd_asie560x_power_ctrl(st->adap, 0);
}
开发者ID:dtebbs,项目名称:dvb-usb-mtvhd,代码行数:9,代码来源:mtvhd-v1.c


示例5: ec168_streaming_ctrl

static int ec168_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
{
	struct ec168_req req = {STREAMING_CTRL, 0x7f01, 0x0202, 0, NULL};
	deb_info("%s: onoff:%d\n", __func__, onoff);
	if (onoff)
		req.index = 0x0102;
	return ec168_ctrl_msg(adap->dev, &req);
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:8,代码来源:ec168.c


示例6: lme2510_download_firmware

static int lme2510_download_firmware(struct dvb_usb_device *d,
					const struct firmware *fw)
{
	int ret = 0;
	u8 *data;
	u16 j, wlen, len_in, start, end;
	u8 packet_size, dlen, i;
	u8 *fw_data;

	packet_size = 0x31;
	len_in = 1;

	data = kzalloc(128, GFP_KERNEL);
	if (!data) {
		info("FRM Could not start Firmware Download"\
			"(Buffer allocation failed)");
		return -ENOMEM;
	}

	info("FRM Starting Firmware Download");

	for (i = 1; i < 3; i++) {
		start = (i == 1) ? 0 : 512;
		end = (i == 1) ? 512 : fw->size;
		for (j = start; j < end; j += (packet_size+1)) {
			fw_data = (u8 *)(fw->data + j);
			if ((end - j) > packet_size) {
				data[0] = i;
				dlen = packet_size;
			} else {
				data[0] = i | 0x80;
				dlen = (u8)(end - j)-1;
			}
			data[1] = dlen;
			memcpy(&data[2], fw_data, dlen+1);
			wlen = (u8) dlen + 4;
			data[wlen-1] = check_sum(fw_data, dlen+1);
			deb_info(1, "Data S=%02x:E=%02x CS= %02x", data[3],
				data[dlen+2], data[dlen+3]);
			lme2510_usb_talk(d, data, wlen, data, len_in);
			ret |= (data[0] == 0x88) ? 0 : -1;
		}
	}

	data[0] = 0x8a;
	len_in = 1;
	msleep(2000);
	lme2510_usb_talk(d, data, len_in, data, len_in);
	msleep(400);

	if (ret < 0)
		info("FRM Firmware Download Failed (%04x)" , ret);
	else
		info("FRM Firmware Download Completed - Resetting Device");

	kfree(data);
	return RECONNECTS_USB;
}
开发者ID:mdamt,项目名称:linux,代码行数:58,代码来源:lmedm04.c


示例7: lme2510_download_firmware

static int lme2510_download_firmware(struct usb_device *dev,
					const struct firmware *fw)
{
	int ret = 0;
	u8 data[512] = {0};
	u16 j, wlen, len_in, start, end;
	u8 packet_size, dlen, i;
	u8 *fw_data;

	packet_size = 0x31;
	len_in = 1;


	info("FRM Starting Firmware Download");

	for (i = 1; i < 3; i++) {
		start = (i == 1) ? 0 : 512;
		end = (i == 1) ? 512 : fw->size;
		for (j = start; j < end; j += (packet_size+1)) {
			fw_data = (u8 *)(fw->data + j);
			if ((end - j) > packet_size) {
				data[0] = i;
				dlen = packet_size;
			} else {
				data[0] = i | 0x80;
				dlen = (u8)(end - j)-1;
			}
		data[1] = dlen;
		memcpy(&data[2], fw_data, dlen+1);
		wlen = (u8) dlen + 4;
		data[wlen-1] = check_sum(fw_data, dlen+1);
		deb_info(1, "Data S=%02x:E=%02x CS= %02x", data[3],
				data[dlen+2], data[dlen+3]);
		ret |= lme2510_bulk_write(dev, data,  wlen, 1);
		ret |= lme2510_bulk_read(dev, data, len_in , 1);
		ret |= (data[0] == 0x88) ? 0 : -1;
		}
	}

	usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
			0x06, 0x80, 0x0200, 0x00, data, 0x0109, 1000);


	data[0] = 0x8a;
	len_in = 1;
	msleep(2000);
	ret |= lme2510_bulk_write(dev, data , len_in, 1); /*Resetting*/
	ret |= lme2510_bulk_read(dev, data, len_in, 1);
	msleep(400);

	if (ret < 0)
		info("FRM Firmware Download Failed (%04x)" , ret);
	else
		info("FRM Firmware Download Completed - Resetting Device");


	return (ret < 0) ? -ENODEV : 0;
}
开发者ID:LittleForker,项目名称:linux-2.6,代码行数:58,代码来源:lmedm04.c


示例8: get_rtl2832_ioctrl_8bit_demodbytes

int
get_rtl2832_ioctrl_8bit_demodbytes(
    struct dvb_frontend 		*fe,
    unsigned char 			page,
    unsigned char 			reg_addr,
    unsigned char*			data,
    unsigned short			bytelength)
{

    int ret = -1;
    int i=0;

    struct rtl2832_state*	p_state = fe->demodulator_priv;
    unsigned char data_temp[128];

    DVBT_NIM_MODULE 	*pNim;
    DVBT_DEMOD_MODULE 	*pDemod;

    deb_info("+%s: page= %d reg_addr=0x%x bytelength=%d \n", __FUNCTION__,page, reg_addr,bytelength);

    if (bytelength > 128 ) {
        deb_info("ERROR::bytelength > 128\n");
        return -1;
    }

    if (p_state->demod_type != RTL2832) {
        deb_info("ERROR::demod type not rtl2832u...\n");
        return -1;
    }
    pNim = p_state->pNim;
    if (pNim == NULL) {
        return -1;
    }
    if( mutex_lock_interruptible(&p_state->i2c_repeater_mutex) ) {
        return -1;
    }
    pDemod=pNim->pDemod;

    if(pDemod->SetRegPage(pDemod, page) != FUNCTION_SUCCESS) {
        ret=-1;
        goto error;
    }
    if(pDemod->GetRegBytes(pDemod, reg_addr, data_temp, bytelength) != FUNCTION_SUCCESS)	{
        ret=-1;
        goto error;
    }
    deb_info("->%s: data[%d,%x]= \n", __FUNCTION__,page, reg_addr);
    for (i=0; i<bytelength; i++) {
        data[i]=data_temp[i];
        deb_info("%x(%x),",data[i],data_temp[i]);
    }

    deb_info("\n");
    ret=0;
error:
    mutex_unlock(&p_state->i2c_repeater_mutex);
    deb_info("-%s: page=%d reg_addr=0x%x bytelength=%d \n", __FUNCTION__,page, reg_addr,bytelength);
    return ret;

}
开发者ID:ambrosa,项目名称:DVB-Realtek-RTL2832U-2.2.2-4_tuner,代码行数:60,代码来源:rtl2832u_ioctl.c


示例9: friio_streaming_ctrl

static int friio_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
{
	int ret;

	deb_info("%s called.(%d)\n", __func__, onoff);

	/* set the LED color and saturation (and LNB on) */
	if (onoff)
		ret = friio_ext_ctl(adap, 0x6400ff64, 1);
	else
		ret = friio_ext_ctl(adap, 0x96ff00ff, 1);

	if (ret != 1) {
		deb_info("%s failed to send cmdx. ret==%d\n", __func__, ret);
		return -EREMOTEIO;
	}
	return 0;
}
开发者ID:OpenStbV4l-dvb,项目名称:v4l-dvb,代码行数:18,代码来源:friio.c


示例10: lme2510_frontend_attach

static int lme2510_frontend_attach(struct dvb_usb_adapter *adap)
{
//	struct dvb_usb_device *d = i2c_get_adapdata(adap);
	u8 obuf[0x40] = { 0x06, 0x00, 0xcf, 0xba, 0xd0 };
	u8 ibuf[] = { 0 };
//	u8 obuf[0x40], ibuf[0x40];
//	int actlen, ret;

	if (lme2510_generic_rw(adap->dev, obuf, 5, ibuf, 1, 0) < 0) {
		err("command transfer failed.");
	}

	obuf[0] = 0x04;
	obuf[1] = 0x03;
	obuf[2] = 0x1c;
	obuf[3] = 0x00;
	obuf[4] = 0x11;

	if (lme2510_generic_rw(adap->dev, obuf, 0x40, ibuf, 1, 0) < 0)
			err("frontend transfer failed.");

	obuf[0] = 0x04;
	obuf[1] = 0x0c;
	obuf[2] = 0xc0;
	obuf[3] = 0x00;
	obuf[4] = 0x01;
	obuf[5] = 0x26;
	obuf[6] = 0x08;
	obuf[7] = 0x9a;
	obuf[8] = 0xf8;
	obuf[9] = 0x0e;
	obuf[10] = 0x83;
	obuf[11] = 0x80;
	obuf[12] = 0x1a;
	obuf[13] = 0xd4;
	obuf[14] = 0xff;

	if (lme2510_generic_rw(adap->dev, obuf, 0x40, ibuf, 1, 0) < 0)
			err("tuner transfer failed.");

	obuf[0] = 0x04;
	obuf[1] = 0x03;
	obuf[2] = 0x1c;
	obuf[3] = 0x00;
	obuf[4] = 0x01;

	if (lme2510_generic_rw(adap->dev, obuf, 0x40, ibuf, 1, 0) < 0)
			err("frontend transfer failed.");

	if ((adap->fe = dvb_attach(tda10086_attach, &tda10086_config,
				&adap->dev->i2c_adap)) == NULL) {
		deb_info("TDA10086 attach failed\n");
		return -ENODEV;
	}

	return 0;
}
开发者ID:gentooo,项目名称:s2-liplianin,代码行数:57,代码来源:lme2510.c


示例11: mtvhd_fe_read_signal_strength

static int mtvhd_fe_read_signal_strength(struct dvb_frontend *fe,
        u16 *strength)
{
    deb_info("FE read signal strength: ");

    *strength = 0;
    /* FIXME: tentatively return S/N */
    return mtvhd_fe_read_snr(fe, strength);
}
开发者ID:dtebbs,项目名称:dvb-usb-mtvhd,代码行数:9,代码来源:mtvhd-v1.c


示例12: mtvhd_asie560x_init

/* Initialize ASIE560x */
static int mtvhd_asie560x_init(struct dvb_usb_adapter *adap)
{
    struct mtvhd_adapter_state *st = adap->priv;
    int ret;
    u8 reg, crypto_mode;

    /* ASIE560x Power On */
    ret = mtvhd_asie560x_power_ctrl(adap, 1);
    if (ret != 0) {
        err("ASIE560x power on failed: %d", ret);
        return ret;
    }

    deb_info("ASIE560x[%d] init\n", adap->id);

    /* Probe ASIE560x and set crypto mode */
    crypto_mode = 0;
    ret = mtvhd_asie560x_probe(adap, 0x09);
    if (ret < 0) {
        err("ASIE560x probe failed: %d", ret);
        return ret;
    }
    switch (ret & 0x07) {
    case 0x04:
        crypto_mode = MTVHD_CRYPTO_XOR;
        break;

    case 0x06:
        crypto_mode = MTVHD_CRYPTO_DES;
        break;

    default:
        err("Unknown crypto mode - ASIE560x reg 9: %02x", ret);
    }
    ret = mtvhd_crypto_init(st, crypto_mode);
    if (ret != 0) {
        err("Failed to initialize crypto library (%02x): %d", crypto_mode, ret);
        /* continue without decryption */
    }

    ret = mtvhd_asie560x_reg_write(adap, 0x05, crypto_mode);
    if (ret != 0) {
        err("ASIE560x crypto mode setting failed: %d", ret);
        return ret;
    }
    /* Set crypto key on ASIE5606 (all 0) */
    for (reg = 0x10; reg < 0x20; reg++) {
        ret = mtvhd_asie560x_reg_write(adap, reg, 0x00);
        if (ret != 0) {
            err("ASIE560x crypto key setting failed: %d", ret);
            return ret;
        }
    }

    return ret;
}
开发者ID:dtebbs,项目名称:dvb-usb-mtvhd,代码行数:57,代码来源:mtvhd-v1.c


示例13: mxl111sf_adap_fe_init

static int mxl111sf_adap_fe_init(struct dvb_frontend *fe)
{
	struct dvb_usb_device *d = fe_to_d(fe);
	struct mxl111sf_state *state = fe_to_priv(fe);
	struct mxl111sf_adap_state *adap_state = &state->adap_state[fe->id];
	int err;

	/* exit if we didnt initialize the driver yet */
	if (!state->chip_id) {
		mxl_debug("driver not yet initialized, exit.");
		goto fail;
	}

	deb_info("%s()\n", __func__);

	mutex_lock(&state->fe_lock);

	state->alt_mode = adap_state->alt_mode;

	if (usb_set_interface(d->udev, 0, state->alt_mode) < 0)
		err("set interface failed");

	err = mxl1x1sf_soft_reset(state);
	mxl_fail(err);
	err = mxl111sf_init_tuner_demod(state);
	mxl_fail(err);
	err = mxl1x1sf_set_device_mode(state, adap_state->device_mode);

	mxl_fail(err);
	mxl111sf_enable_usb_output(state);
	mxl_fail(err);
	mxl1x1sf_top_master_ctrl(state, 1);
	mxl_fail(err);

	if ((MXL111SF_GPIO_MOD_DVBT != adap_state->gpio_mode) &&
	    (state->chip_rev > MXL111SF_V6)) {
		mxl111sf_config_pin_mux_modes(state,
					      PIN_MUX_TS_SPI_IN_MODE_1);
		mxl_fail(err);
	}
	err = mxl111sf_init_port_expander(state);
	if (!mxl_fail(err)) {
		state->gpio_mode = adap_state->gpio_mode;
		err = mxl111sf_gpio_mode_switch(state, state->gpio_mode);
		mxl_fail(err);
#if 0
		err = fe->ops.init(fe);
#endif
		msleep(100); /* add short delay after enabling
			      * the demod before touching it */
	}

	return (adap_state->fe_init) ? adap_state->fe_init(fe) : 0;
fail:
	return -ENODEV;
}
开发者ID:AICP,项目名称:kernel_moto_shamu,代码行数:56,代码来源:mxl111sf.c


示例14: ttusb2_frontend_tda10023_attach

static int ttusb2_frontend_tda10023_attach(struct dvb_usb_adapter *adap)
{
	if (usb_set_interface(adap->dev->udev, 0, 3) < 0)
		err("set interface to alts=3 failed");
	if ((adap->fe = dvb_attach(tda10023_attach, &tda10023_config, &adap->dev->i2c_adap, 0x48)) == NULL) {
		deb_info("TDA10023 attach failed\n");
		return -ENODEV;
	}
	return 0;
}
开发者ID:rrowicki,项目名称:Chrono_Kernel-1,代码行数:10,代码来源:ttusb2.c


示例15: mtvhd_fe_release

static void mtvhd_fe_release(struct dvb_frontend* fe)
{
    struct mtvhd_fe_state *st = fe->demodulator_priv;

    deb_info("FE release\n");

    mtvhd_crypto_release(st->adap->priv);
    kfree(fe->demodulator_priv);
    fe->demodulator_priv = NULL;
}
开发者ID:dtebbs,项目名称:dvb-usb-mtvhd,代码行数:10,代码来源:mtvhd-v1.c


示例16: mtvhd_fe_get_property

static int mtvhd_fe_get_property(struct dvb_frontend* fe,
                                 struct dtv_property *tvp)
{
    deb_info("FE get property (cmd = %x)\n", tvp->cmd);

    /* for recovery from DTV_CLEAR */
    fe->dtv_property_cache.delivery_system = SYS_ISDBT;

    return 0;
}
开发者ID:dtebbs,项目名称:dvb-usb-mtvhd,代码行数:10,代码来源:mtvhd-v1.c


示例17: ec168_module_init

/* module stuff */
static int __init ec168_module_init(void)
{
	int ret;
	deb_info("%s:\n", __func__);
	ret = usb_register(&ec168_driver);
	if (ret)
		err("module init failed:%d", ret);

	return ret;
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:11,代码来源:ec168.c


示例18: rtl2832u_tuner_attach

static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap)
{
	int ret;
	struct rtl28xxu_priv *priv = adap->dev->priv;
	struct dvb_frontend *fe;

	deb_info("%s:\n", __func__);

	switch (priv->tuner) {
	case TUNER_RTL2832_FC0012:
		fe = dvb_attach(fc0012_attach, adap->fe_adap[0].fe,
			&adap->dev->i2c_adap, 0xc6>>1, 0, FC_XTAL_28_8_MHZ);

		/* since fc0012 includs reading the signal strength delegate
		 * that to the tuner driver */
		adap->fe_adap[0].fe->ops.read_signal_strength = adap->fe_adap[0].
				fe->ops.tuner_ops.get_rf_strength;
		return 0;
		break;
	case TUNER_RTL2832_FC0013:
		fe = dvb_attach(fc0013_attach, adap->fe_adap[0].fe,
			&adap->dev->i2c_adap, 0xc6>>1, 0, FC_XTAL_28_8_MHZ);

		/* fc0013 also supports signal strength reading */
		adap->fe_adap[0].fe->ops.read_signal_strength = adap->fe_adap[0]
			.fe->ops.tuner_ops.get_rf_strength;
		return 0;
	default:
		fe = NULL;
		err("unknown tuner=%d", priv->tuner);
	}

	if (fe == NULL) {
		ret = -ENODEV;
		goto err;
	}

	return 0;
err:
	deb_info("%s: failed=%d\n", __func__, ret);
	return ret;
}
开发者ID:ARMWorks,项目名称:FA_2451_Linux_Kernel,代码行数:42,代码来源:rtl28xxu.c


示例19: flexcop_dma_remap

static int flexcop_dma_remap(struct flexcop_device *fc,
		flexcop_dma_index_t dma_idx,
		int onoff)
{
	flexcop_ibi_register r = (dma_idx & FC_DMA_1) ? dma1_00c : dma2_01c;
	flexcop_ibi_value v = fc->read_ibi_reg(fc,r);
	deb_info("%s\n",__func__);
	v.dma_0xc.remap_enable = onoff;
	fc->write_ibi_reg(fc,r,v);
	return 0;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:11,代码来源:flexcop-dma.c


示例20: lme2510_remote_keypress

static int lme2510_remote_keypress(struct dvb_usb_adapter *adap, u32 keypress)
{
	struct dvb_usb_device *d = adap->dev;

	deb_info(1, "INT Key Keypress =%04x", keypress);

	if (keypress > 0)
		rc_keydown(d->rc_dev, keypress, 0);

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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