summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/main.c4
-rw-r--r--apps/recorder/icons.c4
-rw-r--r--apps/recorder/icons.h4
-rw-r--r--apps/recorder/recording.c16
-rw-r--r--apps/status.c6
5 files changed, 18 insertions, 16 deletions
diff --git a/apps/main.c b/apps/main.c
index 537c3da..5a47e72 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -277,7 +277,7 @@ void init(void)
#ifdef AUTOROCK
if (!usb_detect())
- {
+ {
int fd;
static const char filename[] = PLUGIN_DIR "/autostart.rock";
@@ -303,8 +303,10 @@ int main(void)
app_main();
while(1) {
+#if CONFIG_LED == LED_REAL
led(true); sleep(HZ/10);
led(false); sleep(HZ/10);
+#endif
}
return 0;
}
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 26e494e..ee8c69a 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -74,7 +74,7 @@ const unsigned char bitmap_icons_7x8[][7] =
{0x20,0x30,0x38,0x3c,0x38,0x30,0x20}, /* Up-arrow */
};
-#ifndef HAVE_LED
+#if CONFIG_LED == LED_VIRTUAL
/* Disk/MMC activity */
const unsigned char bitmap_icon_disk[12] =
{0x15,0x3f,0x7d,0x7B,0x77,0x67,0x79,0x7b,0x57,0x4f,0x47,0x7f};
@@ -405,7 +405,7 @@ void statusbar_icon_lock(void)
STATUSBAR_Y_POS, 5, 8, false);
}
-#ifndef HAVE_LED
+#if CONFIG_LED == LED_VIRTUAL
/*
* no real LED: disk activity in status bar
*/
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h
index d9d743a..48e9a16 100644
--- a/apps/recorder/icons.h
+++ b/apps/recorder/icons.h
@@ -63,7 +63,7 @@ enum icons_7x8 {
extern const unsigned char bitmap_icons_5x8[1][5];
extern const unsigned char bitmap_icons_6x8[LastIcon][6];
extern const unsigned char bitmap_icons_7x8[Icon_Last][7];
-#ifndef HAVE_LED
+#if CONFIG_LED == LED_VIRTUAL
extern const unsigned char bitmap_icon_disk[];
#endif
@@ -106,7 +106,7 @@ extern void statusbar_icon_lock(void);
#ifdef HAVE_RTC
extern void statusbar_time(int hour, int minute);
#endif
-#ifndef HAVE_LED
+#if CONFIG_LED == LED_VIRTUAL
extern void statusbar_led(void);
#endif
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 111995c..84c90d2 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -307,7 +307,7 @@ bool recording_screen(void)
char path_buffer[MAX_PATH];
bool been_in_usb_mode = false;
int last_audio_stat = -1;
-#ifdef HAVE_LED
+#if CONFIG_LED == LED_REAL
bool led_state = false;
int led_countdown = 2;
#endif
@@ -320,7 +320,7 @@ bool recording_screen(void)
};
cursor = 0;
-#if defined(HAVE_LED) && !defined(SIMULATOR)
+#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR)
ata_set_led_enabled(false);
#endif
mpeg_init_recording();
@@ -356,7 +356,7 @@ bool recording_screen(void)
while(!done)
{
int audio_stat = audio_status();
-#ifdef HAVE_LED
+#if CONFIG_LED == LED_REAL
/*
* Flash the LED while waiting to record. Turn it on while
@@ -401,7 +401,7 @@ bool recording_screen(void)
led(false);
}
}
-#endif /* HAVE_LED */
+#endif /* CONFIG_LED */
/* Wait for a button a while (HZ/10) drawing the peak meter */
button = peak_meter_draw_get_btn(0, 8 + h*2, LCD_WIDTH, h);
@@ -574,7 +574,7 @@ bool recording_screen(void)
case REC_SETTINGS:
if(audio_stat != AUDIO_STATUS_RECORD)
{
-#ifdef HAVE_LED
+#if CONFIG_LED == LED_REAL
/* led is restored at begin of loop / end of function */
led(false);
#endif
@@ -607,7 +607,7 @@ bool recording_screen(void)
case REC_F2:
if(audio_stat != AUDIO_STATUS_RECORD)
{
-#ifdef HAVE_LED
+#if CONFIG_LED == LED_REAL
/* led is restored at begin of loop / end of function */
led(false);
#endif
@@ -633,7 +633,7 @@ bool recording_screen(void)
{
if(audio_stat != AUDIO_STATUS_RECORD)
{
-#ifdef HAVE_LED
+#if CONFIG_LED == LED_REAL
/* led is restored at begin of loop / end of function */
led(false);
#endif
@@ -839,7 +839,7 @@ bool recording_screen(void)
if (have_recorded)
reload_directory();
-#if defined(HAVE_LED) && !defined(SIMULATOR)
+#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR)
ata_set_led_enabled(true);
#endif
return been_in_usb_mode;
diff --git a/apps/status.c b/apps/status.c
index d7d3a21..8d3d174 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -60,7 +60,7 @@ struct status_info {
bool keylock;
bool battery_safe;
bool redraw_volume; /* true if the volume gauge needs updating */
-#ifndef HAVE_LED
+#if CONFIG_LED == LED_VIRTUAL
bool led; /* disk LED simulation in the status bar */
#endif
};
@@ -167,7 +167,7 @@ void status_draw(bool force_redraw)
#endif
info.repeat = global_settings.repeat_mode;
info.playmode = current_playmode();
-#ifndef HAVE_LED
+#if CONFIG_LED == LED_VIRTUAL
info.led = led_read(HZ/2); /* delay should match polling interval */
#endif
@@ -248,7 +248,7 @@ void status_draw(bool force_redraw)
#ifdef HAVE_RTC
statusbar_time(info.hour, info.minute);
#endif
-#ifndef HAVE_LED
+#if CONFIG_LED == LED_VIRTUAL
if (info.led)
statusbar_led();
#endif