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

C++ send_vector函数代码示例

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

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



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

示例1: issp_read_block

int issp_read_block(struct issp_host *host, uint8_t block_idx, uint8_t addr,
			uint8_t *buf, int len)
{
	int blk_size, i;
	int ret;

	blk_size = host->pdata->block_size;
	len = len + addr > blk_size ? blk_size - addr : len;
	if (!len)
		return 0;

	ret = issp_block_verify_setup(host, block_idx);
	if (ret)
		return ret;

	ret = issp_check_status(host);
	if (ret)
		return ret;

	send_vector(host, vec_sync_enable, bits_sync_enable);
	send_vector(host, vec_read_write_setup, bits_read_write_setup);

	for (i = 0; i < len; i++)
		buf[i] = issp_read_byte_at(host, addr++);

	send_vector(host, vec_sync_disable, bits_sync_disable);

	return len;
}
开发者ID:coreentin,项目名称:android_kernel_nvidia_s8515,代码行数:29,代码来源:issp_steps.c


示例2: issp_prog_verify_block

static int issp_prog_verify_block(struct issp_host *host, uint8_t idx)
{
	send_vector(host, vec_sync_enable, bits_sync_enable);
	send_vector(host, vec_set_block_num, bits_set_block_num);
	pin_data_out(host);
	send_bits(host, &idx, 8);
	send_vector(host, vec_set_block_num_end, bits_set_block_num_end);
	send_vector(host, vec_sync_disable, bits_sync_disable);
	send_vector(host, vec_program_and_verify, bits_program_and_verify);

	return wait_and_poll(host);
}
开发者ID:coreentin,项目名称:android_kernel_nvidia_s8515,代码行数:12,代码来源:issp_steps.c


示例3: issp_send_block

static void issp_send_block(struct issp_host *host)
{
	uint8_t addr = 0;

	send_vector(host, vec_sync_enable, bits_sync_enable);
	send_vector(host, vec_read_write_setup, bits_read_write_setup);

	pin_data_out(host);
	while (addr < host->pdata->block_size)
		issp_write_byte(host, addr++, issp_fw_get_byte(host));
	pin_data_z(host);
}
开发者ID:coreentin,项目名称:android_kernel_nvidia_s8515,代码行数:12,代码来源:issp_steps.c


示例4: issp_read_byte_at

static uint8_t issp_read_byte_at(struct issp_host *host, uint8_t addr)
{
	uint8_t address = addr << 1, data;

	send_vector(host, vec_read_byte_v[0], bits_read_byte_v[0]);
	pin_data_out(host);
	send_bits(host, &address, 7);
	generate_clocks(host, 2);
	data = read_byte(host);
	send_vector(host, vec_read_byte_v[1], bits_read_byte_v[1]);

	return data;
}
开发者ID:coreentin,项目名称:android_kernel_nvidia_s8515,代码行数:13,代码来源:issp_steps.c


示例5: set_meters_on

static void set_meters_on(struct echoaudio *chip, char on)
{
	if (on && !chip->meters_enabled) {
		send_vector(chip, DSP_VC_METERS_ON);
		chip->meters_enabled = 1;
	} else if (!on && chip->meters_enabled) {
		send_vector(chip, DSP_VC_METERS_OFF);
		chip->meters_enabled = 0;
		memset((s8 *)chip->comm_page->vu_meter, ECHOGAIN_MUTED,
		       DSP_MAXPIPES);
		memset((s8 *)chip->comm_page->peak_meter, ECHOGAIN_MUTED,
		       DSP_MAXPIPES);
	}
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:14,代码来源:echoaudio_dsp.c


示例6: restore_dsp_rettings

static int restore_dsp_rettings(struct echoaudio *chip)
{
	int err;
	DE_INIT(("restore_dsp_settings\n"));

	if ((err = check_asic_status(chip)) < 0)
		return err;

	/* @ Gina20/Darla20 only. Should be harmless for other cards. */
	chip->comm_page->gd_clock_state = GD_CLOCK_UNDEF;
	chip->comm_page->gd_spdif_status = GD_SPDIF_STATUS_UNDEF;
	chip->comm_page->handshake = 0xffffffff;

	if ((err = set_sample_rate(chip, chip->sample_rate)) < 0)
		return err;

	if (chip->meters_enabled)
		if (send_vector(chip, DSP_VC_METERS_ON) < 0)
			return -EIO;

#ifdef ECHOCARD_HAS_EXTERNAL_CLOCK
	if (set_input_clock(chip, chip->input_clock) < 0)
		return -EIO;
#endif

#ifdef ECHOCARD_HAS_OUTPUT_CLOCK_SWITCH
	if (set_output_clock(chip, chip->output_clock) < 0)
		return -EIO;
#endif

	if (update_output_line_level(chip) < 0)
		return -EIO;

	if (update_input_line_level(chip) < 0)
		return -EIO;

#ifdef ECHOCARD_HAS_VMIXER
	if (update_vmixer_level(chip) < 0)
		return -EIO;
#endif

	if (wait_handshake(chip) < 0)
		return -EIO;
	clear_handshake(chip);

	DE_INIT(("restore_dsp_rettings done\n"));
	return send_vector(chip, DSP_VC_UPDATE_FLAGS);
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:48,代码来源:echoaudio_dsp.c


示例7: send_uint32

void GameObjectMessage::send(uint32_t object_id, GameObject *game_object) {
  send_uint32(socket_, object_id);
  send_vector(socket_, game_object->body().position());
  send_char(socket_, game_object->game_object_type());
  send_object_points(socket_, game_object->characteristic_points());
  send_bool(socket_, game_object->alive());
}
开发者ID:tinchou,项目名称:bluesjackrabbit,代码行数:7,代码来源:GameObjectMessage.cpp


示例8: check_asic_status

static int check_asic_status(struct echoaudio *chip)
{
	u32 box_status;

	if (wait_handshake(chip))
		return -EIO;

	chip->comm_page->ext_box_status =
		__constant_cpu_to_le32(E3G_ASIC_NOT_LOADED);
	chip->asic_loaded = FALSE;
	clear_handshake(chip);
	send_vector(chip, DSP_VC_TEST_ASIC);

	if (wait_handshake(chip)) {
		chip->dsp_code = NULL;
		return -EIO;
	}

	box_status = le32_to_cpu(chip->comm_page->ext_box_status);
	DE_INIT(("box_status=%x\n", box_status));
	if (box_status == E3G_ASIC_NOT_LOADED)
		return -ENODEV;

	chip->asic_loaded = TRUE;
	return box_status & E3G_BOX_TYPE_MASK;
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:26,代码来源:echoaudio_3g.c


示例9: check_asic_status

/* ASIC status check - some cards have one or two ASICs that need to be
loaded.  Once that load is complete, this function is called to see if
the load was successful.
If this load fails, it does not necessarily mean that the hardware is
defective - the external box may be disconnected or turned off.
This routine sometimes fails for Layla20; for Layla20, the loop runs
5 times and succeeds if it wins on three of the loops. */
static int check_asic_status(struct echoaudio *chip)
{
	u32 asic_status;
	int goodcnt, i;

	chip->asic_loaded = FALSE;
	for (i = goodcnt = 0; i < 5; i++) {
		send_vector(chip, DSP_VC_TEST_ASIC);

		/* The DSP will return a value to indicate whether or not
		   the ASIC is currently loaded */
		if (read_dsp(chip, &asic_status) < 0) {
			DE_ACT(("check_asic_status: failed on read_dsp\n"));
			return -EIO;
		}

		if (asic_status == ASIC_ALREADY_LOADED) {
			if (++goodcnt == 3) {
				chip->asic_loaded = TRUE;
				return 0;
			}
		}
	}
	return -EIO;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:32,代码来源:layla20_dsp.c


示例10: update_input_line_level

static int update_input_line_level(struct echoaudio *chip)
{
	if (wait_handshake(chip))
		return -EIO;
	clear_handshake(chip);
	return send_vector(chip, DSP_VC_UPDATE_INGAIN);
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:7,代码来源:echoaudio_dsp.c


示例11: issp_set_security

static int issp_set_security(struct issp_host *host)
{
	uint8_t addr = 0;

	send_vector(host, vec_sync_enable, bits_sync_enable);
	send_vector(host, vec_read_write_setup, bits_read_write_setup);

	pin_data_out(host);
	while (addr < host->pdata->security_size)
		issp_write_byte(host, addr++, issp_fw_get_byte(host));
	pin_data_z(host);

	send_vector(host, vec_secure, bits_secure);

	return wait_and_poll(host);
}
开发者ID:coreentin,项目名称:android_kernel_nvidia_s8515,代码行数:16,代码来源:issp_steps.c


示例12: update_vmixer_level

/* Tell the DSP to read and update virtual mixer levels in comm page. */
static int update_vmixer_level(struct echoaudio *chip)
{
	if (wait_handshake(chip))
		return -EIO;
	clear_handshake(chip);
	return send_vector(chip, DSP_VC_SET_VMIXER_GAIN);
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:8,代码来源:indigoio_dsp.c


示例13: send_char

void GameObjectMessage::send_object_points(Socket* socket, const std::vector<Vector> &points) {
  char points_size = static_cast<char>(points.size());
  send_char(socket, points_size);
  for (std::vector<Vector>::const_iterator it = points.begin();
       it != points.end();
       it++) {
    send_vector(socket_, *it);
  }
}
开发者ID:tinchou,项目名称:bluesjackrabbit,代码行数:9,代码来源:GameObjectMessage.cpp


示例14: set_sample_rate

static int set_sample_rate(struct echoaudio *chip, u32 rate)
{
	if (wait_handshake(chip))
		return -EIO;

	chip->sample_rate = rate;
	chip->comm_page->sample_rate = cpu_to_le32(rate);
	clear_handshake(chip);
	return send_vector(chip, DSP_VC_UPDATE_CLOCKS);
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:10,代码来源:indigoio_dsp.c


示例15: issp_check_status

static int issp_check_status(struct issp_host *host)
{
	uint8_t status;
	int ret;

	send_vector(host, vec_sync_enable, bits_sync_enable);
	send_vector(host, vec_read_status, bits_read_status);
	generate_clocks(host, 2);
	status = read_byte(host);
	send_vector(host, vec_read_status_end, bits_read_status_end);
	send_vector(host, vec_sync_disable, bits_sync_disable);

	switch (status) {
	case 0x00:
		ret = 0;
		break;
	case 0x01:
		dev_err(&host->pdev->dev, "ReadStatus: " \
			"Not allowed because of block level protection\n");
		ret = -EACCES;
		break;
	case 0x03:
		dev_err(&host->pdev->dev, "ReadStatus: Fatal error\n");
		ret = -EIO;
		break;
	case 0x04:
		dev_err(&host->pdev->dev, "ReadStatus: Checksum failure\n");
		ret = -EIO;
		break;
	case 0x06:
		dev_err(&host->pdev->dev, "ReadStatus: Caliberate failure\n");
		ret = -EIO;
		break;
	default:
		dev_err(&host->pdev->dev,
			"ReadStatus: Failed 0x%02x\n", status);
		ret = -EIO;
		break;
	}

	return ret;
}
开发者ID:coreentin,项目名称:android_kernel_nvidia_s8515,代码行数:42,代码来源:issp_steps.c


示例16: issp_block_read_compare

static int issp_block_read_compare(struct issp_host *host)
{
	uint8_t addr = 0;
	int ret = 0;

	send_vector(host, vec_sync_enable, bits_sync_enable);
	send_vector(host, vec_read_write_setup, bits_read_write_setup);

	while (addr < host->pdata->block_size) {
		uint8_t data = issp_read_byte_at(host, addr++);
		if (data != issp_fw_get_byte(host)) {
			dev_err(&host->pdev->dev, "Data compare failed!\n");
			ret =  -EIO;
			break;
		}
	}

	send_vector(host, vec_sync_disable, bits_sync_disable);

	return ret;
}
开发者ID:coreentin,项目名称:android_kernel_nvidia_s8515,代码行数:21,代码来源:issp_steps.c


示例17: issp_get_id

static int issp_get_id(struct issp_host *host)
{
	int i, ret;

	send_vector(host, vec_id_setup_1, bits_id_setup_1);
	ret = wait_and_poll(host);
	if (ret)
		return ret;
	send_vector(host, vec_id_setup_2, bits_id_setup_2);
	ret = wait_and_poll(host);
	if (ret)
		return ret;
	send_vector(host, vec_sync_enable, bits_sync_enable);

	for (i = 0; i < 4; i++) {
		send_vector(host, vec_read_id_v[i], bits_read_id_v[i]);
		generate_clocks(host, 2);
		host->si_id[i] = read_byte(host);
	}
	send_vector(host, vec_read_id_v[4], bits_read_id_v[4]);

	send_vector(host, vec_sync_disable, bits_sync_disable);

	return 0;
}
开发者ID:coreentin,项目名称:android_kernel_nvidia_s8515,代码行数:25,代码来源:issp_steps.c


示例18: send_create_object

int send_create_object(const char *filename)
{
    int i;

    if ((i = new_object()) >= 0)
    {
        struct object      *o = get_object(i);
        struct object_mesh *m = NULL;

        if (read_obj(filename, o))
        {
            int j, n = vecnum(o->mv);

            o->count = 1;

            /* Send the object header. */

            send_event(EVENT_CREATE_OBJECT);
            send_index(n);

            /* Send the vertices and meshes. */

            send_vector(o->vv);

            for (j = 0; j < n; ++j)
            {
                m = (struct object_mesh *) vecget(o->mv, j);

                send_index (m->brush);
                send_vector(m->fv);
                send_vector(m->ev);
            }

            /* Encapsulate this object in an entity. */

            return send_create_entity(TYPE_OBJECT, i);
        }
    }
    return -1;
}
开发者ID:johnh530,项目名称:electro,代码行数:40,代码来源:object.c


示例19: check_asic_status

static int check_asic_status(struct echoaudio *chip)
{
	u32 asic_status;

	send_vector(chip, DSP_VC_TEST_ASIC);

	if (read_dsp(chip, &asic_status) < 0) {
		DE_INIT(("check_asic_status: failed on read_dsp\n"));
		chip->asic_loaded = FALSE;
		return -EIO;
	}

	chip->asic_loaded = (asic_status == ASIC_ALREADY_LOADED);
	return chip->asic_loaded ? 0 : -EIO;
}
开发者ID:MiniBlu,项目名称:cm11_kernel_htc_msm8974a3ul,代码行数:15,代码来源:echoaudio_gml.c


示例20: enable_midi_input

/* Start and stop Midi input */
static int enable_midi_input(struct echoaudio *chip, char enable)
{
	DE_MID(("enable_midi_input(%d)\n", enable));

	if (wait_handshake(chip))
		return -EIO;

	if (enable) {
		chip->mtc_state = MIDI_IN_STATE_NORMAL;
		chip->comm_page->flags |=
			cpu_to_le32(DSP_FLAG_MIDI_INPUT);
	} else
		chip->comm_page->flags &=
			~cpu_to_le32(DSP_FLAG_MIDI_INPUT);

	clear_handshake(chip);
	return send_vector(chip, DSP_VC_UPDATE_FLAGS);
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:19,代码来源:midi.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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