summaryrefslogtreecommitdiff
path: root/cesar/hal/timer/src/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/hal/timer/src/timer.c')
-rw-r--r--cesar/hal/timer/src/timer.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/cesar/hal/timer/src/timer.c b/cesar/hal/timer/src/timer.c
index 7ba5f78c21..e97f9eb88f 100644
--- a/cesar/hal/timer/src/timer.c
+++ b/cesar/hal/timer/src/timer.c
@@ -14,6 +14,7 @@
#include "common/std.h"
#include "hal/timer/timer.h"
#include "hal/leon/timer.h"
+#include "hal/phy/phy.h"
#include "hal/timer/inc/context.h"
#include "hal/timer/inc/timer.h"
@@ -21,18 +22,14 @@
static hal_timer_t hal_timer_global;
hal_timer_t *
-hal_timer_init (phy_t *phy)
+hal_timer_init (void)
{
- dbg_assert (phy);
-
hal_timer_global.leon_timer = leon_timer_init (&hal_timer_global,
- (leon_timer_cb_t) hal_timer_instance_process,
- phy);
+ (leon_timer_cb_t) hal_timer_instance_process);
// initialise the heap.
heap_init (&hal_timer_global.heap, hal_timer_instance_lesser);
- hal_timer_global.phy = phy;
hal_timer_global.current_instance = NULL;
return &hal_timer_global;
@@ -77,7 +74,6 @@ hal_timer_instance_program (hal_timer_t *ctx,
{
dbg_assert (ctx);
dbg_assert (instance);
- dbg_assert (ctx->phy);
/* Lock the scheduler to avoid an access at the same time as the DSR. */
cyg_scheduler_lock ();
@@ -177,7 +173,7 @@ hal_timer_instance_process (hal_timer_t *ctx)
instance = PARENT_OF (hal_timer_instance_t, node, heap_get_root
(&ctx->heap));
- if (lesseq_mod2p32(instance->date, phy_date (ctx->phy)))
+ if (lesseq_mod2p32(instance->date, phy_date ()))
{
ctx->current_instance = NULL;
heap_remove (&ctx->heap, &instance->node);