summaryrefslogtreecommitdiff
path: root/chip/npcx/hwtimer_chip.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-08-22 09:43:17 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-09-04 21:03:57 -0700
commite192f71aed932b88f3c42df4653a430a2e8ba10e (patch)
tree013f50b4bf3abe796d7594c9e02d53b7ebc69d3d /chip/npcx/hwtimer_chip.h
parentd6fc2d450496df392e99fc6ce2605fec0e9cfead (diff)
downloadchrome-ec-e192f71aed932b88f3c42df4653a430a2e8ba10e.tar.gz
chip/npcx: Tidy up comments for init_hw_timer()
The comments suggest that this function only operates with ITIM16 timers but it seems to support ITIM32 as well. Also it allows selecting the clock source. Update the comments, hopefully making them correct. BUG=chromium:876737 BRANCH=none TEST= make buildall -j50 Change-Id: Ic4ec2457cde2de55d51371f781d49bae80365989 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1185225
Diffstat (limited to 'chip/npcx/hwtimer_chip.h')
-rw-r--r--chip/npcx/hwtimer_chip.h9
1 files changed, 8 insertions, 1 deletions
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 */