diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/main.c | 4 | ||||
-rw-r--r-- | apps/recorder/icons.c | 4 | ||||
-rw-r--r-- | apps/recorder/icons.h | 4 | ||||
-rw-r--r-- | apps/recorder/recording.c | 16 | ||||
-rw-r--r-- | apps/status.c | 6 |
5 files changed, 18 insertions, 16 deletions
diff --git a/apps/main.c b/apps/main.c index 537c3da4dc..5a47e720e0 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -277,7 +277,7 @@ void init(void) | |||
277 | 277 | ||
278 | #ifdef AUTOROCK | 278 | #ifdef AUTOROCK |
279 | if (!usb_detect()) | 279 | if (!usb_detect()) |
280 | { | 280 | { |
281 | int fd; | 281 | int fd; |
282 | static const char filename[] = PLUGIN_DIR "/autostart.rock"; | 282 | static const char filename[] = PLUGIN_DIR "/autostart.rock"; |
283 | 283 | ||
@@ -303,8 +303,10 @@ int main(void) | |||
303 | app_main(); | 303 | app_main(); |
304 | 304 | ||
305 | while(1) { | 305 | while(1) { |
306 | #if CONFIG_LED == LED_REAL | ||
306 | led(true); sleep(HZ/10); | 307 | led(true); sleep(HZ/10); |
307 | led(false); sleep(HZ/10); | 308 | led(false); sleep(HZ/10); |
309 | #endif | ||
308 | } | 310 | } |
309 | return 0; | 311 | return 0; |
310 | } | 312 | } |
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c index 26e494e29d..ee8c69a05c 100644 --- a/apps/recorder/icons.c +++ b/apps/recorder/icons.c | |||
@@ -74,7 +74,7 @@ const unsigned char bitmap_icons_7x8[][7] = | |||
74 | {0x20,0x30,0x38,0x3c,0x38,0x30,0x20}, /* Up-arrow */ | 74 | {0x20,0x30,0x38,0x3c,0x38,0x30,0x20}, /* Up-arrow */ |
75 | }; | 75 | }; |
76 | 76 | ||
77 | #ifndef HAVE_LED | 77 | #if CONFIG_LED == LED_VIRTUAL |
78 | /* Disk/MMC activity */ | 78 | /* Disk/MMC activity */ |
79 | const unsigned char bitmap_icon_disk[12] = | 79 | const unsigned char bitmap_icon_disk[12] = |
80 | {0x15,0x3f,0x7d,0x7B,0x77,0x67,0x79,0x7b,0x57,0x4f,0x47,0x7f}; | 80 | {0x15,0x3f,0x7d,0x7B,0x77,0x67,0x79,0x7b,0x57,0x4f,0x47,0x7f}; |
@@ -405,7 +405,7 @@ void statusbar_icon_lock(void) | |||
405 | STATUSBAR_Y_POS, 5, 8, false); | 405 | STATUSBAR_Y_POS, 5, 8, false); |
406 | } | 406 | } |
407 | 407 | ||
408 | #ifndef HAVE_LED | 408 | #if CONFIG_LED == LED_VIRTUAL |
409 | /* | 409 | /* |
410 | * no real LED: disk activity in status bar | 410 | * no real LED: disk activity in status bar |
411 | */ | 411 | */ |
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h index d9d743a26c..48e9a167ee 100644 --- a/apps/recorder/icons.h +++ b/apps/recorder/icons.h | |||
@@ -63,7 +63,7 @@ enum icons_7x8 { | |||
63 | extern const unsigned char bitmap_icons_5x8[1][5]; | 63 | extern const unsigned char bitmap_icons_5x8[1][5]; |
64 | extern const unsigned char bitmap_icons_6x8[LastIcon][6]; | 64 | extern const unsigned char bitmap_icons_6x8[LastIcon][6]; |
65 | extern const unsigned char bitmap_icons_7x8[Icon_Last][7]; | 65 | extern const unsigned char bitmap_icons_7x8[Icon_Last][7]; |
66 | #ifndef HAVE_LED | 66 | #if CONFIG_LED == LED_VIRTUAL |
67 | extern const unsigned char bitmap_icon_disk[]; | 67 | extern const unsigned char bitmap_icon_disk[]; |
68 | #endif | 68 | #endif |
69 | 69 | ||
@@ -106,7 +106,7 @@ extern void statusbar_icon_lock(void); | |||
106 | #ifdef HAVE_RTC | 106 | #ifdef HAVE_RTC |
107 | extern void statusbar_time(int hour, int minute); | 107 | extern void statusbar_time(int hour, int minute); |
108 | #endif | 108 | #endif |
109 | #ifndef HAVE_LED | 109 | #if CONFIG_LED == LED_VIRTUAL |
110 | extern void statusbar_led(void); | 110 | extern void statusbar_led(void); |
111 | #endif | 111 | #endif |
112 | 112 | ||
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 111995cbfe..84c90d2d86 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -307,7 +307,7 @@ bool recording_screen(void) | |||
307 | char path_buffer[MAX_PATH]; | 307 | char path_buffer[MAX_PATH]; |
308 | bool been_in_usb_mode = false; | 308 | bool been_in_usb_mode = false; |
309 | int last_audio_stat = -1; | 309 | int last_audio_stat = -1; |
310 | #ifdef HAVE_LED | 310 | #if CONFIG_LED == LED_REAL |
311 | bool led_state = false; | 311 | bool led_state = false; |
312 | int led_countdown = 2; | 312 | int led_countdown = 2; |
313 | #endif | 313 | #endif |
@@ -320,7 +320,7 @@ bool recording_screen(void) | |||
320 | }; | 320 | }; |
321 | 321 | ||
322 | cursor = 0; | 322 | cursor = 0; |
323 | #if defined(HAVE_LED) && !defined(SIMULATOR) | 323 | #if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) |
324 | ata_set_led_enabled(false); | 324 | ata_set_led_enabled(false); |
325 | #endif | 325 | #endif |
326 | mpeg_init_recording(); | 326 | mpeg_init_recording(); |
@@ -356,7 +356,7 @@ bool recording_screen(void) | |||
356 | while(!done) | 356 | while(!done) |
357 | { | 357 | { |
358 | int audio_stat = audio_status(); | 358 | int audio_stat = audio_status(); |
359 | #ifdef HAVE_LED | 359 | #if CONFIG_LED == LED_REAL |
360 | 360 | ||
361 | /* | 361 | /* |
362 | * Flash the LED while waiting to record. Turn it on while | 362 | * Flash the LED while waiting to record. Turn it on while |
@@ -401,7 +401,7 @@ bool recording_screen(void) | |||
401 | led(false); | 401 | led(false); |
402 | } | 402 | } |
403 | } | 403 | } |
404 | #endif /* HAVE_LED */ | 404 | #endif /* CONFIG_LED */ |
405 | 405 | ||
406 | /* Wait for a button a while (HZ/10) drawing the peak meter */ | 406 | /* Wait for a button a while (HZ/10) drawing the peak meter */ |
407 | button = peak_meter_draw_get_btn(0, 8 + h*2, LCD_WIDTH, h); | 407 | button = peak_meter_draw_get_btn(0, 8 + h*2, LCD_WIDTH, h); |
@@ -574,7 +574,7 @@ bool recording_screen(void) | |||
574 | case REC_SETTINGS: | 574 | case REC_SETTINGS: |
575 | if(audio_stat != AUDIO_STATUS_RECORD) | 575 | if(audio_stat != AUDIO_STATUS_RECORD) |
576 | { | 576 | { |
577 | #ifdef HAVE_LED | 577 | #if CONFIG_LED == LED_REAL |
578 | /* led is restored at begin of loop / end of function */ | 578 | /* led is restored at begin of loop / end of function */ |
579 | led(false); | 579 | led(false); |
580 | #endif | 580 | #endif |
@@ -607,7 +607,7 @@ bool recording_screen(void) | |||
607 | case REC_F2: | 607 | case REC_F2: |
608 | if(audio_stat != AUDIO_STATUS_RECORD) | 608 | if(audio_stat != AUDIO_STATUS_RECORD) |
609 | { | 609 | { |
610 | #ifdef HAVE_LED | 610 | #if CONFIG_LED == LED_REAL |
611 | /* led is restored at begin of loop / end of function */ | 611 | /* led is restored at begin of loop / end of function */ |
612 | led(false); | 612 | led(false); |
613 | #endif | 613 | #endif |
@@ -633,7 +633,7 @@ bool recording_screen(void) | |||
633 | { | 633 | { |
634 | if(audio_stat != AUDIO_STATUS_RECORD) | 634 | if(audio_stat != AUDIO_STATUS_RECORD) |
635 | { | 635 | { |
636 | #ifdef HAVE_LED | 636 | #if CONFIG_LED == LED_REAL |
637 | /* led is restored at begin of loop / end of function */ | 637 | /* led is restored at begin of loop / end of function */ |
638 | led(false); | 638 | led(false); |
639 | #endif | 639 | #endif |
@@ -839,7 +839,7 @@ bool recording_screen(void) | |||
839 | if (have_recorded) | 839 | if (have_recorded) |
840 | reload_directory(); | 840 | reload_directory(); |
841 | 841 | ||
842 | #if defined(HAVE_LED) && !defined(SIMULATOR) | 842 | #if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) |
843 | ata_set_led_enabled(true); | 843 | ata_set_led_enabled(true); |
844 | #endif | 844 | #endif |
845 | return been_in_usb_mode; | 845 | return been_in_usb_mode; |
diff --git a/apps/status.c b/apps/status.c index d7d3a21f5b..8d3d1748cb 100644 --- a/apps/status.c +++ b/apps/status.c | |||
@@ -60,7 +60,7 @@ struct status_info { | |||
60 | bool keylock; | 60 | bool keylock; |
61 | bool battery_safe; | 61 | bool battery_safe; |
62 | bool redraw_volume; /* true if the volume gauge needs updating */ | 62 | bool redraw_volume; /* true if the volume gauge needs updating */ |
63 | #ifndef HAVE_LED | 63 | #if CONFIG_LED == LED_VIRTUAL |
64 | bool led; /* disk LED simulation in the status bar */ | 64 | bool led; /* disk LED simulation in the status bar */ |
65 | #endif | 65 | #endif |
66 | }; | 66 | }; |
@@ -167,7 +167,7 @@ void status_draw(bool force_redraw) | |||
167 | #endif | 167 | #endif |
168 | info.repeat = global_settings.repeat_mode; | 168 | info.repeat = global_settings.repeat_mode; |
169 | info.playmode = current_playmode(); | 169 | info.playmode = current_playmode(); |
170 | #ifndef HAVE_LED | 170 | #if CONFIG_LED == LED_VIRTUAL |
171 | info.led = led_read(HZ/2); /* delay should match polling interval */ | 171 | info.led = led_read(HZ/2); /* delay should match polling interval */ |
172 | #endif | 172 | #endif |
173 | 173 | ||
@@ -248,7 +248,7 @@ void status_draw(bool force_redraw) | |||
248 | #ifdef HAVE_RTC | 248 | #ifdef HAVE_RTC |
249 | statusbar_time(info.hour, info.minute); | 249 | statusbar_time(info.hour, info.minute); |
250 | #endif | 250 | #endif |
251 | #ifndef HAVE_LED | 251 | #if CONFIG_LED == LED_VIRTUAL |
252 | if (info.led) | 252 | if (info.led) |
253 | statusbar_led(); | 253 | statusbar_led(); |
254 | #endif | 254 | #endif |