diff options
Diffstat (limited to 'firmware/target/arm/tcc780x/kernel-tcc780x.c')
-rw-r--r-- | firmware/target/arm/tcc780x/kernel-tcc780x.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/firmware/target/arm/tcc780x/kernel-tcc780x.c b/firmware/target/arm/tcc780x/kernel-tcc780x.c index e5d96d288a..dee5e040e2 100644 --- a/firmware/target/arm/tcc780x/kernel-tcc780x.c +++ b/firmware/target/arm/tcc780x/kernel-tcc780x.c | |||
@@ -29,16 +29,13 @@ | |||
29 | void tick_start(unsigned int interval_in_ms) | 29 | void tick_start(unsigned int interval_in_ms) |
30 | { | 30 | { |
31 | /* disable Timer0 */ | 31 | /* disable Timer0 */ |
32 | TCFG0 &= ~1; | 32 | TCFG(0) &= ~TCFG_EN; |
33 | 33 | ||
34 | /* set counter reference value based on 1Mhz tick */ | 34 | /* set counter reference value based on 1Mhz tick */ |
35 | TREF0 = interval_in_ms * 1000; | 35 | TREF(0) = interval_in_ms * 1000; |
36 | 36 | ||
37 | /* Timer0 = reset to 0, divide=2, IRQ enable, enable (continuous) */ | 37 | /* Timer0 = reset to 0, divide=2, IRQ enable, enable (continuous) */ |
38 | TCFG0 = (1<<8) | (0<<4) | (1<<3) | 1; | 38 | TCFG(0) = TCFG_CLEAR | (0 << TCFG_SEL) | TCFG_IEN | TCFG_EN; |
39 | |||
40 | /* Unmask timer IRQ */ | ||
41 | IEN |= TIMER0_IRQ_MASK; | ||
42 | } | 39 | } |
43 | 40 | ||
44 | /* NB: Since we are using a single timer IRQ, tick tasks are dispatched as | 41 | /* NB: Since we are using a single timer IRQ, tick tasks are dispatched as |