summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/metronome.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index 92dc0e37f1..e6a70490a1 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -18,7 +18,7 @@
18 ****************************************************************************/ 18 ****************************************************************************/
19#include "plugin.h" 19#include "plugin.h"
20 20
21#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE) 21#if !defined(SIMULATOR)
22/* only do this for targets with MAS */ 22/* only do this for targets with MAS */
23 23
24/* variable button definitions */ 24/* variable button definitions */
@@ -47,6 +47,14 @@
47#define METRONOME_VOL_DOWN (BUTTON_ON | BUTTON_LEFT) 47#define METRONOME_VOL_DOWN (BUTTON_ON | BUTTON_LEFT)
48#define METRONOME_TAP BUTTON_ON 48#define METRONOME_TAP BUTTON_ON
49 49
50#elif CONFIG_KEYPAD == IRIVER_H100_PAD
51#define METRONOME_QUIT BUTTON_OFF
52#define METRONOME_PLAYPAUSE BUTTON_ON
53#define METRONOME_VOL_UP BUTTON_UP
54#define METRONOME_VOL_DOWN BUTTON_DOWN
55#define METRONOME_TAP BUTTON_SELECT
56#define METRONOME_MSG_START "press play"
57#define METRONOME_MSG_STOP "press pause"
50#endif 58#endif
51static struct plugin_api* rb; 59static struct plugin_api* rb;
52 60
@@ -122,11 +130,16 @@ static unsigned char sound[]={
122 130
123 131
124 132
125void led(bool on){ 133void led(bool on)
134{
135#if CONFIG_CPU == SH7034
126 if(on) 136 if(on)
127 or_b(0x40, &PBDRL); 137 or_b(0x40, &PBDRL);
128 else 138 else
129 and_b(~0x40, &PBDRL); 139 and_b(~0x40, &PBDRL);
140#else
141 (void)on;
142#endif
130} 143}
131 144
132void calc_period(void){ 145void calc_period(void){