From d383f2bcdb6ff13cc562fce1ff55d826035debad Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 6 Mar 2023 17:36:31 +0100 Subject: Simplify source tree Now just use make in the root directory to build. --- AT91SAM7S256/Source/d_timer.r | 76 ------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 AT91SAM7S256/Source/d_timer.r (limited to 'AT91SAM7S256/Source/d_timer.r') diff --git a/AT91SAM7S256/Source/d_timer.r b/AT91SAM7S256/Source/d_timer.r deleted file mode 100644 index 93c3a3b..0000000 --- a/AT91SAM7S256/Source/d_timer.r +++ /dev/null @@ -1,76 +0,0 @@ -// -// Date init 14.12.2004 -// -// Revision date $Date:: 23-04-08 11:15 $ -// -// Filename $Workfile:: d_timer.r $ -// -// Version $Revision:: 2 $ -// -// Archive $Archive:: /LMS2006/Sys01/Main_V02/Firmware/Source/d_time $ -// -// Platform C -// - - -#ifdef SAM7S256 - - -#define MS_1_TIME ((OSC/16)/1000) - -static ULONG TimerValue; -static ULONG NextTimerValue; -static ULONG Timer1mS; - -/* PIT timer is used as main timer - timer interval is 1mS */ - -#define TIMERInit TimerValue = ((*AT91C_PITC_PIIR) & AT91C_PITC_CPIV);\ - NextTimerValue = (((*AT91C_PITC_PIIR) + MS_1_TIME) & AT91C_PITC_CPIV);\ - Timer1mS = 0 - -#define TIMERRead(V) if (MS_1_TIME < ((((*AT91C_PITC_PIIR) & AT91C_PITC_CPIV) - TimerValue) & AT91C_PITC_CPIV))\ - {\ - TimerValue += MS_1_TIME;\ - TimerValue &= AT91C_PITC_CPIV;\ - Timer1mS++;\ - }\ - V = Timer1mS - -#define TIMERReadAlt(V) if((SLONG)((*AT91C_PITC_PIIR) - NextTimerValue) >= 0)\ - {\ - Timer1mS ++;\ - NextTimerValue += MS_1_TIME;\ - }\ - V = Timer1mS;\ - -#define TIMERReadSkip(V) diff= (((*AT91C_PITC_PIIR)) - NextTimerValue);\ - if (diff >= 0)\ - {\ - diff /= MS_1_TIME;\ - diff += 1;\ - Timer1mS += diff;\ - diff *= MS_1_TIME;\ - NextTimerValue += diff;\ - }\ - V = Timer1mS;\ - -#define TIMERExit - - - -#endif //SAM7S256 - - - -#ifdef _WINDOWS - -#include -#include - -#define TIMERInit timeBeginPeriod(1); - -#define TIMERRead(V) (V) = timeGetTime(); - -#define TIMERExit timeEndPeriod(1); - -#endif //_WINDOWS -- cgit v1.2.3