예제 #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;
        }
    }

}
예제 #2
0
파일: main.cpp 프로젝트: John-Titor/scmrtos
//---------------------------------------------------------------------------
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
        }
    }     
}