Skip to content

Commit

Permalink
Fix compile problem with cc65 (#11). (#13)
Browse files Browse the repository at this point in the history
cc65 needs all variables declared at beginning of function.
  • Loading branch information
AriZuu authored Jul 6, 2020
1 parent f6ada92 commit e2c8f4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pico/picoos.c
Original file line number Diff line number Diff line change
Expand Up @@ -2668,14 +2668,17 @@ VAR_t POSCALL posTimerSet(POSTIMER_t tmr, POSSEMA_t sema,
UINT_t waitticks, UINT_t periodticks)
{
register EVENT_t ev = (EVENT_t) sema;
#if POSCFG_FEATURE_TIMERCALLBACK == 0
register TIMER_t *t = (TIMER_t*) tmr;
#endif

P_ASSERT("posTimerSet: semaphore valid", sema != NULL);
POS_ARGCHECK_RET(ev, ev->e.magic, POSMAGIC_EVENTU, -E_ARG);

#if POSCFG_FEATURE_TIMERCALLBACK != 0
return posTimerCallbackSet(tmr, pos_timerSemaSignal, sema,
waitticks, periodticks);
#else
register TIMER_t *t = (TIMER_t*) tmr;
POS_LOCKFLAGS;

P_ASSERT("posTimerSet: timer valid", tmr != NULL);
Expand Down

0 comments on commit e2c8f4c

Please sign in to comment.