21 lines
296 B
C
21 lines
296 B
C
|
#ifndef TIMERCTRL_H_
|
||
|
#define TIMERCTRL_H_
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
volatile uint32_t CLEARS_TICKS;
|
||
|
volatile uint32_t LIMIT;
|
||
|
volatile uint32_t VALUE;
|
||
|
} Timer_Reg;
|
||
|
|
||
|
static void timer_init(Timer_Reg *reg){
|
||
|
reg->CLEARS_TICKS = 0;
|
||
|
reg->VALUE = 0;
|
||
|
}
|
||
|
|
||
|
|
||
|
#endif /* TIMERCTRL_H_ */
|