Beispiel #1
0
void SYS_Initialize ( void* data )
{
    /* Core Processor Initialization */
    SYS_CLK_Initialize( NULL );
    sysObj.sysDevcon = SYS_DEVCON_Initialize(SYS_DEVCON_INDEX_0, (SYS_MODULE_INIT*)&sysDevconInit);
    SYS_DEVCON_PerformanceConfig(SYS_CLK_SystemFrequencyGet());
    SYS_DEVCON_JTAGDisable();
    SYS_PORTS_Initialize();

    /* Initialize Drivers */
    /*Initialize TMR0 */
    DRV_TMR0_Initialize();

    DRV_SPI0_Initialize();
    DRV_SPI1_Initialize();
    DRV_SPI2_Initialize();
    DRV_SPI3_Initialize();
    DRV_SPI4_Initialize();
    DRV_SPI5_Initialize();


    /*Initialize OC0 */
    DRV_OC0_Initialize();

    /*Initialize OC1 */
    DRV_OC1_Initialize();

    /*Initialize OC2 */
    DRV_OC2_Initialize();

    /*Initialize OC3 */
    DRV_OC3_Initialize();

    /*Initialize OC4 */
    DRV_OC4_Initialize();

    /*Initialize OC5 */
    DRV_OC5_Initialize();

    /*Initialize OC6 */
    DRV_OC6_Initialize();

    /*Initialize OC7 */
    DRV_OC7_Initialize();

    /*Initialize OC8 */
    DRV_OC8_Initialize();

    /* Initialize System Services */
    SYS_INT_Initialize();

    /* Initialize Middleware */
    /* Enable Global Interrupts */
    SYS_INT_Enable();

    /* Initialize the Application */
    APP_Initialize();
}
Beispiel #2
0
SYS_MODULE_OBJ DRV_SPI_Initialize(const SYS_MODULE_INDEX index,const SYS_MODULE_INIT * const init)
{
    SYS_MODULE_OBJ returnValue;

    switch(index)
    {
        case DRV_SPI_INDEX_0:
        {
            returnValue = DRV_SPI0_Initialize();
            break;
        }
        default:
        {
            returnValue = SYS_MODULE_OBJ_INVALID;
            break;
        }
    }
    return returnValue;
}