diff options
-rw-r--r-- | chip/npcx/hwtimer.c | 2 | ||||
-rw-r--r-- | chip/npcx/hwtimer_chip.h | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/chip/npcx/hwtimer.c b/chip/npcx/hwtimer.c index 38a8fce548..76f1822a94 100644 --- a/chip/npcx/hwtimer.c +++ b/chip/npcx/hwtimer.c @@ -46,7 +46,7 @@ static volatile uint32_t cur_cnt_us_dbg; /* Internal functions */ void init_hw_timer(int itim_no, enum ITIM_SOURCE_CLOCK_T source) { - /* Use internal 32K clock/APB2 for ITIM16 */ + /* Select which clock to use for this timer */ UPDATE_BIT(NPCX_ITCTS(itim_no), NPCX_ITCTS_CKSEL, source != ITIM_SOURCE_CLOCK_APB2); diff --git a/chip/npcx/hwtimer_chip.h b/chip/npcx/hwtimer_chip.h index d5939f77a8..80ee50b6ab 100644 --- a/chip/npcx/hwtimer_chip.h +++ b/chip/npcx/hwtimer_chip.h @@ -23,7 +23,14 @@ enum ITIM_SOURCE_CLOCK_T { ITIM_SOURCE_CLOCK_32K = 1, }; -/* Initialize ITIM16 timer */ +/** + * Initialise a hardware timer + * + * Select the source clock for a timer and prepare it for use. + * + * @param itim_no Timer number to init (enum ITIM16_MODULE_T) + * @param source Source for timer clock (enum ITIM_SOURCE_CLOCK_T) + */ void init_hw_timer(int itim_no, enum ITIM_SOURCE_CLOCK_T source); /* Returns the counter value of event timer */ |