Files
CMock/examples/src/TimerInterruptHandler.c
T
mvandervoord 8c03f7b200 - Got examples project working again
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@168 bf332499-1b4d-0410-844d-d2d48d5cc64c
2010-06-21 12:53:28 +00:00

26 lines
410 B
C

#include "Types.h"
#include "TimerInterruptHandler.h"
#include "TimerInterruptConfigurator.h"
static uint32 systemTime;
void Timer_SetSystemTime(uint32 time)
{
systemTime = time;
}
uint32 Timer_GetSystemTime(void)
{
return systemTime;
}
void Timer_InterruptHandler(void)
{
uint32 status = AT91C_BASE_TC0->TC_SR;
if (status & AT91C_TC_CPCS)
{
systemTime += 10;
}
}