blob: ebb543d44250d0462384b63ea43a987f9d3ea858 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#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;
}
}
|