diff options
Diffstat (limited to 'test/powerdemo.c')
-rw-r--r-- | test/powerdemo.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/powerdemo.c b/test/powerdemo.c index 496459f9f7..a5e79e0366 100644 --- a/test/powerdemo.c +++ b/test/powerdemo.c @@ -5,16 +5,14 @@ /* Power state machine demo module for Chrome EC */ -#include "board.h" #include "clock.h" +#include "common.h" #include "powerdemo.h" #include "task.h" #include "timer.h" #include "uart.h" #include "registers.h" -#define US_PER_SECOND 1000000 - static volatile enum { POWER_STATE_IDLE = 0, /* Idle */ POWER_STATE_DOWN1, /* Assert output for 1ms */ @@ -75,7 +73,7 @@ int power_demo_init(void) /* 32-bit timer mode */ LM4_TIMER_CFG(7) = 4; /* Set the prescaler to increment every microsecond */ - LM4_TIMER_TAPR(7) = clock_get_freq() / US_PER_SECOND; + LM4_TIMER_TAPR(7) = clock_get_freq() / SECOND; /* One-shot, counting down */ LM4_TIMER_TAMR(7) = 0x01; /* Set overflow interrupt */ |