예제 #1
0
static void TimerHandler(void *pCBParam, uint32_t Event, void *pArg)
{
   switch(Event)
    {
        case ADI_TMR_EVENT_DATA_INT:{

        	OS::TISRW ISR;
        	  //--------------------------------------------------
        	    //
        	    //            Message test
        	    //
        	    //     Send data as message
        	    //
        	    TMamont m;                     // create message content

        	    m.src  = TMamont::ISR_SRC;
        	    m.data = 10;
        	    MamontMsg = m;                 // put the content to the OS::message object
        	    MamontMsg.send_isr();          // send the message


            break;
        }
        default:
            break;
    }

}
//---------------------------------------------------------------------------
void OS::system_timer_user_hook()
{
    //--------------------------------------------------
    //
    //            Message test
    //
    //     Send data as message
    //
    TMamont m;           // create message content

    m.src  = TMamont::ISR_SRC;
    m.data = 10;
    MamontMsg = m;           // put the content to the OS::message object
    MamontMsg.send_isr();    // send the message
}
예제 #3
0
파일: main.cpp 프로젝트: John-Titor/scmrtos
//---------------------------------------------------------------------------
interrupt(TIMERB0_VECTOR) Timer_B_ISR()
{
    OS::TISRW ISRW;

    ENABLE_NESTED_INTERRUPTS();

    //--------------------------------------------------
    //
    //            Message test
    //
    //     Send data as message
    //
    TMamont m;           // create message content

    m.src  = TMamont::ISR_SRC;
    m.data = 10;
    MamontMsg = m;       // put the content to the OS::message object
    P1OUT |= (1 << 4);
    MamontMsg.send_isr();    // send the message
}
예제 #4
0
파일: main.cpp 프로젝트: John-Titor/scmrtos
void OS::system_timer_user_hook()
{
	static int timer_event_counter = 5;
	if (!--timer_event_counter)
	{
		timer_event_counter = 5;
	    //--------------------------------------------------
	    //
	    //            Message test
	    //
	    //     Send data as message
	    //
	    TMamont m;           // create message content

	    m.src  = TMamont::ISR_SRC;
	    m.data = 10;
	    MamontMsg = m;       // put the content to the OS::message object
        LED0.On();
	    MamontMsg.send_isr();    // send the message
	}
}