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

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

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

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

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

示例1: main

//------------------------------// Main game loop//------------------------------int main(int argc, char* argv[]){    srand(time(0));            if(sys_init() == false) { return 1; }    if(sys_loadfiles() == false) { return 1; }        set_clips();    sys_configload();        while(quit == false)    {        startTimer = SDL_GetTicks();                sys_input();        game_logic();        draw_everything();                //Update the screen        if(SDL_Flip(screen) == -1) { return 1; }                    endTimer = SDL_GetTicks();        deltaTimer = endTimer - startTimer;        if ( deltaTimer < ( 1000 / FPS ))        {            SDL_Delay( ( 1000 / FPS ) - deltaTimer );        }    }        sys_configupdate();    sys_cleanup();        return 0;}
开发者ID:dorkster,项目名称:espada,代码行数:37,


示例2: Main

/*--- codigo de la funcion ---*/int Main(void){	char *pt_str = str;	leds_off();	sys_init(); // inicializacion de la placa, interrupciones, puertos	Eint4567_init();	keyboard_init();	Uart_Init(115200); // inicializacion de la Uart	Uart_Config(); // configuración de interrupciones y buffers	while(1){		*pt_str = Uart_Getch1(); // leer caracter		if(pt_str[0] == 'L'){			led1_on();			led2_off();		} else if (pt_str[0] == 'R'){			led2_on();			led1_off();		}		else  {			D8Led_symbol(pt_str[0]-'0');		}	}}
开发者ID:huig-,项目名称:SED,代码行数:26,


示例3: mymain

int mymain(void){		char buf[100];	// system	sys_init();		// uart init	uart_init();		//puts("hello, world! /n");		puts("/n/n" __DATE__ "  " __TIME__ "/n");	puts("welcome to my boot v1.0 /n");		// UTXH0 -> data	while (1)	{		puts("akaedu $ ");		gets(buf);		puts("your input:");		puts(buf);		puts("/n");				}		while(1);		return 0;}
开发者ID:20400992,项目名称:ARM-Codes,代码行数:29,


示例4: main

int main(int argc, char *argv[]){	log_init(NAME);	if (options_parse(&argc, argv) != 0) {		exit(1);	}	sys_init();	if (comm_init()) {		exit(2);	}	log_str("Test mode: %d", opt_mode);	if (opt_mode) {		comm_sink_register("A", (comm_sink_func_t) sink_event, NULL);		comm_source_register("B", 0);	}	else {		comm_sink_register("B", (comm_sink_func_t) sink_event, NULL);		comm_source_register("A", 0);	}	sys_run();	return 0;}
开发者ID:hakit-dev,项目名称:hakit,代码行数:29,


示例5: main

int main(void){    sys_init();    oled_init();    timer_init(TIMER1);    timer_set_ms(TIMER1,16);        // Initial parameters    uint8_t x = OLED_WIDTH / 2;     // x initial position    uint8_t y = OLED_HEIGHT / 2;    // y initial position    uint8_t dx = 1;                 // x speed    uint8_t dy = 1;                 // y speed        oled_clearDisplay();    oled_drawPixel(x,y);    oled_render();        timer_start(TIMER1);    while(1)    {        if(oledUpdate)        {            LED ^= 1;            oled_clearDisplay();            move(&x, &y, &dx, &dy);            oled_render();            oledUpdate = 0;        }    }    return (0);}
开发者ID:JeshuaSan,项目名称:dsPIC33FJ_projects,代码行数:34,


示例6: main

int main(int argc, char *argv[] ){	unsigned char data = 0;	char temp = 0;	int ret = 0;	if((ret = sys_init())<0)	{		printf("LIBFTDI init failed, exit/n");		exit(1);	}	while(1){//		Write_JTAG(&ux400_ftdic, 0x0, 0xff, 3);//		Read_JTAG(&ux400_ftdic, &data, 1);//		printf("data = %d./n", data);	//		Write_JTAG(&ux400_ftdic, 0xff, 0xff, 3);//		Read_JTAG(&ux400_ftdic, &data, 1);//		printf("data = %d./n", data);	}}
开发者ID:xxha,项目名称:libftdi-0.19,代码行数:25,


示例7: bt_init

void bt_init ( void ){	sys_init();	mem_init();	memp_init();	pbuf_init();	UART2PrintString("mem mgmt initialized/r/n");	lwbt_memp_init();	phybusif_init("");	cb = malloc(sizeof(struct phybusif_cb));	phybusif_reset(cb);	if(hci_init() != ERR_OK) {		UART2PrintString("HCI initialization failed!/r/n");		return;	}	l2cap_init();	sdp_init();	rfcomm_init();	UART2PrintString("Bluetooth initialized./r/n");	bt_spp_start();	UART2PrintString("Applications started./r/n");}
开发者ID:Masa55,项目名称:BT_DROID,代码行数:26,


示例8: main

int main(){	int i =0;	volatile int j = 0, pass = 0, fail = 0;		//Global interrupt enable.	CyGlobalIntEnable;		sys_init();		//initiate data pattern.	for (j =0; j < 0x200; j++) {		Read_buffer_1[j] = (char)j;	}		//MountDisk();	for (j =0; j < 100; j++) {		SD_Sector_Write(Read_buffer_1, j);		SD_Sector_Read(Read_buffer_2, j);				if (0 == memcmp(Read_buffer_1, Read_buffer_2, 0x200))			pass++;		else 			fail++;	}	    for(;;)    {        /* Place your application code here. */    }}
开发者ID:siyasahu,项目名称:Mirafra-PSV,代码行数:31,


示例9: slr_init

void slr_init(void){    /* VERBOSE set by slr -t or -g */    char *vs = getenv("VERBOSE");    bool verbose = false;    if (vs && vs[0])        verbose = true;    char *data = getenv("SLR_DATA");    if (data)        load_binary_data(data, &__slr_base, verbose);    char *fdata = getenv("SLR_FDATA");    if (fdata)        load_binary_data(fdata, &__fibre_base, verbose);        /* MGSYS_QUIET set by user */    if (getenv("MGSYS_QUIET") != NULL)        verbose_boot = 0;    #if !defined(__slc_os_init_via_main__)    /* hlsim/ptl must be initialized via main first,      so sys_init gets called from _main() instead. */    sys_init(NULL, NULL, NULL);#endif}
开发者ID:jianfu,项目名称:slcore,代码行数:26,


示例10: main

//-----------------------------------------------------------------------------int main(void){  uint32_t cnt = 0;  bool fast = false;  sys_init();  timer_init();  uart_init(115200);  uart_puts("/r/nHello, world!/r/n");  HAL_GPIO_LED_out();  HAL_GPIO_LED_clr();  HAL_GPIO_BUTTON_in();  HAL_GPIO_BUTTON_pullup();  while (1)  {    if (HAL_GPIO_BUTTON_read())      cnt = 0;    else if (cnt < 5001)      cnt++;    if (5000 == cnt)    {      fast = !fast;      timer_set_period(fast ? PERIOD_FAST : PERIOD_SLOW);      uart_putc('.');    }  }  return 0;}
开发者ID:spiderkeys,项目名称:mcu-starter-projects,代码行数:35,


示例11: Main

/*--- codigo de la funcion ---*/void Main(void){    sys_init();        /* inicializacion de la placa, interrupciones, puertos y UART */		Lcd_Test();        /* inicializacion LCD y visualizacion texto y rectangulos     */	while(1);}
开发者ID:wynro,项目名称:proyecto-hardware,代码行数:8,


示例12: main

int main(int argc, char **argv){  int status;   if (argc!=2)    {      fprintf(stderr, "usage: tci_lower <mode>/n");      exit(-1);    }  linux_sys_mode=atoi(argv[1]);  switch(linux_sys_mode)    {    case 0:            fprintf(stderr, "TCI_UPPER: A/n");      break;    case 1:         fprintf(stderr, "TCI_UPPER: B/n");      break;    default:      fprintf(stderr, "invalid mode (0 or 1)/n");      return -1;      break;    }  sys_init();  prh_tci_init();  while(1);}
开发者ID:jprothwell,项目名称:sc-fix,代码行数:33,


示例13: main

int main(int argc, char **argv){    t_bdaddr iutBdAddr;    if (argc < 2)    {        fprintf(stderr, "usage: tester_l2cap <test_num>");        exit(-1);    }    test_num=atoi(argv[1]);    linux_sys_mode=0;    fprintf(stderr, "L2CAP TESTER: TEST No. %d", test_num);    sys_init(linux_sys_mode);    fprintf(stderr,"L2CAP TESTER: starting the stack/n");    MGR_Init(0);    l2_init_lower_tester();    MGR_ParseHexBDAddress(IUT_BDADDR, &iutBdAddr);    l2_lower_tester(test_num, iutBdAddr);    while(1);}
开发者ID:jprothwell,项目名称:sc-fix,代码行数:29,


示例14: Main

/*--- codigo de funciones ---*/void Main(void){	/* Inicializa controladores */	sys_init();        // Inicializacion de la placa, interrupciones y puertos	timer_init();	   // Inicializacion del temporizador	mybutton_init();	// inicializamos los pulsadores. Cada vez que se pulse se verá reflejado en el 8led	D8Led_init(); // inicializamos el 8led	/* Valor inicial de los leds */	leds_off();	led1_on();	while (1)	{		/* Cambia los leds con cada interrupcion del temporizador */		if (switch_leds == 1)		{			leds_switch();			switch_leds = 0;		}		comprobar_boton();	}}
开发者ID:lucasDoe,项目名称:PH,代码行数:27,


示例15: main

int main(void){  /* setup controller */  sys_init();	  /* setup u8g and m2 libraries */  setup();  /* application main loop */  for(;;)  {      m2_CheckKey();    if ( m2_HandleKey() )     {      /* picture loop */      u8g_FirstPage(&u8g);      do      {	draw();        m2_CheckKey();      } while( u8g_NextPage(&u8g) );    }    set_next_state();  }  }
开发者ID:freemanjiang,项目名称:m2tklib,代码行数:25,


示例16: Main

void Main() {    // Initialize the system:    sys_init();    InitializeSystem();    // Initialize the output:    TurnOnLCD();    Set8Led(0);    // Initialize the data:    InitializeGame();    // Initialize the input:    SetOnKeyboardDown(OnKeyboardDown);    InitializeKeyboardInterrupts();    SetOnButtonDown(OnButtonDown);    SetOnButtonUp(OnButtonUp);    InitializeButtonsInterrupts();    // Initialize the timers:    SimpleInitializeTimerInterrupts(TIMER_ID0, MAX_TIME_COUNT, (unsigned)UpdateOnTimer);    // Initialize the UART1:    InitializeUART(BAUDS_115200);    //ActivateInterruptsUART1((unsigned)OnReceiveUART);    // Call the main loop:    MainLoopWithPolling();}
开发者ID:RotaruDan,项目名称:DESgame,代码行数:29,


示例17: main

int main(void){  __disable_interrupt();  sys_init();  __delay_cycles(8000000);//Защита от коротких нажатий  P1OUT |= BIT6; //защелкиваем питание  led(1);  ADC10_Init();  AFE_Init();  rf_init();  TACCR0 = 0xFFFF;// запуск таймера  __enable_interrupt(); while (1) {   if(rf_rx_data_ready_fg) {     onRF_MessageReceived();     rf_rx_data_ready_fg = 0;   }   if (packetDataReady){            uchar packetSize = assemblePacket();     rf_send((uchar*)&packet_buf[0], packetSize);     packetDataReady = 0;         }   if(rf_rx_data_ready_fg || packetDataReady){  // идем по циклу снова   }else{   __bis_SR_register(CPUOFF + GIE); // Уходим в спящий режим    } }} 
开发者ID:Alvw,项目名称:Ads8Hc05,代码行数:31,


示例18: main

int main(int argc, char *argv[] ){	unsigned char fan = 0;	char temp = 0;	int ret = 0;	if(argc != 2){		printf("usage: ux400opm 1/0/n");		exit(0);	}	if((ret = sys_init())<0)	{		printf("LIBFTDI init failed, exit/n");		exit(1);	}	temp = cpldver();	if(temp < 0 )	{		printf("Read CPLD version failed, exit/n");		exit(1);	}	if(atoi(argv[1]) == 1){		opm_pwr(OPM_ON);	}else{		opm_pwr(OPM_OFF);	}	ftdi_usb_close(&ux400_ftdic);	ftdi_deinit(&ux400_ftdic);}
开发者ID:xxha,项目名称:libftdi-0.19,代码行数:33,


示例19: Main

/*--- codigo de funciones ---*/void Main(void){	/* Inicializa controladores */	exception_init();	sys_init();        // Inicializacion de la placa, interrupciones y puertos	timer_init();	   // Inicializacion del temporizador	Eint4567_init();	// inicializamos los pulsadores. Cada vez que se pulse se verá reflejado en el 8led	D8Led_init(); // inicializamos el 8led	Timer2_Inicializar(); /* Configura el Timer2 */	Timer3_Inicializar(); /* Configura el Timer2 */	pila_Init();	Timer0_Empezar();	Timer2_Empezar();	juegoSudoku();	//push_debug(0xFFFFFFFF,Timer2_Leer());	while(1);}
开发者ID:sanz1995,项目名称:Proyecto-Hardware,代码行数:26,


示例20: init

void init(void){	sys_init();	spis_init(&spis_dev);	spis_set_select_cb(&spis_dev, spis_select, NULL);	spis_set_deselect_cb(&spis_dev, spis_deselect, NULL);}
开发者ID:AdamRLukaitis,项目名称:mos,代码行数:7,


示例21: Main

void Main(void) {	/* Inicializa controladores */	sys_init();        // Inicializacion de la placa, interrupciones y puertos	D8Led_init(); // inicializamos el 8led	Button_init(0, 9); // inicializamos los pulsadores. Cada vez que se pulse se verá reflejado en el 8led	init_game();}
开发者ID:wynro,项目名称:proyecto-hardware,代码行数:8,


示例22: user_init

/*USER INIT FUNCTION, called in main.c*/int user_init (HTTP_INFO *info){	sys_init (info);	net_init (info);	io_init (info); //init variables from conf file	pm_init (info);	return 0;}
开发者ID:meloun,项目名称:lnx_myweb,代码行数:9,


示例23: init

void init(void){	sys_init();	pwm_init(&pwm0);	pwm_init(&pwm1);	pwm_init(&pwm2);	pwm_init(&pwm3);}
开发者ID:AdamRLukaitis,项目名称:mos,代码行数:8,


示例24: init

void init(){	sys_init();	// this utest requires very basic gpio module also	gpio_init_pin(&gpio_mco);	gpio_init_pin(&gpio_systick);}
开发者ID:othane,项目名称:mos,代码行数:8,


示例25: lwip_init

/** * Perform Sanity check of user-configurable values, and initialize all modules. */voidlwip_init(void){  /* Sanity check user-configurable values */  lwip_sanity_check();  /* Modules initialization */  stats_init();#if !NO_SYS  sys_init();#endif /* !NO_SYS */  mem_init();  memp_init();  pbuf_init();  netif_init();#if LWIP_SOCKET  lwip_socket_init();#endif /* LWIP_SOCKET */  ip_init();#if LWIP_ARP  etharp_init();#endif /* LWIP_ARP */#if LWIP_RAW  raw_init();#endif /* LWIP_RAW */#if LWIP_UDP  udp_init();#endif /* LWIP_UDP */#if LWIP_TCP  tcp_init();#endif /* LWIP_TCP */#if LWIP_SNMP  snmp_init();#endif /* LWIP_SNMP */#if LWIP_AUTOIP  autoip_init();#endif /* LWIP_AUTOIP */#if LWIP_IGMP  igmp_init();#endif /* LWIP_IGMP */#if LWIP_DNS  dns_init();#endif /* LWIP_DNS */#if LWIP_TIMERS  sys_timeouts_init();#endif /* LWIP_TIMERS */#if !NO_SYS  /* in the Xilinx lwIP 1.2.0 port, lwip_init() was added as a convenience utility function     to initialize all the lwIP layers. lwIP 1.3.0 introduced lwip_init() in the base lwIP     itself. However a user cannot use lwip_init() regardless of whether it is raw or socket     modes. The following call to lwip_sock_init() is made to make sure that lwIP is properly     initialized in both raw & socket modes with just a call to lwip_init().   */  lwip_sock_init();#endif}
开发者ID:GiannisRambo,项目名称:lwip,代码行数:61,


示例26: platform_init_OT

void platform_init_OT() {    buffers_init(); //buffers init must be first in order to do core dumps    vl_init();      //Veelite init must be second    radio_init();   //radio init third    sys_init();     //system init last}
开发者ID:jpnorair,项目名称:OpenTag,代码行数:9,


示例27: neko_standalone_init

void neko_standalone_init() {#	ifndef CONSOLE_MODE	sys_init();	ui_main();#	endif	std_main();	regexp_main();	zlib_main();}
开发者ID:0b1kn00b,项目名称:xcross,代码行数:9,


示例28: lwip_init

/** * Perform Sanity check of user-configurable values, and initialize all modules. */voidlwip_init(void){  /*++ Changed by Espressif ++*/  MEMP_NUM_TCP_PCB = 5;  TCP_WND = (4 * TCP_MSS);  TCP_MAXRTX = 3;  TCP_SYNMAXRTX = 6;  /*--                      --*/  /* Modules initialization */  stats_init();#if !NO_SYS  sys_init();#endif /* !NO_SYS *//*++ Changed by Espressif ++*/#if 0  mem_init(&_bss_end);#endif/*--                      --*/  memp_init();  pbuf_init();  netif_init();#if LWIP_SOCKET  lwip_socket_init();#endif /* LWIP_SOCKET */  ip_init();#if LWIP_ARP  etharp_init();#endif /* LWIP_ARP */#if LWIP_RAW  raw_init();#endif /* LWIP_RAW */#if LWIP_UDP  udp_init();#endif /* LWIP_UDP */#if LWIP_TCP  tcp_init();#endif /* LWIP_TCP */#if LWIP_SNMP  snmp_init();#endif /* LWIP_SNMP */#if LWIP_AUTOIP  autoip_init();#endif /* LWIP_AUTOIP */#if LWIP_IGMP  igmp_init();#endif /* LWIP_IGMP */#if LWIP_DNS  dns_init();#endif /* LWIP_DNS */#if LWIP_TIMERS  sys_timeouts_init();#endif /* LWIP_TIMERS */}
开发者ID:sdelavega,项目名称:smart.js,代码行数:60,


示例29: main

int main(int argc, char **argv){  int a;#if !WIN_DB  linux_sys_mode=0;	  sys_init(linux_sys_mode);	#else//	startHost();#endif    fprintf(stderr,"starting the stack/n");    /*  prh_mgr_initStack(argc,argv); */   MGR_Init(0);  MGR_SetSecurityMode(MGR_NOSECURITY, NULL);  HCI_WriteScanEnable(3);  /*    MGR_SetConnectableMode(MGR_CONNECTABLE,test);    a = MGR_SetDiscoverableMode(MGR_GENERALDISCOVERY,test);  */    pDebugCheck();    Test_Data_Base_Setup();    pDebugCheck();  SDP_OpenSearch();    fprintf(stderr,"SDP server up and running./n");  while(1)    {#if WIN_DB		Sleep(1000);#else		pDebugSleep(1);#endif    }  }
开发者ID:jprothwell,项目名称:sc-fix,代码行数:56,


示例30: main

int main(int argc, char *argv[]){	char *app;	int use_ssl = 1;  // 0 = disable SSL, 2 = allow insecure SSL	if (options_parse(&argc, argv) != 0) {		exit(1);	}	if (opt_daemon) {		run_as_daemon();	}	/* Init exec environment */	env_init(argc, argv);	/* Init log management */	log_init("hakit");	log_str(options_summary);	log_str("Using libwebsockets version " LWS_LIBRARY_VERSION " build " LWS_BUILD_HASH);	/* Init system runtime */	sys_init();	/* Init communication engine */	if (opt_no_ssl) {		use_ssl = 0;	}	else if (opt_insecure_ssl) {		use_ssl = 2;	}	if (comm_init(use_ssl, opt_no_hkcp ? 0:1, opt_hosts)) {		return 2;	}	if (opt_monitor) {		comm_monitor((comm_sink_func_t) monitor_sink_event, NULL);	}	/* Init module management */	if (hk_mod_init(opt_class_path)) {		return 2;	}	app = env_app();	if (app != NULL) {		if (hk_mod_load(app)) {			return 3;		}		hk_obj_start_all();	}	sys_run();	return 0;}
开发者ID:hakit-dev,项目名称:hakit,代码行数:56,



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


C++ sys_ioctl函数代码示例
C++ sys_inb函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。