6 #include "inc/hw_memmap.h"
7 #include "inc/hw_ints.h"
8 #include "driverlib/interrupt.h"
13 uint32_t timer_configuration,
reload_t timer_load_val,
14 uint32_t timer_interrupt,
bool timer_start) {
17 base = TIMER0_BASE + 0x1000 * timer_id;
23 SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0 +
id);
29 IntEnable(INT_TIMER0A +
id*2);
32 IntEnable(INT_TIMER0A +
id*2 + 1);
39 if (timer_start) {
start(); }
52 TimerLoadSet(
base, TIMER_A, load_value);
55 TimerLoadSet(
base, TIMER_B, load_value);
79 TimerIntClear(
base, INT_TIMER0A +
id*2);
82 TimerIntClear(
base, INT_TIMER0A +
id*2 + 1);
95 TimerValueGet(
base, TIMER_A);
98 TimerValueGet(
base, TIMER_B);
void load(uint32_t load_value)
const uint32_t get_base()
const subtimer_t get_subtimer()