You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/11/01 23:36:04 UTC

incubator-mynewt-core git commit: MYNEWT-401: HAL Timer API changes

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop ece980672 -> bec53b116


MYNEWT-401: HAL Timer API changes

hal_timer_init() now takes a void *cfg for platform specific
information. A new API was added called hal_timer_config(). Now
the hal timer API looks like the rest of the HALs regarding init
and config.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/bec53b11
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/bec53b11
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/bec53b11

Branch: refs/heads/develop
Commit: bec53b11682d4b761afbe08521c59229eeb7d417
Parents: ece9806
Author: William San Filippo <wi...@runtime.io>
Authored: Tue Nov 1 16:34:56 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Tue Nov 1 16:34:56 2016 -0700

----------------------------------------------------------------------
 hw/mcu/native/src/hal_timer.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bec53b11/hw/mcu/native/src/hal_timer.c
----------------------------------------------------------------------
diff --git a/hw/mcu/native/src/hal_timer.c b/hw/mcu/native/src/hal_timer.c
index 6947123..289817e 100644
--- a/hw/mcu/native/src/hal_timer.c
+++ b/hw/mcu/native/src/hal_timer.c
@@ -80,18 +80,14 @@ native_timer_task(void *arg)
     }
 }
 
-/**
- * hal_timer_init
- *
- * Initialize the cputime module to run at the desired frequency.
- *
- * @param timer_num
- * @param clock_freq The desired cputime frequency, in hertz (Hz).
- *
- * @return int 0 on success; -1 on error.
- */
 int
-hal_timer_init(int num, uint32_t clock_freq)
+hal_timer_init(int num, void *cfg)
+{
+    return 0;
+}
+
+int
+hal_timer_config(int num, uint32_t clock_freq)
 {
     struct native_timer *nt;