Esempio n. 1
0
/*
 *  ======== clk0Fxn =======
 */
Void clk0Fxn(UArg arg0)
{
    Swi_post(swi0);
    Swi_post(swi1);

    Semaphore_post(sem0);
}
Esempio n. 2
0
/*
 *  ======== main ========
 */
Void main()
{ 
    Swi_post(swi0);
    Swi_post(swi1);
    Clock_start(clk1);
    
    BIOS_start();
}
void countdown (void){

	TimerIntClear(GPT2_BASE, TIMER_TIMA_TIMEOUT);

	Swi_post(swi0);


}
Esempio n. 4
0
/*
 *  ======== Swi_or ========
 */
Void Swi_or(Swi_Object *swi, UInt mask)
{
    UInt hwiKey;

    hwiKey = Hwi_disable();
    swi->trigger |= mask;
    Hwi_restore(hwiKey);
    Swi_post(swi);
}
Esempio n. 5
0
/*
 *  ======== Swi_inc ========
 */
Void Swi_inc(Swi_Object *swi)
{
    UInt hwiKey;

    hwiKey = Hwi_disable();
    swi->trigger += 1;
    Hwi_restore(hwiKey);
    Swi_post(swi);
}
Esempio n. 6
0
/*
 *  ======== IpcPower_suspend ========
 */
Void IpcPower_suspend()
{
    Assert_isTrue((curInit > 0) , NULL);

#ifndef SMP
    Semaphore_post(IpcPower_semSuspend);
#else
    Swi_post(suspendResumeSwi);
#endif
}
Esempio n. 7
0
/*
 *  ======== myTickFxn ========
 *  Timer ISR function that posts a Swi to peform 
 *  the non-realtime service functions.
 */
Void myTickFxn(UArg arg) 
{
    /*
     * Uncomment this next line to toggle the LED state.
     */
    /* P1OUT ^= 0x1; */

    tickCount += 1;      /* increment the counter */

    /* post a Swi to perform the "heavy lifting" */
    Swi_post(mySwi);
}
Esempio n. 8
0
/*
 *  ======== TransportShm_notifyFxn ========
 */
Void TransportShm_notifyFxn(UInt16 procId,
                            UInt16 lineId,
                            UInt32 eventId,
                            UArg arg,
                            UInt32 payload)
{
    Swi_Handle swiHandle;

    /* Swi_Handle was passed as arg in register */
    swiHandle = (Swi_Handle)arg;

    /* post the Swi */
    Swi_post(swiHandle);
}
Esempio n. 9
0
/*
 *  ======== timerFunc ========
 *  This function runs every PERIOD ms in the context of a Hwi thread.
 */
Void timerFunc(UArg arg)
{
    static UInt tickCount = 0;

    /* change load values every 5 seconds */
    if (++tickCount >= (5 * NUMPERSEC)) {
        tickCount = 0;
        step();
    }

    /* Make Swi load thread ready to run */
    Swi_post(swi);

    /* Make Task load thread ready to run */
    Semaphore_post(sem);

    /* Do Hwi thread load now */
    hwiLoad();
}
Esempio n. 10
0
/*
 *  ======== IpcPower_suspendTaskFxn ========
 */
Void IpcPower_suspendTaskFxn(UArg arg0, UArg arg1)
{
    while (curInit) {
        /* Wait for suspend notification from host-side */
        Semaphore_pend(IpcPower_semSuspend, BIOS_WAIT_FOREVER);

        if (curInit) {
            /* Call pre-suspend preparation function */
            IpcPower_preSuspend();

            Swi_post(suspendResumeSwi);

            /* Call post-resume preparation function */
            IpcPower_postResume();
        }
    }

    /* Signal the task end */
    Semaphore_post(IpcPower_semExit);
}
Esempio n. 11
0
void SWItrigger::post()
{
    Swi_post(SWItriggerHandle);
}
Esempio n. 12
0
/*
 *  ======== clk1Fxn ========
 */
Void clk1Fxn(UArg arg)
{
    clk1Count++;
    Swi_post(swiB);
}
Esempio n. 13
0
/*
 *  ======== clk0Fxn ========
 */
Void clk0Fxn(UArg arg)
{
    clk0Count++;
    Swi_post(swiA);
}
Esempio n. 14
0
void SWI::post()
{
    Swi_post(SWIHandle);
}