Example #1
0
template<> void TProc1::exec()
{

    for(;;)
    {
        //--------------------------------------------------
        //
        //            Message test
        //
        //
        //     Receive data as message
        //
        MamontMsg.wait();                                     // wait for message
        MamontMsg.out(Mamont);                                // read message content to global test object
        if(Mamont.src == TMamont::PROC_SRC)
        {
        	*pREG_PORTG_DATA_TGL=0x8000;
        }
        else
        {
        	*pREG_PORTG_DATA_TGL=0x4000;
        }
    }

}
Example #2
0
//---------------------------------------------------------------------------
template<> void TProc1::exec()
{
    for(;;)
    {
        //--------------------------------------------------
        //
        //            Message test
        //
        //
        //     Receive data as message
        //
        MamontMsg.wait();                                     // wait for message
        MamontMsg.out(Mamont);                                // read message content to global test object 
        if(Mamont.src == TMamont::PROC_SRC)
        {
            P1OUT &= ~(1 << 4);
        }
        else
        {
            P1OUT &= ~(1 << 4);
            P1OUT |= (1 << 4);
            P1OUT &= ~(1 << 4);
        }
    }     
}
//---------------------------------------------------------------------------
template<> OS_PROCESS void TProc1::exec()
{
    for(;;)
    {
        //--------------------------------------------------
        //
        //            Message test
        //
        //
        //     Receive data as message
        //
        MamontMsg.wait();          // wait for message
        MamontMsg.out(Mamont);     // read message content to global test object 
        if(Mamont.src == TMamont::PROC_SRC)
        {
            ; // Make some actions
        }
        else
        {
            ; // Make some actions
        }
    }     
}