Beispiel #1
0
VOID  INC_Initialize(VOID  *first_available_memory)
{


    /* Indicate that initialization is starting.  */
    INC_Initialize_State =  INC_START_INITIALIZE;

    /* Call release information function.  */
    RLC_Release_Information();
 
    /* Call license information function.  */
    LIC_License_Information();

    /* Initialize the Error handling (ER) component.  */
    ERI_Initialize();

    /* Initialize the History (HI) component.  */
    HII_Initialize();

    /* Initialize the Thread Control (TC) component.  */
    TCI_Initialize();

    /* Initialize the Mailbox (MB) component. */
    MBI_Initialize();
    
    /* Initialize the Queue (QU) component. */
    QUI_Initialize();
    
    /* Initialize the Pipe (PI) component. */
    PII_Initialize();
    
    /* Initialize the Semaphore (SM) component. */
    SMI_Initialize();
    
    /* Initialize the Event Group (EV) component.  */
    EVI_Initialize();

    /* Initialize the Partition memory (PM) component.  */
    PMI_Initialize();

    /* Initialize the Dynamic memory (DM) component.  */
    DMI_Initialize();

    /* Initialize the Timer (TM) component.  */
    TMI_Initialize();

    /* Initialize the I/O Driver (IO) component.  */
    IOI_Initialize();

    /* Invoke the application-supplied initialization function.  */
    Application_Initialize(first_available_memory);
    
    /* Indicate that initialization is finished.  */
    INC_Initialize_State =  INC_END_INITIALIZE;

    /* Start scheduling threads of execution.  */
    TCT_Schedule();
}
//
// Setup the infrastructure, hardware, then application.
//
void setup()
{
    Timers_Initialize();

    Hardware_Initialize();

    // Start scheduler after hardware initialize
    Timers_Start();

    Application_Initialize();

    // Turn on interrupts once timers are initialized
    Hardware_EnableInterrupts();

    //
    // Initialize cloud providers
    //
    Particle_Initialize();

    Smartpux_Initialize();

    Phant_Initialize();
}