Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
PVARP.h
- Committer:
- Huazhi
- Date:
- 2015-11-27
- Revision:
- 0:6477530de2c0
File content as of revision 0:6477530de2c0:
/* PVARP */ void PVARP(void const *i) { int CurrentState = PVARP_INITIAL; RtosTimer local_timer = RtosTimer(PVARP_timer, osTimerPeriodic,(void *)0); local_timer.start(1); while (true) { switch (CurrentState) { case PVARP_ASENSE: if(PVARP_clock >= ASENSE_TIME_UPPER) { SyncStatus[ASENSE] = agre_time; CurrentState = PVARP_INITIAL; PVARP_clock = 0; pc.printf("ASense "); pc.printf("Time: %ld", agre_time); pc.printf("\n"); } break; } for(int trn=30; trn<=25; trn++) { if(TRANS[trn].source == CurrentState){ TRANS[trn].active = true; }else{ TRANS[trn].active = false; } if(TRANS[trn].active) { if(EVAL_GUARD(trn)) { if(TRANS[trn].syncid == NONE || agre_time - SyncStatus[TRANS[trn].syncid] < Broadcase_delay) { CurrentState = TRANS[trn].dest; ASSIGN(trn); } } } } } }