Beispiel #1
0
void HAL_Initialize()
{
    HAL_CONTINUATION::InitializeList();
    HAL_COMPLETION  ::InitializeList();

    Events_Initialize();

    CPU_GPIO_Initialize();

    CPU_SPI_Initialize();

    HAL_Time_Initialize();

    Time_Initialize();

    ENABLE_INTERRUPTS();

    BlockStorageList::Initialize();

    BlockStorage_AddDevices();

    BlockStorageList::InitializeDevices();

    FS_Initialize();

    FileSystemVolumeList::Initialize();

    FS_AddVolumes();

    FileSystemVolumeList::InitializeVolumes();



    CPU_InitializeCommunication();

    LCD_Initialize();

    I2C_Initialize();

    PalEvent_Initialize();

    Gesture_Initialize();

    Ink_Initialize();

    TimeService_Initialize();
    

/*
    other drivers init
*/
}
BOOL EnterMicroBooter(INT32& timeout)
{
    CPU_GPIO_Initialize();
    
    Events_WaitForEvents(0,100); // wait for buttons to init

    // check up/down button state
    if(!CPU_GPIO_GetPinState( MC9328MXL_GPIO::c_Port_B_10 ) && !CPU_GPIO_GetPinState( MC9328MXL_GPIO::c_Port_B_11 ))
    {
        // user override, so lets stay forever
        timeout = -1;
        return TRUE;
    }
    
    timeout = 0;
    return FALSE;
}
BOOL EnterMicroBooter(INT32& timeout)
{
    CPU_GPIO_Initialize();
    
    Events_WaitForEvents(0,100); // wait for buttons to init

    // check up/down button state
    if(!CPU_GPIO_GetPinState( AT91_GPIO_Driver::PA25 ) && !CPU_GPIO_GetPinState( AT91_GPIO_Driver::PA27 ))
    {
        // user override, so lets stay forever
        timeout = -1;
        return TRUE;
    }
    
    timeout = 0;
    return FALSE;
}