예제 #1
0
void os_msgQ_tick( MsgQ_t queue ) {
#if( N_QUEUES > 0 )
    uint16_t nextMessage;
    Msg_t *pMsg;
    OSMsgQ_t *temp = &msgQList[ queue ];

    nextMessage = temp->tail;

    while ( nextMessage != temp->head ) {
        pMsg = (Msg_t*)( (Mem_t)temp->msgPool + (nextMessage) * (temp->messageSize) );
        if ( pMsg->delay > 0 ) {
            --(pMsg->delay);
            if ( pMsg->delay == 0 ) {
                event_ISR_signal( temp->change );
            }
        }
        if ( nextMessage == 0 ) {
            nextMessage = temp->size - 1;
        }
        else {
            --nextMessage;
        }
    }
#endif    
}
예제 #2
0
파일: buttons.c 프로젝트: Greeeg/uWatch
void PORT3_vect(void)
{
	buttonMask = P3IN;
	P3IFG = 0;
	// signal an event
	event_ISR_signal(buttonEvent);
	
	// should we wake up? probably...
	
}