#ifndef hal_leon_timer_h #define hal_leon_timer_h /* Cesar project {{{ * * Copyright (C) 2008 Spidcom * * <<>> * * }}} */ /** * \file hal/leon/timer.h * \brief Public function header to use the Leon Timer. * \ingroup hal_leon * */ typedef void (*leon_timer_cb_t) (void *user_data); /** forward declaration. */ typedef struct leon_timer_t leon_timer_t; /** * Initialise Leon timer. * \param user_data user data passed to the callback * \param cb timer callback, called in ISR context * \return the newly created context */ leon_timer_t * leon_timer_init (void *user_data, leon_timer_cb_t cb); /** * Uninitialise the Leon timer. * \param ctx Leon timer context */ void leon_timer_uninit (leon_timer_t *ctx); /** * Program the timer to the given date. * \param ctx Leon timer context * \param date timer expiration date */ void leon_timer_program (leon_timer_t *ctx, u32 date); /** * Cancel timer programmation. * \param ctx Leon timer context */ void leon_timer_cancel (leon_timer_t *ctx); #endif /* hal_leon_timer_h */