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

C++ InitializeSystem函数代码示例

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

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



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

示例1: main

/*******************************************************************************
* Function Name: main
********************************************************************************
*
* Summary:
*  Main function.
*
* Parameters:
*  None
*
* Return:
*  None
*
*******************************************************************************/
int main()
{
    /* Setup the system initially */
    InitializeSystem();

    /* Three simple APIs that showcases dynamic ADV payload update */
    for(;;)
    {
        /* Single API call to service all the BLE stack events. Must be
         * called at least once in a BLE connection interval */
        CyBle_ProcessEvents();

        /* Configure the system in lowest possible power modes during and between BLE ADV events */
        EnterLowPowerMode();

        /*
           LOW_POWER_NOTE - If you like to measure the current consumed by this project, following changes are to be
           done to achieve lowest possible current number:
           1. Set the "Debug Select" option under Dynamic Broadcaster.cydwr -> System -> Programming/Debugging to GPIO
           2. Comment out Advertising_LED_Write(LED_ON); line of code in StackEventHandler routine
        */

#if ENABLE_DYNAMIC_ADV
        DynamicADVPayloadUpdate();
#endif

    }
}
开发者ID:carnac100,项目名称:PSoC-4-BLE,代码行数:42,代码来源:main.c


示例2: main

void main(void) {
    InitializeSystem();

    while (1) {
        // Comprueba el terminal que indica la conexión USB al inicio o al reset
        if (PORTBbits.RB4 == 1) {
            // Si no se ha activado el USB, lo activa
            if ((USBGetDeviceState() == DETACHED_STATE)) {
                USBDeviceAttach();
            } else {
                // Si ya se ha activado, realiza las tareas USB
                // USB Tasks
                blinkUSBStatus();
                processUSBData();
            }
        } else {
            // Si no está conectado el terminal USB, entra en modo de bajo consumo
            USBDeviceDetach();
            LATCbits.LATC0 = 0;
            OSCCONbits.IDLEN = 0;
            Sleep();
            Nop();
        }
    }//end while
}//end main
开发者ID:dacan84,项目名称:u-mote,代码行数:25,代码来源:main.c


示例3: 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,代码来源:main.c


示例4: main

int main()
{
	// Do some basic initialization tasks
	InitializeSystem();

	// Initialize pins for LEDs
	InitializeLEDs();

	// Enable printf via trace macrocell (get output with 'make trace')
	EnableDebugOutput(DEBUG_ITM);
	//printf("step\n %d");
	//Turn on all LEDs
	_Bool isOn = 0;
	int val = 1 | 2 | 4 | 8;
	while (1) {
		if (isOn == 0) {
			val = (val<<1) | (val<0);
			SetLEDs(val);
			isOn = 1;
		} else {
			SetLEDs(0 | 0 | 0 | 0);
			isOn = 0;
			iprintf("test\r\n");
		}
		Delay( 10 );
	}
}
开发者ID:monestereo,项目名称:U23_2013_examples,代码行数:27,代码来源:main.c


示例5: ResetParameters

CPSSpawnEffect::CPSSpawnEffect(int maxParticles, const Vector &origin, float scale, float scaledelta, float radius, float radiusdelta, float velocity, int sprindex, int r_mode, byte r, byte g, byte b, float a, float adelta, float timetolive)
{
	index = 0;// the only good place for this
	removenow = false;
	ResetParameters();
	if (!InitTexture(sprindex))
	{
		removenow = true;
		return;
	}
	m_iMaxParticles = maxParticles;
	VectorCopy(origin, m_vecOrigin);
	m_fScale = scale;
	m_fScaleDelta = scaledelta;
	m_fRadius = radius;
	m_fRadiusDelta = radiusdelta;
	m_color.r = r;
	m_color.g = g;
	m_color.b = b;
	m_fBrightness = a;
	m_fBrightnessDelta = adelta;
	m_iRenderMode = r_mode;

	if (timetolive <= 0.0f)
		m_fDieTime = -1.0f;
	else
		m_fDieTime = gEngfuncs.GetClientTime() + timetolive;

	InitializeSystem();
	m_iNumParticles = m_iMaxParticles;// all particles are present at start

	for (int i = 0; i < m_iNumParticles; ++i)
		InitializeParticle(i);
}
开发者ID:mittorn,项目名称:hlwe_src,代码行数:34,代码来源:PSSpawnEffect.cpp


示例6: ResetParameters

CPSBubbles::CPSBubbles(int maxParticles, const Vector &origin, const Vector &direction, const Vector &spread, float partvelocity, float size, int sprindex, int frame, float PartEmitterLife)
{
	index = 0;
	removenow = false;
	ResetParameters();
	if (!InitTexture(sprindex))
	{
		removenow = true;
		return;
	}
	m_iMaxParticles = maxParticles;
	VectorCopy(origin, m_vecOrigin);
	if (VectorCompare(origin, direction))
	{
		VectorClear(m_vecDirection);
		m_flRandomDir = true;
	}
	else
	{
		VectorCopy(direction, m_vecDirection);
		m_flRandomDir = false;
	}
	VectorCopy(spread, m_vecSpread);
	m_fParticleVelocity = partvelocity;
	m_iRenderMode = kRenderTransAdd;
	m_iFrame = frame;
	m_fScale = size;

	if (PartEmitterLife <= 0)
		m_fDieTime = -1;
	else
		m_fDieTime = gEngfuncs.GetClientTime() + PartEmitterLife;

	InitializeSystem();
}
开发者ID:mittorn,项目名称:hlwe_src,代码行数:35,代码来源:PSBubbles.cpp


示例7: main

int main(void)
#endif
{
    InitializeSystem();

#if defined(USB_INTERRUPT)
    USBDeviceAttach();
#endif

    while(1)
    {
#if defined(USB_POLLING)
        // Check bus status and service USB interrupts.
        USBDeviceTasks(); // Interrupt or polling method.  If using polling, must call
        // this function periodically.  This function will take care
        // of processing and responding to SETUP transactions
        // (such as during the enumeration process when you first
        // plug in).  USB hosts require that USB devices should accept
        // and process SETUP packets in a timely fashion.  Therefore,
        // when using polling, this function should be called
        // frequently (such as once about every 100 microseconds) at any
        // time that a SETUP packet might reasonably be expected to
        // be sent by the host to your device.  In most cases, the
        // USBDeviceTasks() function does not take very long to
        // execute (~50 instruction cycles) before it returns.
#endif


        // Application-specific tasks.
        // Application related code may be added here, or in the ProcessIO() function.
        ProcessIO();
    }//end while
}//end main
开发者ID:pimplod,项目名称:PIC-USB-Programmer,代码行数:33,代码来源:main.c


示例8: main

int main ( void )
{
    // Initialize the processor and peripherals.
    if ( InitializeSystem() != TRUE )
    {
        UART2PrintString( "\r\n\r\nCould not initialize USB Custom Demo App - system.  Halting.\r\n\r\n" );
        while (1);
    }
    if ( USBHostInit(0) == TRUE )
    {
        UART2PrintString( "\r\n\r\n***** USB Custom Demo App Initialized *****\r\n\r\n" );
    }
    else
    {
        UART2PrintString( "\r\n\r\nCould not initialize USB Custom Demo App - USB.  Halting.\r\n\r\n" );
        while (1);
    }

    // Main Processing Loop
    while (1)
    {
        // This demo does not check for overcurrent conditions.  See the
        // USB Host - Data Logger for an example of overcurrent detection
        // with the PIC24F and the USB PICtail Plus.

        // Maintain USB Host State
        USBHostTasks();
        // Maintain Demo Application State
        ManageDemoState();
    }

    return 0;

} // main
开发者ID:Athuli7,项目名称:Microchip,代码行数:34,代码来源:main.c


示例9: main

/******************************************************************************
 * Function:        void main(void)
 *
 * PreCondition:    None
 *
 * Input:           None
 *
 * Output:          None
 *
 * Side Effects:    None
 *
 * Overview:        Main program entry point.
 *
 * Note:            None
 *****************************************************************************/
int main(void)
{   
    InitializeSystem();

    #if defined(USB_INTERRUPT)
        USBDeviceAttach();
    #endif

    while(1)
    {
        #if defined(USB_POLLING)
		// Check bus status and service USB interrupts.
        USBDeviceTasks(); // Interrupt or polling method.  If using polling, must call
        				  // this function periodically.  This function will take care
        				  // of processing and responding to SETUP transactions 
        				  // (such as during the enumeration process when you first
        				  // plug in).  USB hosts require that USB devices should accept
        				  // and process SETUP packets in a timely fashion.  Therefore,
        				  // when using polling, this function should be called 
        				  // regularly (such as once every 1.8ms or faster** [see 
        				  // inline code comments in usb_device.c for explanation when
        				  // "or faster" applies])  In most cases, the USBDeviceTasks() 
        				  // function does not take very long to execute (ex: <100 
        				  // instruction cycles) before it returns.
        #endif
    				  

		// Application-specific tasks.
		// Application related code may be added here, or in the ProcessIO() function.
        ProcessIO();        
    }//end while
}//end main
开发者ID:iruka-,项目名称:ORANGEpico,代码行数:47,代码来源:main.c


示例10: main

int main(void) {
    InitializeSystem();

    // Wait for reset button to be released
    while (_PORT(PIO_BTN1) == HIGH) { }

    //ADCInitialize();
    PWMInitialize();
    PWMEnable();
    USBDeviceInit();

    //ADCStartCapture();
    _LAT(PIO_LED1) = HIGH;

    ColourEngine::Initialize();
    //ColourEngine::PowerOn(1000); // Fade in
    ColourEngine::SetPower(power, 0);

    //_LAT(PIO_LED2) = HIGH;

    while (1) {
        USBDeviceTasks();
        USBUserProcess();
    }

    return 0;
}
开发者ID:jorticus,项目名称:hexlight-firmware,代码行数:27,代码来源:main.cpp


示例11: main

int main(void) {
    InitializeSystem();
    initADCDMA();

    
    #if defined(USB_INTERRUPT)
        if(USB_BUS_SENSE && (USBGetDeviceState() == DETACHED_STATE))
        {
            USBDeviceAttach();
        }
    #endif

    #if defined(USB_POLLING)
            // Check bus status and service USB interrupts.
            USBDeviceTasks();
    #endif
    while(1)
    {
        if (!ADC_DATA_READY)
            continue;
                
        ADC_DATA_READY = 0;
        
        RunFFT();

        putrsUSBUSART((char*)&fftOut[0].real);
        
        ProcessIO();
    }
    return (EXIT_SUCCESS);
}
开发者ID:PeterLaiCCIT,项目名称:regis,代码行数:31,代码来源:main.c


示例12: BootMain

void BootMain(void)
#endif
{
    //NOTE: The c018.o file is not included in the linker script for this project.
    //The C initialization code in the c018.c (comes with C18 compiler in the src directory)
    //file is instead modified and included here manually.  This is done so as to provide
    //a more convenient entry method into the bootloader firmware.  Ordinarily the _entry_scn
    //program code section starts at 0x00 and is created by the code of c018.o.  However,
    //the linker will not work if there is more than one section of code trying to occupy 0x00.
    //Therefore, must not use the c018.o code, must instead manually include the useful code
    //here instead.

    //Make sure interrupts are disabled for this code (could still be on,
    //if the application firmware jumped into the bootloader via software methods)
    INTCON = 0x00;  

    //Initialize the C stack pointer, and other compiler managed items as 
    //normally done in the c018.c file (applicable when using C18 compiler)
    #ifndef __XC8__
        _asm
            lfsr 1, _stack
            lfsr 2, _stack
            clrf TBLPTRU, 0
        _endasm
    #endif

    //Clear the stack pointer, in case the user application jumped into 
    //bootloader mode with excessive junk on the call stack
    STKPTR = 0x00;  

    // End of the important parts of the C initializer.  This bootloader firmware does not use
    // any C initialized user variables (idata memory sections).  Therefore, the above is all
    // the initialization that is required.



    //Call other initialization code and (re)enable the USB module
    InitializeSystem();     //Some USB, I/O pins, and other initialization
    
    //Execute main loop
    while(1)
    {
        ClrWdt();
        
        //Need to call USBDeviceTasks() periodically.  This function takes care of
        //processing non-USB application related USB packets (ex: "Chapter 9" 
        //packets associated with USB enumeration)
        USBDeviceTasks();

        BlinkUSBStatus();   //When enabled, blinks LEDs on the board, based on USB bus state
        
        LowVoltageCheck();  //Regularly monitor voltage to make sure it is sufficient
                            //for safe operation at full frequency and for erase/write
                            //operations.       
        
        ProcessIO();        //This is where all the actual bootloader related data transfer/self programming takes
                            //place see ProcessIO() function in the BootPIC[xxxx].c file.
    }//end while    
}    
开发者ID:EEST1,项目名称:pic18_non_j,代码行数:59,代码来源:main.c


示例13: main

int main(void)
{
    InitializeSystem();
    USBDeviceAttach();
    while(1)
    {
    }
}
开发者ID:jrapp01,项目名称:SrDesign,代码行数:8,代码来源:main.c


示例14: main

/********************************************************************
 *	メイン関数
 ********************************************************************
 */
void main(void)
{
	InitializeSystem();
	while(1){
		USBtask();
//		LED2_blink();
	}
}
开发者ID:DharmaPatil,项目名称:PIC18F_BOOTLOADER,代码行数:12,代码来源:main.c


示例15: main

/******************************************************************************
 * Function:        void main(void)
 *
 * PreCondition:    None
 *
 * Input:           None
 *
 * Output:          None
 *
 * Side Effects:    None
 *
 * Overview:        Main program entry point.
 *
 * Note:            None
 *****************************************************************************/
void main(void)
{
    InitializeSystem();
    while(1)
    {
        USBTasks();         // USB Tasks
        ProcessIO();        // See user\user.c & .h
    }//end while
}//end main
开发者ID:MicrochipC,项目名称:Microchip_PIC18F4550_USB_Serial,代码行数:24,代码来源:main.c


示例16: main

int main(void)
#endif
{   
    InitializeSystem();

    while(1) {
        ProcessIO();        
    }
}
开发者ID:ikesato,项目名称:bt-remocon,代码行数:9,代码来源:main.c


示例17: LOG_CRITICAL

bool GMainWindow::LoadROM(const std::string& filename) {
    std::unique_ptr<Loader::AppLoader> app_loader = Loader::GetLoader(filename);
    if (!app_loader) {
        LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filename.c_str());
        QMessageBox::critical(this, tr("Error while loading ROM!"),
                              tr("The ROM format is not supported."));
        return false;
    }

    boost::optional<u32> system_mode = app_loader->LoadKernelSystemMode();
    if (!system_mode) {
        LOG_CRITICAL(Frontend, "Failed to load ROM!");
        QMessageBox::critical(this, tr("Error while loading ROM!"),
                              tr("Could not determine the system mode."));
        return false;
    }

    if (!InitializeSystem(system_mode.get()))
        return false;

    Loader::ResultStatus result = app_loader->Load();
    if (Loader::ResultStatus::Success != result) {
        System::Shutdown();
        LOG_CRITICAL(Frontend, "Failed to load ROM!");

        switch (result) {
        case Loader::ResultStatus::ErrorEncrypted: {
            // Build the MessageBox ourselves to have clickable link
            QMessageBox popup_error;
            popup_error.setTextFormat(Qt::RichText);
            popup_error.setWindowTitle(tr("Error while loading ROM!"));
            popup_error.setText(
                tr("The game that you are trying to load must be decrypted before being used with "
                   "Citra.<br/><br/>"
                   "For more information on dumping and decrypting games, please see: <a "
                   "href='https://citra-emu.org/wiki/Dumping-Game-Cartridges'>https://"
                   "citra-emu.org/wiki/Dumping-Game-Cartridges</a>"));
            popup_error.setIcon(QMessageBox::Critical);
            popup_error.exec();
            break;
        }
        case Loader::ResultStatus::ErrorInvalidFormat:
            QMessageBox::critical(this, tr("Error while loading ROM!"),
                                  tr("The ROM format is not supported."));
            break;
        case Loader::ResultStatus::Error:

        default:
            QMessageBox::critical(this, tr("Error while loading ROM!"), tr("Unknown error!"));
            break;
        }
        return false;
    }
    return true;
}
开发者ID:SakataGintokiYT,项目名称:citra,代码行数:55,代码来源:main.cpp


示例18: Init

/***************************************************
 * Function:        void Init(void)
 *
 * OverView:		All calling related to Initialized functions.
 *
 * Note:			None
 ***************************************************/
void Init(void)
{
	InitializeSystem();		//	Initialize Related to connect usb port.
	InitializeUser();		//	Initialize for User Variables.
	InitializeDevice();		//	Initialize PICF4550 LED, PWM, ADC Ports
	USBDeviceInit();		//	Initialize USB Module.

	#if defined(USB_INTERRUPT)
		USBDeviceAttach();	//	Enable to find USB Device
	#endif
}
开发者ID:mauver,项目名称:MyPCR_Firmware,代码行数:18,代码来源:Init.c


示例19: main

void main(void) {
  InitializeSystem();

  // If the switch is pressed on boot, enter system config mode.
  g_config_mode = (sw == 0);

  while (1) {
    USBDeviceTasks();
    ProcessIO();
  }
}
开发者ID:primiano,项目名称:lgtm-hid,代码行数:11,代码来源:main.c


示例20: main

int main(void)
{
    struct BadgeState *game_state;
    char sample_i = 0, sample_val = 0;

    InitializeSystem();

    #if defined(USB_INTERRUPT)
        USBDeviceAttach();
    #endif

    #if defined(GAME_MODE)
        game_state = Init_Game();
    #endif
    while(1)
    {
        if((play_count & 0x0fff) && play_count & 0x8000)
        {
            //LATBbits.LATB2 = 1;
            //LATBbits.LATB3 = 1;

            getNextSample( &sample_i, &sample_val);
            LATAbits.LATA9 = sample_val;
            play_count++;
        }
        else
            play_count = play_count & 0x8000;

        #if defined(USB_POLLING)
		// Check bus status and service USB interrupts.
        USBDeviceTasks(); // Interrupt or polling method.  If using polling, must call
        				  // this function periodically.  This function will take care
        				  // of processing and responding to SETUP transactions 
        				  // (such as during the enumeration process when you first
        				  // plug in).  USB hosts require that USB devices should accept
        				  // and process SETUP packets in a timely fashion.  Therefore,
        				  // when using polling, this function should be called 
        				  // regularly (such as once every 1.8ms or faster** [see 
        				  // inline code comments in usb_device.c for explanation when
        				  // "or faster" applies])  In most cases, the USBDeviceTasks() 
        				  // function does not take very long to execute (ex: <100 
        				  // instruction cycles) before it returns.
        #endif
    				  

		// Application-specific tasks.
		// Application related code may be added here, or in the ProcessIO() function.
        ProcessIO();
    #if defined(GAME_MODE)
         Run_Game(&game_state);
        //welcome(game_state);
    #endif
    }//end while
}//end main
开发者ID:ErikShiken,项目名称:rvasec-badge-2014,代码行数:54,代码来源:main.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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