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

C++ do_reset函数代码示例

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

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



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

示例1: channel_on_routing

static switch_status_t channel_on_routing(switch_core_session_t *session)
{
	switch_channel_t *channel = NULL;
	private_t *tech_pvt = NULL;
	const char *app, *arg;

	channel = switch_core_session_get_channel(session);
	assert(channel != NULL);

	tech_pvt = switch_core_session_get_private(session);
	assert(tech_pvt != NULL);

	do_reset(tech_pvt);

	switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s CHANNEL ROUTING\n", switch_channel_get_name(channel));


	if (!switch_test_flag(tech_pvt, TFLAG_OUTBOUND) && (app = switch_channel_get_variable(channel, "loopback_app"))) {
		switch_caller_extension_t *extension = NULL;
		arg = switch_channel_get_variable(channel, "loopback_app_arg");
		extension = switch_caller_extension_new(session, app, app);
		switch_caller_extension_add_application(session, extension, "pre_answer", NULL);
		switch_caller_extension_add_application(session, extension, app, arg);

		switch_channel_set_caller_extension(channel, extension);
		switch_channel_set_state(channel, CS_EXECUTE);
		return SWITCH_STATUS_FALSE;
	}



	return SWITCH_STATUS_SUCCESS;
}
开发者ID:gujun,项目名称:sscore,代码行数:33,代码来源:mod_loopback.c


示例2: API_reset

/*
 * pseudo signature:
 *
 * int API_reset(void)
 */
static int API_reset(va_list ap)
{
	do_reset(NULL, 0, 0, NULL);

	/* NOT REACHED */
	return 0;
}
开发者ID:105678256,项目名称:u-boot-2010.09,代码行数:12,代码来源:api.c


示例3: compl_do_reset

static void compl_do_reset(struct usb_ep *ep, struct usb_request *req)
{
	struct f_rockusb *f_rkusb = get_rkusb();

	rkusb_set_reboot_flag(f_rkusb->reboot_flag);
	do_reset(NULL, 0, 0, NULL);
}
开发者ID:axxia,项目名称:axxia_u-boot,代码行数:7,代码来源:f_rockusb.c


示例4: ee_do_command

int ee_do_command( u8 *Tx, int Tx_len, u8 *Rx, int Rx_len, int Send_skip ){
  /* Execute this command string, including
     giving reset and setting to idle after command
     if Rx_len is set, we read out data from EEPROM */
  int i;

  E_DEBUG("Command, Tx_len %d, Rx_len %d\n", Tx_len, Rx_len );

  if(do_reset()){
    /* Failed! */
    return(-EIO);
  }

  if(Send_skip)
    /* Always send SKIP_ROM first to tell chip we are sending a command,
       except when we read out rom data for chip */
    write_byte(SKIP_ROM);

  /* Always have Tx data */
  for(i=0;i<Tx_len;i++){
    write_byte(Tx[i]);
  }

  if(Rx_len){
    for(i=0;i<Rx_len;i++){
      Rx[i]=read_byte();
    }
  }

  set_idle();

  E_DEBUG("Command done\n");

  return(0);
}
开发者ID:12thmantec,项目名称:u-boot-novena-spl,代码行数:35,代码来源:ee_access.c


示例5: fun_handler_cam2_back

int fun_handler_cam2_back(void)
{
	printf("Soft reset !!!!! \n");
	set_to_peripheral_boot_mode();
	do_reset(NULL, 0, 0, NULL);
	return 1;
}
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:7,代码来源:u5500_keypad.c


示例6: evaluate_command

static ERL_NIF_TERM
evaluate_command(esqlite_command *cmd, esqlite_connection *conn)
{
    switch(cmd->type) {
    case cmd_open:
	    return do_open(cmd->env, conn, cmd->arg);
    case cmd_exec:
	    return do_exec(cmd->env, conn, cmd->arg);
    case cmd_changes:
	    return do_changes(cmd->env, conn, cmd->arg);
    case cmd_prepare:
	    return do_prepare(cmd->env, conn, cmd->arg);
    case cmd_step:
	    return do_step(cmd->env, conn->db, cmd->stmt);
    case cmd_reset:
	    return do_reset(cmd->env, conn->db, cmd->stmt);
    case cmd_bind:
	    return do_bind(cmd->env, conn->db, cmd->stmt, cmd->arg);
    case cmd_column_names:
	    return do_column_names(cmd->env, cmd->stmt);
    case cmd_close:
	    return do_close(cmd->env, conn, cmd->arg);
	case cmd_insert:
	    return do_insert(cmd->env, conn, cmd->arg);
    default:
	    return make_error_tuple(cmd->env, "invalid_command");
    }
}
开发者ID:MSch,项目名称:esqlite,代码行数:28,代码来源:esqlite3_nif.c


示例7: cpld_set_altbank

/**
 * Set the boot bank to the alternate bank
 */
void cpld_set_altbank(u8 banksel)
{
	struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
	u8 reg11;

	reg11 = in_8(&cpld_data->flhcsr);

	switch (banksel) {
	case 1:
		out_8(&cpld_data->flhcsr, (reg11 & CPLD_BANKSEL_MASK)
			| CPLD_BANKSEL_EN | CPLD_SELECT_BANK1);
		break;
	case 2:
		out_8(&cpld_data->flhcsr, (reg11 & CPLD_BANKSEL_MASK)
			| CPLD_BANKSEL_EN | CPLD_SELECT_BANK2);
		break;
	case 3:
		out_8(&cpld_data->flhcsr, (reg11 & CPLD_BANKSEL_MASK)
			| CPLD_BANKSEL_EN | CPLD_SELECT_BANK3);
		break;
	case 4:
		out_8(&cpld_data->flhcsr, (reg11 & CPLD_BANKSEL_MASK)
			| CPLD_BANKSEL_EN | CPLD_SELECT_BANK4);
		break;
	default:
		printf("Invalid value! [1-4]\n");
		return;
	}

	udelay(100);
	do_reset(NULL, 0, 0, NULL);
}
开发者ID:CogSystems,项目名称:u-boot,代码行数:35,代码来源:cpld.c


示例8: do_reset

 void hts_engine_impl::reset()
 {
   if(input->lbegin()!=input->lend())
     do_reset();
   output=0;
   input=0;
   rate=1.0;
 }
开发者ID:A-L-E-X,项目名称:RHVoice,代码行数:8,代码来源:hts_engine_impl.cpp


示例9: kernel_reset

void kernel_reset()
{
	if(current_task->uid)
		return;
	kernel_shutdown();
	kprintf("Rebooting system...\n");
	do_reset();
}
开发者ID:imgits,项目名称:seaos-kernel,代码行数:8,代码来源:kernel.c


示例10: do_resetdialog

void do_resetdialog()
{
    changeFullScreen(0);
    save_undo();
    if (okcancel("Are you sure you want to reset?\nAny unsaved changes will be lost."))
	{
		resetfilename();
        do_reset();
	}
}
开发者ID:berezhko,项目名称:Atanua,代码行数:10,代码来源:simutils.cpp


示例11: do_tftpd

int do_tftpd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	const int press_times = 1;
	int i = 0;

	asus_gpio_init();
	if (DETECT())		/* Reset button */
	{
		printf(" \n## Enter Rescue Mode ##\n");
		printf("   \n3: System Boot system code via TFTP.\n");
		setenv("autostart", "no");
		/* Wait forever for an image */
		if (NetLoop(TFTPD) < 0) 
			return 1;
	}
	else if (DETECT_WPS())	/* WPS button */
	{
		/* Make sure WPS button is pressed at least press_times * 0.01s. */
		while (DETECT_WPS() && i++ < press_times) {
			udelay(10000);
		}

		if (i >= press_times) {
			while (DETECT_WPS()) {
				udelay(90000);
				i++;
				if (i & 1)
					LEDON();
				else
					LEDOFF();
			}
			LEDOFF();
			asus_gpio_uninit();

			reset_to_default();
			do_reset (NULL, 0, 0, NULL);
		}
	}
	else
	{
		if(check_trx(argc, argv))
		{
			printf(" \nEnter Recuse Mode for trx error\n");
			printf("   \n3: System Boot system code via TFTP.\n");
			if (NetLoop(TFTPD) < 0) 
				return 1;
		}
		
		printf("   \n3: System Boot system code via Flash.\n");
		do_bootm(cmdtp, 0, argc, argv);
	}
	
	return 0;
}
开发者ID:schidler,项目名称:flyzjhz-rt-n56u,代码行数:54,代码来源:cmd_tftpServer.c


示例12: channel_on_reset

static switch_status_t channel_on_reset(switch_core_session_t *session)
{
	private_t *tech_pvt = (private_t *) switch_core_session_get_private(session);
	switch_assert(tech_pvt != NULL);

	do_reset(tech_pvt);
	switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s RESET\n",
					  switch_channel_get_name(switch_core_session_get_channel(session)));

	return SWITCH_STATUS_SUCCESS;
}
开发者ID:gujun,项目名称:sscore,代码行数:11,代码来源:mod_loopback.c


示例13: do_bootm_on_complete

static void do_bootm_on_complete(struct usb_ep *ep, struct usb_request *req)
{
	req->complete = NULL;
	fastboot_shutdown();
	printf("Booting kernel..\n");

	//do_bootm(NULL, 0, 2, bootm_args);

	/* This only happens if image is somehow faulty so we start over */
	do_reset(NULL, 0, 0, NULL);
}
开发者ID:kishoreinme,项目名称:uboot,代码行数:11,代码来源:u_fastboot.c


示例14: MAIL

// FIXME: if rules_reset fails, exit
static int MAIL(void)
{
  const response* resp;
  msg2("MAIL ", arg.s);
  do_reset();
  if ((resp = parse_addr_arg()) == 0) {
    if ((resp = handle_sender(&addr, &params)) == 0)
      resp = &resp_accepted_sender;
    if (number_ok(resp)) {
      saw_mail = 1;
    }
  }
  return respond(resp);
}
开发者ID:cweimann,项目名称:mailfront,代码行数:15,代码来源:protocol-smtp.c


示例15: do_reset

void dr_inter::try_loading( const char* rFile, const char* aFile )
{
     // full reset
     do_reset();

    if ( base_object.full_read( rFile, aFile ) )
    {
        rFileName = rFile;
        aFileName = aFile;
        fLoaded = true; // just indicate that file has been loaded
    }
    else fLoaded = false; // just indicate thate file has been loaded

}
开发者ID:IanReid,项目名称:ABFGP,代码行数:14,代码来源:dr_interface.cpp


示例16: board_late_init

int board_late_init(void)
{
	pci_dev_t bdf;
	ulong bootcount;

	/*
	 * Check if the PEX switch is detected (somtimes its not available
	 * on the PCIe bus). In this case, try to recover by issuing a
	 * soft-reset or even a power-cycle, depending on the bootcounter
	 * value.
	 */
	bdf = pci_find_device(PCI_VENDOR_ID_PLX, 0x8619, 0);
	if (bdf == -1) {
		u8 i2c_buf[8];
		int ret;

		/* PEX switch not found! */
		bootcount = bootcount_load();
		printf("Failed to find PLX PEX-switch (bootcount=%ld)\n",
		       bootcount);
		if (bootcount > PEX_SWITCH_NOT_FOUNT_LIMIT) {
			printf("Issuing power-switch via uC!\n");

			printf("Issuing power-switch via uC!\n");
			i2c_set_bus_num(STM_I2C_BUS);
			i2c_buf[0] = STM_I2C_ADDR << 1;
			i2c_buf[1] = 0xc5;	/* cmd */
			i2c_buf[2] = 0x01;	/* enable */
			/* Delay before reboot */
			i2c_buf[3] = REBOOT_DELAY & 0x00ff;
			i2c_buf[4] = (REBOOT_DELAY & 0xff00) >> 8;
			/* Delay before shutdown */
			i2c_buf[5] = 0x00;
			i2c_buf[6] = 0x00;
			i2c_buf[7] = crc8(0x72, &i2c_buf[0], 7);

			ret = i2c_write(STM_I2C_ADDR, 0, 0, &i2c_buf[1], 7);
			if (ret) {
				printf("I2C write error (ret=%d)\n", ret);
				printf("Issuing soft-reset...\n");
				/* default handling: SOFT reset */
				do_reset(NULL, 0, 0, NULL);
			}

			/* Wait for power-cycle to occur... */
			printf("Waiting for power-cycle via uC...\n");
			while (1)
				;
		} else {
开发者ID:0xFelix,项目名称:u-boot-edminiv2,代码行数:49,代码来源:theadorable.c


示例17: do_bootz

static int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
	bootm_headers_t	images;

	if (bootz_start(cmdtp, flag, argc, argv, &images))
		return 1;

	/*
	 * We have reached the point of no return: we are going to
	 * overwrite all exception vector code, so we cannot easily
	 * recover from any failures any more...
	 */
	disable_interrupts();

#ifdef CONFIG_NETCONSOLE
	/* Stop the ethernet stack if NetConsole could have left it up */
	eth_halt();
#endif

#if defined(CONFIG_CMD_USB)
	/*
	 * turn off USB to prevent the host controller from writing to the
	 * SDRAM while Linux is booting. This could happen (at least for OHCI
	 * controller), because the HCCA (Host Controller Communication Area)
	 * lies within the SDRAM and the host controller writes continously to
	 * this area (as busmaster!). The HccaFrameNumber is for example
	 * updated every 1 ms within the HCCA structure in SDRAM! For more
	 * details see the OpenHCI specification.
	 */
	usb_stop();
#endif

#ifdef CONFIG_SBOOT
	bootm_sboot();
#endif

#ifdef CONFIG_SILENT_CONSOLE
	fixup_silent_linux();
#endif
	arch_preboot_os();

	do_bootm_linux(0, argc, argv, &images);
#ifdef DEBUG
	puts("\n## Control returned to monitor - resetting...\n");
#endif
	do_reset(cmdtp, flag, argc, argv);

	return 1;
}
开发者ID:ShwetaKak,项目名称:u-boot-sboot,代码行数:49,代码来源:cmd_bootm.c


示例18: erase_environment

static void erase_environment(void)
{
	struct spi_flash *flash;

	printf("Erasing environment..\n");
	flash = spi_flash_probe(0, 0, 1000000, SPI_MODE_3);
	if (!flash) {
		printf("Erasing flash failed\n");
		return;
	}

	spi_flash_erase(flash, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE);
	spi_flash_free(flash);
	do_reset(NULL, 0, 0, NULL);
}
开发者ID:Biamp-Systems,项目名称:blackfin-uboot,代码行数:15,代码来源:lsxl.c


示例19: do_redo

void do_redo()
{
    if (!gRedoStack.empty())
    {
        do_cancel();
        File * state = new MemoryFile();
        do_savebinary(state);
        gUndoStack.push_back(state);
        do_reset();
        state = gRedoStack.back();
        state->seek(0);
        do_loadbinary(state);
        gRedoStack.pop_back();
        delete state;
    }
}
开发者ID:berezhko,项目名称:Atanua,代码行数:16,代码来源:simutils.cpp


示例20: do_checkcrash

/*
 * Dump crash to file (typically FAT file on SD/MMC).
 */
static int do_checkcrash(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	int rc = 0;
#if defined(ENG_VERSION)
	Elf32_Ehdr *elfhdr_addr;
	char *crash_env_val;

	crash_env_val = getenv("crash_dump");
	if ((crash_env_val != NULL) && strcmp(crash_env_val, "yes") == 0) {
		rc = -1;
		elfhdr_addr = get_elfhdr_addr();
		if (elfhdr_addr != NULL)
			rc = check_elfhdr(elfhdr_addr);
		if (rc == 0) {
			printf("crash dump elf header found."
			       " Dumping to card...\n");
			rc = crashdump(elfhdr_addr);
			if (rc != 0)
				printf("checkcrash: "
				       "error writing dump from %x to %s\n",
				       (u32) elfhdr_addr, crash_filename);
		}
		else {
			printf("crash dump elf header not found. Will try to create one"
			       " Dumping to card...\n");
			rc = dump_regions_from_environment();
		}
	}
	stop_mpcore_wdt();

	/*
	 * For some reason we can't reboot into the linux kernel when coming
	 * from there using kexec. On the other hand, we can't reset through the
	 * PRCMU when we are here because of a watchdog reset.
	 * For now let's
	 * 1) Reset through PRCMU when coming from kexec
	 * 2) Continue booting when coming from a watchdog reset
	 */
	if (!reboot_at_crash())
		setenv("bootdelay", "-1");
	else
#endif
		if (restarted())
			do_reset();

	return rc;
}
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:50,代码来源:cmd_cdump.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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