summaryrefslogtreecommitdiff
path: root/firmware/export/timer.h
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:29:35 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:29:35 +0000
commitb955dff268005d3d55ee3f38af0875718ab6021a (patch)
tree7c8c1eb5ec2ab0d0a7d874e10092cab8ba1d5985 /firmware/export/timer.h
parentb3ed33d04aec20568b8bb9616349e6d7e4c71882 (diff)
downloadrockbox-b955dff268005d3d55ee3f38af0875718ab6021a.tar.gz
rockbox-b955dff268005d3d55ee3f38af0875718ab6021a.zip
Move PP (last target) timer code in target tree
Put warnings in timer.h for incomplete targets (TIMER_FREQ not defined and/or timer-target.h inexistant) Correct TIMER_STOP & TIMER_START macros arguments for target without timers TIMER_START takes an extra argument in multicore builds (macro in macro doesn't work fine..) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21557 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/timer.h')
-rw-r--r--firmware/export/timer.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/export/timer.h b/firmware/export/timer.h
index f3faf0908e..678d9ad8c6 100644
--- a/firmware/export/timer.h
+++ b/firmware/export/timer.h
@@ -25,19 +25,19 @@
25#include <stdbool.h> 25#include <stdbool.h>
26#include "config.h" 26#include "config.h"
27 27
28#if defined(CPU_PP) 28#if defined(SIMULATOR)
29 /* Portalplayer chips use a microsecond timer. */
30 #define TIMER_FREQ 1000000 29 #define TIMER_FREQ 1000000
31#elif CONFIG_CPU == S3C2440 || CONFIG_CPU == DM320 || CONFIG_CPU == TCC7801 \ 30#elif CONFIG_CPU == S3C2440 || CONFIG_CPU == DM320 || CONFIG_CPU == TCC7801 \
32 || defined(CPU_TCC77X) || CONFIG_CPU == AS3525 || CONFIG_CPU == IMX31L \ 31 || defined(CPU_TCC77X) || CONFIG_CPU == AS3525 || CONFIG_CPU == IMX31L \
33 || CONFIG_CPU == JZ4732 || CONFIG_CPU == PNX0101 \ 32 || CONFIG_CPU == JZ4732 || CONFIG_CPU == PNX0101 \
34 || defined(CPU_COLDFIRE) || CONFIG_CPU == SH7034 33 || defined(CPU_COLDFIRE) || CONFIG_CPU == SH7034 || defined(CPU_PP)
35 #include "timer-target.h" 34 #include "timer-target.h"
36#elif defined(SIMULATOR) 35#else
37 #define TIMER_FREQ 1000000 36 #warning "Target without timer-target.h"
38#endif 37#endif
39 38
40#ifndef TIMER_FREQ 39#ifndef TIMER_FREQ
40 #warning "TIMER_FREQ not defined"
41 #define TIMER_FREQ CPU_FREQ 41 #define TIMER_FREQ CPU_FREQ
42#endif 42#endif
43bool timer_register(int reg_prio, void (*unregister_callback)(void), 43bool timer_register(int reg_prio, void (*unregister_callback)(void),