您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ watchdog_init函数代码示例

51自学网 2021-06-03 09:52:17
  C++
这篇教程C++ watchdog_init函数代码示例写得很实用,希望能帮到您。

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

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

示例1: main

int main(void){  uart_init();  shift_init();  timer_init();  display_init();  keypad_init();  serial_init();  edit_init();  clock_init();  watchdog_init(WDTO_15MS, &oops);  sei();  // enable interrupts  printf("/r/n*** BOOTED ***/r/nSpaceTime, yay!/r/n");  timer_beep(10);  while(1)  {    display_update();    serial_update();    edit_update();    clock_update();  }}
开发者ID:BruceFletcher,项目名称:SpaceTime,代码行数:29,


示例2: main

int main( void ){        ALWAYS_KEEP(info_block);        cpu_init();        pr_info("*** Start! ***/r/n");        watchdog_init(WATCHDOG_TIMEOUT_MS);        /*         * Start the scheduler.         *         * NOTE : Tasks run in system mode and the scheduler runs in         * Supervisor mode. The processor MUST be in supervisor mode         * when vTaskStartScheduler is called.  The demo applications         * included in the FreeRTOS.org download switch to supervisor         * mode prior to main being called.  If you are not using one         * of these demo application projects then ensure Supervisor         * mode is used here.         */        if (TASK_TASK_INIT) {                xTaskCreate(setupTask,(signed portCHAR*) "Hardware Init",                            configMINIMAL_STACK_SIZE + 500, (void *) true,                            tskIDLE_PRIORITY, NULL);        } else {                setupTask((void *) false);        }        vTaskStartScheduler();        fatalError(FATAL_ERROR_SCHEDULER);        return 0;}
开发者ID:autosportlabs,项目名称:RaceCapture-Pro-firmware-mk1,代码行数:32,


示例3: main

int main() {	bool newreadings;	bool buttonschanged;	load_init();	initsystem();	watchdog_init();	initserial();	timer_init();	display_init();	initfan();	adc_init();	buttons_init();	enableInterrupts();	protocol_onbooted();	while (1) {		watchdog_kick();		newreadings = adc_updatereadings();		if (newreadings) {			checkstate();		}		buttonschanged = buttons_check();		if (newreadings || buttonschanged) {			protocol_sendstate();			display_update();		}		protocol_checkcommand();	}}
开发者ID:fifteenhex,项目名称:openebdmini,代码行数:34,


示例4: Process_data

// ----------------------------------------------------------------------------------------------// Обработка пришедшей команды// ----------------------------------------------------------------------------------------------void Process_data(void){char tmp=0;// команда на ресет  if ( (can_msg_in.data[0]==0x33)&&(can_msg_in.data[1]==0x22)&&(can_msg_in.data[2]==0x11) ) {  	watchdog_init();	while(1); }else{ 	tmp=(can_msg_in.data[0]);	// 0-й бит - Подсветка B1	// 1 -й бит - Подсветка B2    if ((tmp&BIT(0))==0x01) B1LED_ON; 	 else B1LED_OFF;  	if ((tmp&BIT(1))==0x02) B2LED_ON; 	else B2LED_OFF;	/*Buzzer*/	if ((can_msg_in.data[1])&BIT(0))	   PORTE|= BIT(0);//BUZZER ON	else  								   PORTE&=~BIT(0);// BUZZER OFF } }
开发者ID:vilesovds,项目名称:code_samples_portfolio,代码行数:28,


示例5: main

main(){P1DIR = LED1;__enable_interrupt();watchdog_init();while(1);}
开发者ID:mshafeeqkn,项目名称:Recursive-labz,代码行数:7,


示例6: main

int main(){	pFunction Jump_To_Application;	uint32_t JumpAddress;	SystemInit();		/* 配置系统时钟为72M */		NVIC_Configuration();	watchdog_init();	delay_init(72);	//72M	w25x64_init();	InitSerial();	Signel_led_init();	TIM_init();	SerialPutString("BootLoader Runing.../n");	SerialPutString("BootLoader for ");	SerialPutString(SYSTEM_NAME);	SerialPutString("/n");	ymodem();	iap();	SerialPutString("Load App!/n");	TIM_Cmd(TIM2,DISABLE);	if (((*(__IO uint32_t*)APP_LOCATION) & 0x2FFE0000 ) == 0x20000000)	{		JumpAddress = *(__IO uint32_t*) (APP_LOCATION + 4);		Jump_To_Application = (pFunction) JumpAddress;		__set_MSP(*(__IO uint32_t*) APP_LOCATION);		Jump_To_Application();	}	return 0;}
开发者ID:bearxiong99,项目名称:XXOO_000,代码行数:34,


示例7: notmain

/** * @ingroup firmware * * * * @param boot_dev * @param arm_m_type * @param atags * @return */int notmain(uint32_t boot_dev, uint32_t arm_m_type, uint32_t atags){	hardware_init();	dmx_init();	printf("Compiled on %s at %s/n", __DATE__, __TIME__);	ui_start(0x00);			// User Interface	ui_reinit();	ui_text_line_1("DMX512 Receiver", 15);	ui_text_line_2("Booting........", 15);	dmx_devices_read_config();	dmx_devices_init();	watchdog_init();	events_init();	for (;;)	{		watchdog_feed();		int i = 0;		for (i = 0; i < sizeof(poll_table) / sizeof(poll_table[0]); i++)		{			poll_table[i].f();		}		events_check();	}	return 0;}
开发者ID:glockwork,项目名称:rpidmx512,代码行数:43,


示例8: bl_init_clks

void bl_init_clks(void){    watchdog_init();    PCONP = PCRTC;          // switch off everything except RTC    init_clks1();    init_clks2();    init_mam();}
开发者ID:kamejoko80,项目名称:RIOT,代码行数:8,


示例9: msp430_cpu_init

/** /brief      Initialize the MSP430 CPU. * *  This function initializes : *  <ol> *      <li>WatchDog</li> *      <li>Ports</li> *  </ol> */voidmsp430_cpu_init(void){  dint();  watchdog_init();  init_ports();  eint();}
开发者ID:DIYzzuzpb,项目名称:wismote,代码行数:16,


示例10: main

int main(int argc, char ** argv){	usb_cdc_class_t * cdc;	DCC_LOG_INIT();	DCC_LOG_CONNECT();	DCC_LOG(LOG_TRACE, "1. cm3_udelay_calibrate()");	cm3_udelay_calibrate();	DCC_LOG(LOG_TRACE, "2. thinkos_init()");	thinkos_init(THINKOS_OPT_PRIORITY(8) | THINKOS_OPT_ID(7));	DCC_LOG(LOG_TRACE, "3. io_init()");	io_init();	DCC_LOG(LOG_TRACE, "4. external_bus_init()");	external_bus_init();	DCC_LOG(LOG_TRACE, "5. stdio_init()");	stdio_init();	printf("/n---/n");	DCC_LOG(LOG_TRACE, "6. trace_init()");	trace_init();	DCC_LOG(LOG_TRACE, "7. env_init()");	env_init();	/* create some threads */	DCC_LOG(LOG_TRACE, "8. monitor_init()");	monitor_init();	DCC_LOG(LOG_TRACE, "9. watchdog_init()");	watchdog_init();	DCC_LOG(LOG_TRACE, "10. net_init()");	net_init();	DCC_LOG(LOG_TRACE, "11. pkt_xmt_init()");	pkt_xmt_init();	net_pkt_mode(true);	DCC_LOG(LOG_TRACE, "12. console_shell_init()");	console_shell_init();	DCC_LOG(LOG_TRACE, "13. usb_cdc_init()");	usb_cdc_sn_set(*((uint64_t *)STM32F_UID));	cdc = usb_cdc_init(&stm32f_otg_fs_dev, 					   cdc_acm_def_str, 					   cdc_acm_def_strcnt);	DCC_LOG(LOG_TRACE, "14. usb_shell()");	for (;;) {		usb_shell(cdc);	}}
开发者ID:powertang,项目名称:yard-ice,代码行数:57,


示例11: s_init

/********************************************************** * Routine: s_init * Description: Does early system init of muxing and clocks. * - Called path is with sram stack. **********************************************************/void s_init(void){	watchdog_init();	set_muxconf_regs();	delay(100);	peripheral_enable();	icache_enable();}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:14,


示例12: state_enter

static void state_enter(void){	switch (state) {	case STATE_EARLY:		LOG("- early -/n");		watchdog_init(0);		hotplug("/etc/hotplug.json");		procd_coldplug();		break;	case STATE_INIT:		// try to reopen incase the wdt was not available before coldplug		watchdog_init(0);		LOG("- init -/n");		log_init();		procd_connect_ubus();		procd_inittab();		procd_inittab_run("respawn");		procd_inittab_run("askconsole");		procd_inittab_run("askfirst");		procd_inittab_run("sysinit");		break;	case STATE_RUNNING:		LOG("- init complete -/n");		break;	case STATE_SHUTDOWN:		LOG("- shutdown -/n");		procd_inittab_run("shutdown");		sync();		break;	case STATE_HALT:		LOG("- reboot -/n");		reboot(reboot_event);		break;	default:		ERROR("Unhandled state %d/n", state);		return;	};}
开发者ID:fingon,项目名称:procd,代码行数:44,


示例13: main

int main(void){watchdog_init();clock_init();port_init();timer_init();adc_init();	__bis_SR_register(LPM0_bits + GIE);return 0;}
开发者ID:ashwinashok9111993,项目名称:msp430-code,代码行数:12,


示例14: main

intmain(int argc, char **argv){	pid_t pid;	ulog_open(ULOG_KMSG, LOG_DAEMON, "init");	sigaction(SIGTERM, &sa_shutdown, NULL);	sigaction(SIGUSR1, &sa_shutdown, NULL);	sigaction(SIGUSR2, &sa_shutdown, NULL);	early();	cmdline();	watchdog_init(1);	pid = fork();	if (!pid) {		char *kmod[] = { "/sbin/kmodloader", "/etc/modules-boot.d/", NULL };		if (debug < 3) {			int fd = open("/dev/null", O_RDWR);			if (fd > -1) {				dup2(fd, STDIN_FILENO);				dup2(fd, STDOUT_FILENO);				dup2(fd, STDERR_FILENO);				if (fd > STDERR_FILENO)					close(fd);			}		}		execvp(kmod[0], kmod);		ERROR("Failed to start kmodloader/n");		exit(-1);	}	if (pid <= 0) {		ERROR("Failed to start kmodloader instance/n");	} else {		int i;		for (i = 0; i < 120; i++) {			if (waitpid(pid, NULL, WNOHANG) > 0)				break;			sleep(1);			watchdog_ping();		}	}	uloop_init();	preinit();	uloop_run();	return 0;}
开发者ID:dresong,项目名称:openwrt-procd,代码行数:52,


示例15: initialize

voidinitialize(void){  watchdog_init();  watchdog_start();  #if STACKMONITOR  /* Simple stack pointer highwater monitor. Checks for magic numbers in the main   * loop. In conjuction with TESTRTIMER, never-used stack will be printed   * every STACKMONITOR seconds.   */{extern uint16_t __bss_end;uint16_t p=(uint16_t)&__bss_end;    do {      *(uint16_t *)p = 0x4242;      p+=4;    } while (p<SP-4); //don't overwrite our own stack}#endif  /* rtimers needed for radio cycling */  rtimer_init();  rs232_init(RS232_PORT_0, BAUD_RATE(38400), USART_DATA_BITS_8 | USART_PARITY_NONE | USART_STOP_BITS_1);  rs232_redirect_stdout(RS232_PORT_0);  clock_init();  sei();  /* Initialize drivers and event kernel */  process_init();   led_init();#if 0  procinit_init();#else  process_start(&etimer_process, NULL);  process_start(&led_process, NULL);  process_start(&led2_process, NULL);#endif  PRINTA(CONTIKI_VERSION_STRING " started/r/n");  /* Comment this out if autostart_processes not defined at link */  /* Note AUTOSTART_PROCESSES(...) is only effective in the .co module */  autostart_start(autostart_processes);  }
开发者ID:Ammar-85,项目名称:contiki-arduino,代码行数:50,


示例16: main

int main(void){    led_init();    key_init(); // timer0_init();    watchdog_init();    led_on(LED0);    /* feed dog, otherwise will reset when watchdog time expire */    watchdog_feed();    return 0;}
开发者ID:cutecheng,项目名称:rounder,代码行数:14,


示例17: bmc_init

/** * Initialize BMC main application */void bmc_init(void){	vSemaphoreCreateBinary(sel_in_use);	memset(&wd_timer, 0x00, sizeof(watchdog_t));	watchdog_init();		/* create bmc task */	if (pdPASS != xTaskCreate(bmc_task, (const signed portCHAR * const)"bmc_task", STACK_SIZE_BMC_TASK, NULL, BMC_TASK_PRIO, NULL))	{		uart_printf("Could not create bmc_task!/n");		while (1);	}	return;}
开发者ID:ryanSie,项目名称:Advantech,代码行数:18,


示例18: s_init

/* do some early init */void s_init(void){	int in_sdram = 0;#ifdef CONFIG_SPL		in_sdram = is_running_in_sdram();#endif	watchdog_init();	sw_gpio_init();	clock_init();	gpio_init();#ifdef CONFIG_SPL	if (!in_sdram)		sdram_init();#endif}
开发者ID:hexiaolong2008,项目名称:u-boot,代码行数:16,


示例19: main

int main(void){    /* Bring up processor */	cpu_init();    watchdog_init();#ifdef CONFIG_HW_LED_ALIVE_CHECK    /* Bring up low level LED */    hw_led_init();#endif#ifdef CONFIG_HW_UART    /* Bring up low level hardware UART */    hw_uart_init();#endif    /* Setup timer for tick counting */    tick_init();    /* Bring up high level LED */    led_init();    /* Bring up console */    console_init();#ifdef CONFIG_DEBUG_RESET_REASON    /* Report reason for last reset */    console_puts_P(PSTR("Reset cause:"));    console_puthex8(MCUSR);    console_newline();#endif    /* Set default LED pattern */    led_set_seq(LED_SEQ_SINE);#ifdef CONFIG_USBDEV    usbdev_init(USBMODE_DEFAULT);#endif    /* HiZ bus mode selected by default */    bus_init(&bus_hiz);    /* Enable interrupts */    cpu_enable_int();    while(1)	{        driver_tick();	}}
开发者ID:pfalcon,项目名称:bus-ninja,代码行数:48,


示例20: s_init

/****************************************************************************** * Routine: s_init * Description: Does early system init of muxing and clocks. *              - Called path is with SRAM stack. *****************************************************************************/void s_init(void){    int in_sdram = is_running_in_sdram();    watchdog_init();    try_unlock_memory();    /*     * Right now flushing at low MPU speed.     * Need to move after clock init     */    invalidate_dcache(get_device_type());#ifdef CONFIG_L2_OFF    l2_cache_disable();#else    l2_cache_enable();#endif    /*     * Writing to AuxCR in U-boot using SMI for GP DEV     * Currently SMI in Kernel on ES2 devices seems to have an issue     * Once that is resolved, we can postpone this config to kernel     */    if (get_device_type() == GP_DEVICE)        setup_auxcr();    set_muxconf_regs();    sdelay(100);    prcm_init();    per_clocks_enable();#ifdef CONFIG_USB_EHCI_OMAP    ehci_clocks_enable();#endif#ifdef CONFIG_SPL_BUILD    preloader_console_init();    timer_init();#endif    if (!in_sdram)        mem_init();}
开发者ID:hefanbo,项目名称:U-Boot-for-QT210,代码行数:52,


示例21: boot

voidboot(void){	if (warm_reset())		force_emif_self_refresh();	watchdog_init();	mux_init();	enable_uart_clocks();	cons_init();	scale_vcores();	clock_init();	sdram_init();	bzero(__bss_start, __bss_end - __bss_start);	timer_init();	storage_init();}
开发者ID:einszwei,项目名称:freebsd-omap4-bootloader,代码行数:17,


示例22: main

int main(){  gps_init();  log_init();  radio_init();  sms_init();  statusled_init();  timer1_init();  timer3_init();  watchdog_init();  /* Interrupts on - go go go! */  sei();  /* Now sleep - the whole program is interrupt driven */  for (;;) sleep_mode();}
开发者ID:danielrichman,项目名称:alien,代码行数:17,


示例23: s_init

/********************************************************** * Routine: s_init * Description: Does early system init of muxing and clocks. * - Called path is with sram stack. **********************************************************/void s_init(void){	int in_sdram = running_in_sdram();	watchdog_init();	set_muxconf_regs();	delay(100);	try_unlock_sram();	if(!in_sdram)		prcm_init();	peripheral_enable();	icache_enable();	if (!in_sdram)		sdrc_init();}
开发者ID:Analias,项目名称:SNOWLeo-SDR-1,代码行数:22,


示例24: main

int main( void ){        ALWAYS_KEEP(info_block);        cpu_init();        pr_info("*** Start! ***/r/n");        /* Defined as part of our compilation process */        if (true == ASL_WATCHDOG)                watchdog_init(WATCHDOG_TIMEOUT_MS);        const signed portCHAR task_name[] = "Hardware Init";        xTaskCreate(setupTask, task_name, HARDWARE_INIT_STACK_SIZE,                    NULL, RCP_LUA_PRIORITY, NULL);        vTaskStartScheduler();        /* SHOULD NEVER GET HERE */        panic(PANIC_CAUSE_SCHEDULER);        return 1;}
开发者ID:autosportlabs,项目名称:RaceCapture-Pro_firmware,代码行数:20,


示例25: system_init

void system_init(void){    /* NOTE: don't use anything here that might require tick task !     * It is initialized by kernel_init *after* system_init().     * The main() will naturally set cpu speed to normal after kernel_init()     * so don't bother if the cpu is running at 24MHz here.     * Make sure IO clock is running at expected speed */    imx233_clkctrl_init();    imx233_clkctrl_enable(CLK_PLL, true);#if IMX233_SUBTARGET >= 3700    imx233_clkctrl_set_frac_div(CLK_IO, 18); // [email
C++ watchdog_periodic函数代码示例
C++ waserror函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。