diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-03-07 01:29:47 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-03-07 01:29:47 +0100 |
commit | f216bb3024f1b557d73af459c999f53feb483baf (patch) | |
tree | 12930f6696a7db5051bf1ee1b26d8f8c51bc1048 /src/target/firmware/board/compal_e88/init.c | |
parent | ba82248d3398b0034102e58c2d22b12f2b4569d0 (diff) |
add 'struct timer_list' timer code similar to linux + OpenBSC
We now support arbitrary timers by means of 'struct timer_list'.
Any part of the program can register such a callback by means
of schedule_timer() on a millisecond-granularity. However, there
is no guarantee on the timer precision. It will not execute before
the timer expires - but it might expire quite a bit later than we
have asked it for, depending on how busy the cpu is with other work.
The timer code is in the 'comm/' directory, as it is intended to be
migrated into libosmocore soon.
Furthermore, as we currently don't yet have a scheduler or tasks,
the main() routine explicitly has to call update_timers() to check
for any expired timers and run them.
Diffstat (limited to 'src/target/firmware/board/compal_e88/init.c')
-rw-r--r-- | src/target/firmware/board/compal_e88/init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/target/firmware/board/compal_e88/init.c b/src/target/firmware/board/compal_e88/init.c index f51f3e8d..84ae2159 100644 --- a/src/target/firmware/board/compal_e88/init.c +++ b/src/target/firmware/board/compal_e88/init.c @@ -38,6 +38,7 @@ #include <calypso/uart.h> #include <comm/sercomm.h> +#include <comm/timer.h> #include <abb/twl3025.h> #include <rf/trf6151.h> @@ -116,6 +117,8 @@ void board_init(void) dma_init(); rtc_init(); + timer_init(); + /* Initialize LCD driver (uses I2C) */ st7558_init(); |