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

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

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

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

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

示例1: main

void main(){	uint32 f; /* frequency in hz */		f = 200;    systemInit();    usbInit();	/* PWM duty cycle */	T1CC1L = 0x40;	T1CC1H = 0x00;	/* setup Timer 1, alt location 2 and prescaler 128*/	t1Init(IO_LOC_ALT_2, PRESCALER_128);	/* setup Channel 1, compare mode, clear on compare up and peripheral*/	t1ChannelInit(CHANNEL1, COMPARE_MODE, CLR_ON_COMP_UP, PERIPHERAL);	/* start Timer 1 by setting it's mode to modulo */	t1Mode(MODE_MODULO);	/* set Timer 1 frequency */	setT1Frequency(f);    while(1)    {        boardService();        updateLeds();        usbComService();    }}
开发者ID:dpark83,项目名称:wixel-pwm,代码行数:32,


示例2: main

void main(void) {	uint16 	speed = param_speed;	uint8	port = param_port, 			pin=param_pin;	uint8 	ServoPos = 120;	uint8 	dir=1;		systemInit();	usbInit();	InitServos();		EA=1; // Global interrupt enabled	SetPin(0, port, pin);	SetPin(1, 0, 1);	SetPin(2, 0, 3);	while (1) {		delayMs(speed);		usbComService();				if (dir==1) {			++ServoPos;		}		else {			--ServoPos;		}		if (ServoPos > 253 || ServoPos < 2) {			dir ^=1;		}		SetPos(0,ServoPos);		SetPos(1,128);		SetPos(2,64);	}}
开发者ID:jpvlsmv,项目名称:Wixel-Servo-Lib,代码行数:35,


示例3: main

int main(){    systemInit();    platformInit();    delay_ms(100);    DEBUG_PRINT("init successfully/n");    while(1){        uint32_t systick = timerGetRun();        mpu9150Get();        // result = dmp_read_quat(quat, &more);        // result = mpu_get_compass_reg(compass,&sensor_timestamp);        while(timerGetRun() < systick + 49)        {                    }        sbn1HandleReceived();    }}
开发者ID:BHFaction,项目名称:SanBot,代码行数:27,


示例4: main

int main(int argc, char **argv) {	ChickpeaWindow window;	systemInit(&window, "Hello Chickpea", X_RES, Y_RES, 0, 0, 0);		TexturedShader shader;	loadShaderTextured(&shader, "textured_vertex.glsl", "textured_fragment.glsl");	int emojiTexture = loadTexture("emoji.png", 0, 0);	MVPMatrices mvp;	initMVP(&mvp);	float aspect = (float)X_RES/(float)Y_RES;	matrixSetOrthoProjection(mvp.projectionMatrix, -aspect, aspect, -1.0, 1.0, -1.0, 1.0);	setShaderMVP(&mvp, shader.programID, shader.modelMatrixUniform, shader.viewMatrixUniform, shader.projectionMatrixUniform);	glEnable(GL_BLEND);	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);	int done = 0;	SystemEvent event;	while (!done) {		while (systemPollEvent(&window, &event)) {			if (event.type == EVENT_QUIT) {				done = 1;			}		}		glClear(GL_COLOR_BUFFER_BIT);		drawTexture(emojiTexture, 0.8, 0.8, 0.0, 0.0, shader.positionAttribute, shader.texCoordAttribute);		systemShowFrame(&window);	}	systemShutdown();}
开发者ID:ivansafrin,项目名称:chickpea,代码行数:33,


示例5: main

int main(void){  // Configure cpu and mandatory peripherals  systemInit();  // Make sure that projectconfig.h is properly configured for this example  #if !defined CFG_CHIBI    #error "CFG_CHIBI must be enabled in projectconfig.h for this example"  #endif  #if CFG_CHIBI_PROMISCUOUS != 0    #error "CFG_CHIBI_PROMISCUOUS must be set to 0 in projectconfig.h for this example"  #endif  #ifdef CFG_CHIBI    uint32_t counter = 0;    chb_pcb_t *pcb = chb_get_pcb();    while(1)    {      // Enable LED      gpioSetValue (CFG_LED_PORT, CFG_LED_PIN, CFG_LED_ON);       // Create and send the message      char text[10];      counter++;      itoa(counter, text, 10);      chb_write(0xFFFF, text, strlen(text) + 1);      // Disable LED      gpioSetValue (CFG_LED_PORT, CFG_LED_PIN, CFG_LED_OFF);       systickDelay(250);    }  #endif  return 0;}
开发者ID:Commander-Latte,项目名称:Root2-Robotathon-Demo,代码行数:34,


示例6: main

int main(void){  // Configure cpu and mandatory peripherals  systemInit();  uint32_t currentSecond, lastSecond;  currentSecond = lastSecond = 0;  while (1)  {    // Toggle LED once per second ... rollover = 136 years :)    currentSecond = systickGetSecondsActive();    if (currentSecond != lastSecond)    {      lastSecond = currentSecond;      if (gpioGetValue(CFG_LED_PORT, CFG_LED_PIN) == CFG_LED_OFF)      {        gpioSetValue (CFG_LED_PORT, CFG_LED_PIN, CFG_LED_ON);       }      else      {        gpioSetValue (CFG_LED_PORT, CFG_LED_PIN, CFG_LED_OFF);       }    }    // Poll for CLI input if CFG_INTERFACE is enabled in projectconfig.h    #ifdef CFG_INTERFACE       cmdPoll();     #endif  }  return 0;}
开发者ID:tengzhang8,项目名称:olyMEMS,代码行数:33,


示例7: main

intmain(void){  // Configure cpu and mandatory peripherals  systemInit();  uint32_t currentSecond, lastSecond;  currentSecond = lastSecond = 0;    // uartInit(115200);  prt();  while (1)  {    // Toggle LED once per second    currentSecond = systickGetSecondsActive();    if (currentSecond != lastSecond)    {      lastSecond = currentSecond;      gpioSetValue(CFG_LED_PORT, CFG_LED_PIN, !(gpioGetValue(CFG_LED_PORT, CFG_LED_PIN)));      uartSendByte('*');    }    // Poll for CLI input if CFG_INTERFACE is enabled in projectconfig.h    #ifdef CFG_INTERFACE       cmdPoll();     #endif  }  return 0;}
开发者ID:Datamuseum-DK,项目名称:ARM.lpt-usb,代码行数:31,


示例8: main

/** Configures the USB and radio communication then calls the processBytesFromUsb and * processBytesFromRadio functions. **/void main(){    // required by wixel api:    // http://pololu.github.io/wixel-sdk/group__libraries.html    systemInit();    usbInit();    radioLinkInit();    // wait for a wireless pairing    // between two wixels    // blink yellow LED while connection is being established    while(!radioLinkConnected()) {        yellowLedOn ^= 1;        updateLeds();        delayMs(DELAY_MS);    }    // turn off LED    yellowLedOn = 0;    // process bytes    while(1)    {        boardService();        updateLeds();        usbComService();        processBytesFromUsb();        processBytesFromRadio();      }}
开发者ID:NxRLab,项目名称:gibbot,代码行数:35,


示例9: main

void main(){   	uint32 last_ms;	systemInit();	//configure the P1_2 and P1_3 IO pins	makeAllOutputs(LOW);	//initialise Anlogue Input 0	P0INP = 0x1;	//initialise the USB port	usbInit();	usbComRequestLineStateChangeNotification(LineStateChangeCallback);		last_ms = getMs();	while (1)	{		boardService();		usbComService();		if((getMs()-last_ms) >=5000){			LED_YELLOW_TOGGLE();			printf("batteryPercent: %i/r/n", batteryPercent(adcRead(0 | ADC_REFERENCE_INTERNAL)));			last_ms=getMs();		}	}}
开发者ID:AdrianLxM,项目名称:wixel-sdk,代码行数:25,


示例10: main

intmain(void){	systemInit();	behaviorSystemInit(behaviorTask, 4096);	osTaskStartScheduler();	return 0;}
开发者ID:cydvicious,项目名称:rone,代码行数:8,


示例11: main

void main(){    systemInit();    applicationInit();    while (1)    {        applicationTask();    }}
开发者ID:MikroElektronika,项目名称:Click_MatrixRGB_2239,代码行数:10,


示例12: systemInit

GGAudioManager::GGAudioManager(){    systemInit();    interrupted_ = false;    soundManager_ = new GGSoundManager();    createBackgroundMusicInterface();    gevent_AddCallback(tick_s, this);}
开发者ID:Nlcke,项目名称:gideros,代码行数:10,


示例13: main

int main(void){  // Configure cpu and mandatory peripherals  systemInit();  // Check if projectconfig.h is properly configured for this example  #if !defined CFG_CHIBI    #error "CFG_CHIBI must be enabled in projectconfig.h for this example"  #endif  #if CFG_CHIBI_PROMISCUOUS == 0    #error "CFG_CHIBI_PROMISCUOUS must set to 1 in projectconfig.h for this example"  #endif  #if !defined CFG_PRINTF_UART    #error "CFG_PRINTF_UART must be enabled in projectconfig.h for this example"  #endif  #if defined CFG_INTERFACE    #error "CFG_INTERFACE must be disabled in projectconfig.h for this example"  #endif  #if defined CFG_CHIBI && CFG_CHIBI_PROMISCUOUS != 0    // Get a reference to the Chibi peripheral control block    chb_pcb_t *pcb = chb_get_pcb();        // Wait for incoming frames and transmit the raw data over uart    while(1)    {      // Check for incoming messages       while (pcb->data_rcv)       {         // get the length of the data        rx_data.len = chb_read(&rx_data);        // make sure the length is nonzero        if (rx_data.len)        {          // Enable LED to indicate message reception           gpioSetValue (CFG_LED_PORT, CFG_LED_PIN, CFG_LED_ON);           // Send raw data to UART for processing on          // the PC (requires WSBridge - www.freaklabs.org)          uint8_t i;          for (i=0; i<rx_data.len; i++)          {            // Send output to UART            uartSendByte(rx_data.data[i]);          }          // Disable LED          gpioSetValue (CFG_LED_PORT, CFG_LED_PIN, CFG_LED_OFF);         }      }    }  #endif  return 0;}
开发者ID:DragonWar,项目名称:RSL,代码行数:55,


示例14: systemTask

void systemTask(void *arg) {    bool pass = true;    //Init the high-levels modules    systemInit();#ifndef USE_UART_CRTP#ifdef UART_OUTPUT_TRACE_DATA    debugInitTrace();#endif#ifdef HAS_UART    uartInit();#endif#endif //ndef USE_UART_CRTP    commInit();    DEBUG_PRINT("Crazyflie is up and running!/n");    DEBUG_PRINT("Build %s:%s (%s) %s/n", V_SLOCAL_REVISION, V_SREVISION, V_STAG, (V_MODIFIED) ? "MODIFIED" : "CLEAN");    DEBUG_PRINT("I am 0x%X%X%X and I have %dKB of flash!/n", *((int* )(0x1FFFF7E8 + 8)), *((int* )(0x1FFFF7E8 + 4)), *((int* )(0x1FFFF7E8 + 0)), *((short* )(0x1FFFF7E0)));    commanderInit();    stabilizerInit();    //Test the modules    pass &= systemTest();    pass &= commTest();    pass &= commanderTest();    pass &= stabilizerTest();    //Start the firmware    if (pass) {        systemStart();        ledseqRun(LED_RED, seq_alive);        ledseqRun(LED_GREEN, seq_testPassed);    } else {        if (systemTest()) {            while (1) {                ledseqRun(LED_RED, seq_testPassed); //Red passed == not passed!                vTaskDelay(M2T(2000) );            }        } else {            ledInit();            ledSet(LED_RED, true);        }    }    workerLoop();    //Should never reach this point!    while (1)        vTaskDelay(portMAX_DELAY);}
开发者ID:microtrigger,项目名称:CrazyFlieFirmware,代码行数:52,


示例15: main

int main(void) {	// init the rone hardware and roneos services	systemInit();	// init the behavior system and start the behavior thread	behaviorSystemInit(behaviorTask, 4096);	// Start the scheduler	osTaskStartScheduler();	// should never get here.  If so, you have a bad memory problem in the scheduler	return 0;}
开发者ID:cydvicious,项目名称:rone,代码行数:13,


示例16: main

int main(void){    // Configure clock, this figures out HSE for hardware autodetect    SetSysClock(0);    systemInit();    Serial1 = uartOpen(USART1, &receive_cb, 115200, MODE_RXTX);    init_printf( NULL, _putc);    while (1);}
开发者ID:byu-magicc,项目名称:BreezySTM32,代码行数:13,


示例17: main

void main(){    systemInit();    usbInit();    while(1)    {        boardService();        updateLeds();        usbComService();        processBytesFromUsb();    }}
开发者ID:dpark83,项目名称:wixel-pwm,代码行数:13,


示例18: main

int main(void){  #ifndef CFG_PWM    #ERROR "CFG_PWM must be enabled in projectconfig.h for this example."  #endif  // Configure cpu and mandatory peripherals  // PWM is initialised in systemInit and defaults to using P1.9  systemInit();  // Set duty cycle to 50% for square wave output  pwmSetDutyCycle(50);  // Frequency can be set anywhere from 2khz and 10khz (4khz is loudest)  // Note: Since this is a 16-bit timer, make sure the delay is not  //       greater than 0xFFFF (65535), though anything 2khz and higher  //       is within an acceptable range  // The piezo buzzer used for this example is the PS1240, available at  // http://www.adafruit.com/index.php?main_page=product_info&cPath=35&products_id=160  pwmSetFrequencyInTicks(CFG_CPU_CCLK / 2000);  uint32_t currentSecond, lastSecond;  currentSecond = lastSecond = 0;  while (1)  {    // Beep the piezo buzzer very briefly once per second, toggling the LED at the same time    currentSecond = systickGetSecondsActive();    // Make sure that at least one second has passed    if (currentSecond != lastSecond)    {      // Update the second tracker      lastSecond = currentSecond;      // Set the LED state and buzzer loudness depending on the current LED state      if (gpioGetValue(CFG_LED_PORT, CFG_LED_PIN) == CFG_LED_OFF)      {        pwmSetFrequencyInTicks(CFG_CPU_CCLK / 4000);            // 4khz (louder)        pwmStartFixed(200);                                     // 2x as long as @ 2khz since it's 2x faster        gpioSetValue (CFG_LED_PORT, CFG_LED_PIN, CFG_LED_ON);   // Turn the LED on      }      else      {        pwmSetFrequencyInTicks(CFG_CPU_CCLK / 2000);            // 2khz (softer)        pwmStartFixed(100);                                            gpioSetValue (CFG_LED_PORT, CFG_LED_PIN, CFG_LED_OFF);  // Turn the LED off      }    }  }  return 0;}
开发者ID:AhmedBadran,项目名称:lpc1343codebase,代码行数:51,


示例19: main

int main(void) {	// init the rone hardware and roneos services	systemInit();	// init the behavior system and start the behavior thread	behaviorSystemInit(behaviorTask, 4096);	osTaskCreate(backgroundTask, "background", 1536, NULL, BACKGROUND_TASK_PRIORITY);	// Start the scheduler	osTaskStartScheduler();	// should never get here.  If so, you have a bad memory problem in the scheduler	return 0;}
开发者ID:cydvicious,项目名称:rone,代码行数:14,


示例20: main

void main(){    systemInit();    usbInit();    analogInputsInit();    while(1)    {        boardService();        updateLeds();        usbComService();        sendReportIfNeeded();    }}
开发者ID:emi-buet,项目名称:EmpathRepository,代码行数:14,


示例21: main

void main(){    systemInit();    usbInit();    setup_DS1820();    while(1)    {        boardService();        updateLeds();        usbComService();        handleOneWire();    }}
开发者ID:AdrianLxM,项目名称:wixel-sdk,代码行数:14,


示例22: main

void main(){    systemInit();    usbInit();    perTestTxInit();    while(1)    {        boardService();        updateLeds();        usbComService();        sendRadioBursts();    }} 
开发者ID:kshn,项目名称:Wixel_599,代码行数:14,


示例23: init

int init(void *handle) {	MAIN *m = handle;	m->var.state = STATE_DUMMY;	m->var.newstate = STATE_INVENTORY;	/* TODO: M
C++ systemTime函数代码示例
C++ systemError函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。