Skip to content

Commit

Permalink
Refactored tassTick into pico_ms_tick
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniele Lacamera committed Apr 7, 2015
1 parent b5f90a0 commit 48fd769
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/arch/pico_generic_gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/* monotonically increasing tick,
* typically incremented every millisecond in a systick interrupt */
extern volatile unsigned int tassTick;
extern volatile unsigned int pico_ms_tick;

#define dbg(...)

Expand Down Expand Up @@ -41,12 +41,12 @@ extern volatile unsigned int tassTick;

static inline pico_time PICO_TIME_MS()
{
return tassTick;
return pico_ms_tick;
}

static inline pico_time PICO_TIME()
{
return tassTick / 1000;
return pico_ms_tick / 1000;
}

static inline void PICO_IDLE(void)
Expand Down Expand Up @@ -77,7 +77,7 @@ extern volatile unsigned int tassTick;

static inline pico_time PICO_TIME_MS(void)
{
return tassTick;
return pico_ms_tick;
}

static inline pico_time PICO_TIME(void)
Expand All @@ -87,8 +87,8 @@ extern volatile unsigned int tassTick;

static inline void PICO_IDLE(void)
{
unsigned int now = tassTick;
while(now == tassTick) ;
unsigned int now = pico_ms_tick;
while(now == pico_ms_tick) ;
}

#endif /* IFNDEF RTOS */
Expand Down

0 comments on commit 48fd769

Please sign in to comment.