这篇教程C++ sys_check_timeouts函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中sys_check_timeouts函数的典型用法代码示例。如果您正苦于以下问题:C++ sys_check_timeouts函数的具体用法?C++ sys_check_timeouts怎么用?C++ sys_check_timeouts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了sys_check_timeouts函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: main/*! * @brief main function */int main(void){ struct netif fsl_netif0; ip_addr_t fsl_netif0_ipaddr, fsl_netif0_netmask, fsl_netif0_gw; app_low_level_init(); OSA_Init(); lwip_init(); IP4_ADDR(&fsl_netif0_ipaddr, 192,168,2,102); IP4_ADDR(&fsl_netif0_netmask, 255,255,255,0); IP4_ADDR(&fsl_netif0_gw, 192,168,2,100); netif_add(&fsl_netif0, &fsl_netif0_ipaddr, &fsl_netif0_netmask, &fsl_netif0_gw, NULL, ethernetif_init, ethernet_input); netif_set_default(&fsl_netif0); netif_set_up(&fsl_netif0); echo_init();#if !ENET_RECEIVE_ALL_INTERRUPT uint32_t devNumber = 0; enet_dev_if_t * enetIfPtr;#if LWIP_HAVE_LOOPIF devNumber = fsl_netif0.num - 1;#else devNumber = fsl_netif0.num;#endif enetIfPtr = (enet_dev_if_t *)&enetDevIf[devNumber];#endif while(1) {#if !ENET_RECEIVE_ALL_INTERRUPT ENET_receive(enetIfPtr);#endif sys_check_timeouts(); }}
开发者ID:cjc1029nice,项目名称:ksdk,代码行数:38,
示例2: main/* Private functions ---------------------------------------------------------*/int main(void) { /* STM32F4xx HAL library initialization: - Configure the Flash prefetch, instruction and Data caches - Configure the Systick to generate an interrupt each 1 msec - Set NVIC Group Priority to 4 - Global MSP (MCU Support Package) initialization */ HAL_Init(); SystemClock_Config(); //Configure the System clock to have a frequency of 168 MHz BSP_Config(); //Configure the BSP (Board Support Package) lwip_init(); //Initilaize the LwIP stack Netif_Config(); //Configurates the network interface concentrator_init(); User_notification(&gnetif); //Notify the User about the nework interface config status /* Compute the value of ARR regiter to generate signal frequency at 17.57 Khz */ uhTimerPeriod = (uint32_t) ((SystemCoreClock / 17570 ) - 1); /* Compute CCR1 value to generate a duty cycle at 50% at the beggining */ aCCValue_Buffer = (uint32_t)(((uint32_t) uhADCxConvertedValuePercent * (uhTimerPeriod - 1)) / 100); TIM_Config(); //TIM3, TIM4, TIM8 Peripheral Configuration ADC_Config(); //Configure the ADC3 peripheral while (1) { /* Read a received packet from the Ethernet buffers and send it to the lwIP for handling */ ethernetif_input(&gnetif); sys_check_timeouts(); //Handle timeouts }}
开发者ID:mrtnzlml-archive,项目名称:Real-time-WS,代码行数:33,
示例3: mod_lwip_callbackSTATIC mp_obj_t mod_lwip_callback() { if (lwip_poll_list.poll != NULL) { lwip_poll_list.poll(lwip_poll_list.poll_arg); } sys_check_timeouts(); return mp_const_none;}
开发者ID:opensourcekids,项目名称:micropython,代码行数:7,
示例4: nrf51_driver_interface_up/**@brief Function to handle interface up event. */void nrf51_driver_interface_up(void){ APPL_LOG ("[APPL]: IPv6 interface up./r/n"); sys_check_timeouts(); m_display_state = LEDS_IPV6_IF_UP;}
开发者ID:xueliu,项目名称:nRF51822,代码行数:9,
示例5: lwip_servicestatic void lwip_service(void){ sys_check_timeouts(); if(ethmac_sram_writer_ev_pending_read() & ETHMAC_EV_SRAM_WRITER) { liteeth_input(&netif); ethmac_sram_writer_ev_pending_write(ETHMAC_EV_SRAM_WRITER); }}
开发者ID:cr1901,项目名称:artiq,代码行数:8,
示例6: mainvoid main(void){ struct netif netif; lwip_init(); netif_add(&netif, IP4_ADDR_ANY, IP4_ADDR_ANY, IP4_ADDR_ANY, NULL, netif_init, netif_input); netif.name[0] = 'e'; netif.name[1] = '0'; netif_create_ip6_linklocal_address(&netif, 1); netif.ip6_autoconfig_enabled = 1; netif_set_status_callback(&netif, netif_status_callback); netif_set_default(&netif); netif_set_up(&netif); /* Start DHCP and HTTPD */ dhcp_start(&netif ); httpd_init(); while(1) { /* Check link state, e.g. via MDIO communication with PHY */ if(link_state_changed()) { if(link_is_up()) { netif_set_link_up(&netif); } else { netif_set_link_down(&netif); } } /* Check for received frames, feed them to lwIP */ lock_interrupts(); struct pbuf* p = queue_try_get(&queue); unlock_interrupts(); if(p != NULL) { LINK_STATS_INC(link.recv); /* Update SNMP stats (only if you use SNMP) */ MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len); int unicast = ((p->payload[0] & 0x01) == 0); if (unicast) { MIB2_STATS_NETIF_INC(netif, ifinucastpkts); } else { MIB2_STATS_NETIF_INC(netif, ifinnucastpkts); } if(netif.input(p, &netif) != ERR_OK) { pbuf_free(p); } } /* Cyclic lwIP timers check */ sys_check_timeouts(); /* your application goes here */ }}
开发者ID:ambrop72,项目名称:badvpn,代码行数:58,
示例7: check_timeoutsvoid check_timeouts() {// TODO: Remove when sal-driver-lwip-k64f-eth/#8 is fixed#ifdef YOTTA_SAL_DRIVER_LWIP_K64F_ETH_VERSION_STRING emac_timer_fired = 1; vIRQ_SetPendingIRQ(ENET_Receive_IRQn);#else sys_check_timeouts();#endif}
开发者ID:Koenma413,项目名称:sal-stack-lwip,代码行数:10,
示例8: nrf51_driver_interface_up/**@brief Function to handle interface up event. */void nrf51_driver_interface_up(void){ APPL_LOG ("[APPL]: IPv6 Interface Up./r/n"); sys_check_timeouts(); // Set flag indicating interface state. m_interface_state = true; m_display_state = LEDS_IPV6_IF_UP;}
开发者ID:xueliu,项目名称:nRF51822,代码行数:11,
示例9: MX_LWIP_Process/** * ---------------------------------------------------------------------- * Function given to help user to continue LwIP Initialization * Up to user to complete or change this function ... * Up to user to call this function in main.c in while (1) of main(void) *----------------------------------------------------------------------- * Read a received packet from the Ethernet buffers * Send it to the lwIP stack for handling * Handle timeouts if NO_SYS_NO_TIMERS not set and without RTOS */void MX_LWIP_Process(void){ ethernetif_input(&gnetif); /* Handle timeouts */ #if !NO_SYS_NO_TIMERS && NO_SYS sys_check_timeouts(); #endif }
开发者ID:wangxian0718,项目名称:STM32-F7-Ethernet-emWin,代码行数:20,
示例10: nrf_driver_interface_up/**@brief Function to handle interface up event. */void nrf_driver_interface_up(void){ APPL_LOG ("[APPL]: IPv6 interface up./r/n");#ifdef COMMISSIONING_ENABLED commissioning_joining_mode_timer_ctrl(JOINING_MODE_TIMER_STOP_RESET);#endif // COMMISSIONING_ENABLED sys_check_timeouts(); m_display_state = LEDS_IPV6_IF_UP;}
开发者ID:sische,项目名称:MasterThesis,代码行数:12,
示例11: system_timer_callback/**@brief Timer callback used for periodic servicing of LwIP protocol timers. * This trigger is also used in the example to trigger sending UDP packets on the port. * * @details Timer callback used for periodic servicing of LwIP protocol timers. * * @param[in] p_context Pointer used for passing context. No context used in this application. */static void system_timer_callback(void * p_context){ UNUSED_VARIABLE(p_context); static int count = 0; sys_check_timeouts(); count++; if (count == 10) { count = 9; udp_data_send(); }}
开发者ID:451506709,项目名称:automated_machine,代码行数:19,
示例12: Ethernet_Update//------------------------------------------------------------------------------------------------------------------------------------------------------void Ethernet_Update(uint timeMS){ uint time = gTimerMS; do { gBF.cableEthIsConnected = gTimerMS - gEthTimeLastEthifInput <= 1500; ethernetif_input(&gnetif); sys_check_timeouts(); } while (gTimerMS - time < timeMS);}
开发者ID:Sasha7b9,项目名称:Osci,代码行数:13,
示例13: start_timer void start_timer() { timer.expires_from_now(boost::posix_time::milliseconds(100)); timer.async_wait([this] (const asio::error_code &err) { if (err) { LOG(ERROR) << "Timer error: " << err; return; } sys_check_timeouts(); start_timer(); }); }
开发者ID:blitz,项目名称:macgyvernet,代码行数:13,
示例14: pyb_lwip_pollSTATIC void pyb_lwip_poll(void) { // Poll all the NICs for incoming data for (struct netif *netif = netif_list; netif != NULL; netif = netif->next) { if (netif->flags & NETIF_FLAG_LINK_UP) { mod_network_nic_type_t *nic = netif->state; if (nic->poll_callback) { nic->poll_callback(nic, netif); } } } // Run the lwIP internal updates sys_check_timeouts();}
开发者ID:DanielO,项目名称:micropython,代码行数:13,
示例15: nrf51_driver_interface_up/**@brief Function to handle interface up event. */void nrf51_driver_interface_up(void){ uint32_t err_code; APPL_LOG ("[APPL]: IPv6 interface up./r/n"); sys_check_timeouts(); err_code = app_timer_start(m_sys_timer_id, LWIP_SYS_TIMER_INTERVAL, NULL); APP_ERROR_CHECK(err_code); LEDS_OFF(ADVERTISING_LED); LEDS_ON(CONNECTED_LED);}
开发者ID:451506709,项目名称:automated_machine,代码行数:15,
示例16: nrf_driver_interface_up/**@brief Function to handle interface up event. */void nrf_driver_interface_up(void){ m_is_ipv6_if_up = true;#ifdef COMMISSIONING_ENABLED commissioning_joining_mode_timer_ctrl(JOINING_MODE_TIMER_STOP_RESET);#endif // COMMISSIONING_ENABLED APPL_LOG ("[APPL]: IPv6 interface up./r/n"); sys_check_timeouts(); LEDS_OFF(LED_ONE); LEDS_ON(LED_TWO);}
开发者ID:sische,项目名称:MasterThesis,代码行数:16,
示例17: nrf51_driver_interface_up/**@brief Function to handle interface up event. */void nrf51_driver_interface_up(void){ uint32_t err_code; APPL_LOG ("[APPL]: IPv6 Interface Up./r/n"); sys_check_timeouts(); err_code = app_timer_start(m_sys_timer_id, LWIP_SYS_TIMER_INTERVAL, NULL); APP_ERROR_CHECK(err_code); m_display_state = LEDS_IPV6_IF_UP; err_code = app_timer_start(m_led_blink_timer, LED_BLINK_INTERVAL, NULL); APP_ERROR_CHECK(err_code);}
开发者ID:xueliu,项目名称:nRF51822,代码行数:16,
示例18: expire_lwip_timer/* * The timer for lwIP timeouts has gone off. Check timeouts, and possibly set * a new timer. */static voidexpire_lwip_timer(int arg __unused){ /* Let lwIP do its work. */ sys_check_timeouts(); /* * See if we have to update our timer for the next lwIP timer. Doing * this here, rather than from the main loop, avoids one kernel call. */ set_lwip_timer(); recheck_timer = FALSE;}
开发者ID:Stichting-MINIX-Research-Foundation,项目名称:minix,代码行数:19,
示例19: mainint main(void){ rtc_setup(); board_setup(); mch_net_init(); testapp_init(); while (1) { mch_net_poll(); sys_check_timeouts(); }}
开发者ID:ajaybhargav,项目名称:lwip-enc28j60,代码行数:15,
示例20: mainint main(void){ /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration----------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USART3_UART_Init(); MX_LWIP_Init(); MX_ADC3_Init(); /* USER CODE BEGIN 2 */ /* Http webserver Init */ http_server_init(); /* Notify user about the network interface config */ User_notification(&gnetif); /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ /* Read a received packet from the Ethernet buffers and send it to the lwIP for handling */ ethernetif_input(&gnetif); /* Handle timeouts */ sys_check_timeouts(); } /* USER CODE END 3 */}
开发者ID:Montanari9,项目名称:Ethernet_training,代码行数:47,
示例21: main/** * @brief Main program * @param None * @retval None */int main(void){ /* Enable the CPU Cache */ CPU_CACHE_Enable(); /* STM32F7xx HAL library initialization: - Configure the Flash ART accelerator on ITCM interface - Configure the Systick to generate an interrupt each 1 msec - Set NVIC Group Priority to 4 - Global MSP (MCU Support Package) initialization */ HAL_Init(); /* Configure the system clock to 200 MHz */ SystemClock_Config(); /* Configure the BSP */ BSP_Config(); /* Initialize the LwIP stack */ lwip_init(); /* Configure the Network interface */ Netif_Config(); /* Http webserver Init */ httpd_init(); /* Notify user about the network interface config */ User_notification(&gnetif); /* Infinite loop */ while (1) { /* Read a received packet from the Ethernet buffers and send it to the lwIP for handling */ ethernetif_input(&gnetif); /* Handle timeouts */ sys_check_timeouts();#ifdef USE_DHCP /* handle periodic timers for DHCP */ DHCP_Periodic_Handle(&gnetif);#endif }}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:52,
示例22: main/** * @brief Main program * @param None * @retval None */int main(void){ /* STM32F4xx HAL library initialization: - Configure the Flash prefetch, instruction and Data caches - Configure the Systick to generate an interrupt each 1 msec - Set NVIC Group Priority to 4 - Global MSP (MCU Support Package) initialization */ HAL_Init(); /* Configure the system clock to 168 MHz */ SystemClock_Config(); /* Configure the BSP */ BSP_Config(); /* Initialize the LwIP stack */ lwip_init(); /* Configure the Network interface */ Netif_Config(); /* Initialize the TFTP server */ tftpd_init(); /* Notify user about the network interface config */ User_notification(&gnetif); /* Link the SD Card disk I/O driver */ FATFS_LinkDriver(&SD_Driver, SD_Path); /* Infinite loop */ while (1) { /* Read a received packet from the Ethernet buffers and send it to the lwIP for handling */ ethernetif_input(&gnetif); /* Handle timeouts */ sys_check_timeouts();#ifdef USE_DHCP /* handle periodic timers for LwIP */ DHCP_Periodic_Handle(&gnetif);#endif }}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:52,
示例23: ENET_Receive_IRQHandlervoid ENET_Receive_IRQHandler(void) { enet_dev_if_t *enetIfPtr = (enet_dev_if_t *)&enetDevIf[BOARD_DEBUG_ENET_INSTANCE]; if (enet_hal_get_interrupt_status(((enet_dev_if_t *)enetIfPtr)->deviceNumber, kEnetRxFrameInterrupt)) enet_mac_rx_isr(enetIfHandle); if (enet_hal_get_interrupt_status(((enet_dev_if_t *)enetIfPtr)->deviceNumber, kEnetTxFrameInterrupt)) enet_mac_tx_isr(enetIfHandle); if (emac_timer_fired) { // TODO: this will have to be replaced with a proper "PHY task" that can detect changes in link status. if (k64f_phy_state.connected == STATE_UNKNOWN) { k64f_phy_state.connected = 1; netif_set_link_up(k64f_enetdata.netif); } emac_timer_fired = 0; sys_check_timeouts(); }}
开发者ID:sg-,项目名称:sdw-workshop,代码行数:17,
示例24: lwip_taskstatic void lwip_task(void * p) { net_init(); httpd_init(); uint32_t currentIP = board_netif.ip_addr.addr; while (1) { xSemaphoreTake(lwip_sem, 10 / portTICK_RATE_MS); interface_check_input(&board_netif); sys_check_timeouts(); if (board_netif.ip_addr.addr != currentIP) { currentIP = board_netif.ip_addr.addr; printf("got an IP address: %i.%i.%i.%i/n", (board_netif.ip_addr.addr >> 0) & 0xff, (board_netif.ip_addr.addr >> 8) & 0xff, (board_netif.ip_addr.addr >> 16) & 0xff, (board_netif.ip_addr.addr >> 24) & 0xff); } }
开发者ID:traffaillac,项目名称:uC-sdk,代码行数:18,
示例25: sys_timeouts_mbox_fetch/** * Wait (forever) for a message to arrive in an mbox. * While waiting, timeouts are processed. * * @param mbox the mbox to fetch the message from * @param msg the place to store the message */voidsys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg){ u32_t sleeptime;again: if (!next_timeout) { sys_arch_mbox_fetch(mbox, msg, 0); return; } sleeptime = sys_timeouts_sleeptime(); if (sleeptime == 0 || sys_arch_mbox_fetch(mbox, msg, sleeptime) == SYS_ARCH_TIMEOUT) { /* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred before a message could be fetched. */ sys_check_timeouts(); /* We try again to fetch a message from the mbox. */ goto again; }}
开发者ID:NCTU-ivan,项目名称:embarc_osp,代码行数:27,
示例26: ping_initvoid ping_init(void){#if !ENET_RECEIVE_ALL_INTERRUPT uint32_t devNumber = 0; enet_dev_if_t * enetIfPtr;#if LWIP_HAVE_LOOPIF devNumber = fsl_netif0.num - 1;#else devNumber = fsl_netif0.num;#endif enetIfPtr = (enet_dev_if_t *)&enetDevIf[devNumber];#endif ping_raw_init(); while(1) {#if !ENET_RECEIVE_ALL_INTERRUPT ENET_receive(enetIfPtr);#endif sys_check_timeouts(); }}
开发者ID:cjc1029nice,项目名称:ksdk,代码行数:21,
示例27: main/** * @brief Main program * @param None * @retval None */int main(void){ /* STM32F4xx HAL library initialization: - Configure the Flash prefetch, instruction and Data caches - Configure the Systick to generate an interrupt each 1 msec - Set NVIC Group Priority to 4 - Global MSP (MCU Support Package) initialization */ HAL_Init(); /* Configure the system clock to 180 MHz */ SystemClock_Config(); /* Configure the BSP */ BSP_Config(); /* Initilaize the LwIP stack */ lwip_init(); /* Configure the Network interface */ Netif_Config(); /* tcp echo server Init */ udp_echoserver_init(); /* Notify user about the netwoek interface config */ User_notification(&gnetif); /* Infinite loop */ while (1) { /* Read a received packet from the Ethernet buffers and send it to the lwIP for handling */ ethernetif_input(&gnetif); /* Handle timeouts */ sys_check_timeouts(); }}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:44,
示例28: MX_LWIP_Process/** * ---------------------------------------------------------------------- * Function given to help user to continue LwIP Initialization * Up to user to complete or change this function ... * Up to user to call this function in main.c in while (1) of main(void) *----------------------------------------------------------------------- * Read a received packet from the Ethernet buffers * Send it to the lwIP stack for handling * Handle timeouts if NO_SYS_NO_TIMERS not set and without RTOS */void MX_LWIP_Process(void){ ethernetif_input(&gnetif); /* Handle timeouts */ #if !NO_SYS_NO_TIMERS && NO_SYS sys_check_timeouts(); #endif if (gnetif.ip_addr.addr !=ip) { ip = gnetif.ip_addr.addr; a = ip & 0xFF; b = ip & 0xFF00; b = b >> 0x8; c = ip & 0xFF0000 ; c = c >> 0x10; d = ip & 0xFF000000 ; d = d >> 0x18; printf("got ip address %i.%i.%i.%i/n/r",a,b,c,d); }
开发者ID:nawresgharbi,项目名称:MyWorkspaces,代码行数:33,
示例29: main/** * @brief Function for application main entry. */int main(void){ cs_log_set_file(stdout); bleconfig_init(); { struct mg_mgr mgr; mg_mgr_init(&mgr, NULL); // Initialize event manager object // Note that many connections can be added to a single event manager // Connections can be created at any point, e.g. in event handler function const char *err; struct mg_bind_opts opts; struct mg_connection *nc = NULL; memset(&opts, 0x00, sizeof(opts)); opts.error_string = &err; nc = mg_bind_opt(&mgr, "80", ev_handler, opts); // Create listening connection and add it to the event manager if (nc == NULL) { printf("Failed to create listener: %s/n", err); return 1; } mg_set_protocol_http_websocket(nc); for (;;) { // Start infinite event loop bleconfig_poll(); sys_check_timeouts(); mg_mgr_poll(&mgr, 0); } mg_mgr_free(&mgr); return 0; }}
开发者ID:sanjay900,项目名称:AdAway,代码行数:40,
注:本文中的sys_check_timeouts函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ sys_cputs函数代码示例 C++ sysRegWrite函数代码示例 |