diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2008-10-31 21:25:04 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2008-10-31 21:25:04 +0000 |
commit | 19d1cacb1a63c306d842f81127d382512c49a062 (patch) | |
tree | bac051d18aae2c9f201744890177e0021e5269be /apps | |
parent | 3aa58328080ab9a254d9f2329696fa4309a30d50 (diff) | |
download | rockbox-19d1cacb1a63c306d842f81127d382512c49a062.tar.gz rockbox-19d1cacb1a63c306d842f81127d382512c49a062.zip |
cleanup storage defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18950 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/debug_menu.c | 20 | ||||
-rw-r--r-- | apps/main.c | 6 | ||||
-rw-r--r-- | apps/misc.c | 4 | ||||
-rw-r--r-- | apps/mpeg.c | 6 | ||||
-rw-r--r-- | apps/mpeg.h | 2 | ||||
-rw-r--r-- | apps/plugins/SOURCES | 3 | ||||
-rw-r--r-- | apps/plugins/alpine_cdc.c | 4 | ||||
-rw-r--r-- | apps/plugins/splitedit.c | 4 | ||||
-rw-r--r-- | apps/plugins/test_disk.c | 2 | ||||
-rw-r--r-- | apps/plugins/wavplay.c | 4 | ||||
-rw-r--r-- | apps/plugins/wavrecord.c | 6 | ||||
-rw-r--r-- | apps/screens.c | 8 | ||||
-rw-r--r-- | apps/screens.h | 2 | ||||
-rw-r--r-- | apps/talk.c | 10 |
14 files changed, 42 insertions, 39 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 8c4622828d..26534cc101 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -63,7 +63,7 @@ | |||
63 | #include "fat.h" | 63 | #include "fat.h" |
64 | #include "mas.h" | 64 | #include "mas.h" |
65 | #include "eeprom_24cxx.h" | 65 | #include "eeprom_24cxx.h" |
66 | #if defined(HAVE_MMC) || defined(HAVE_ATA_SD) | 66 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) |
67 | #include "hotswap.h" | 67 | #include "hotswap.h" |
68 | #endif | 68 | #endif |
69 | #if CONFIG_TUNER | 69 | #if CONFIG_TUNER |
@@ -1730,8 +1730,8 @@ static bool view_battery(void) | |||
1730 | #endif | 1730 | #endif |
1731 | 1731 | ||
1732 | #ifndef SIMULATOR | 1732 | #ifndef SIMULATOR |
1733 | #if defined(HAVE_MMC) || defined(HAVE_ATA_SD) | 1733 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) |
1734 | #if defined(HAVE_MMC) | 1734 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1735 | #define CARDTYPE "MMC" | 1735 | #define CARDTYPE "MMC" |
1736 | #else | 1736 | #else |
1737 | #define CARDTYPE "microSD" | 1737 | #define CARDTYPE "microSD" |
@@ -1812,7 +1812,7 @@ static int disk_callback(int btn, struct gui_synclist *lists) | |||
1812 | { | 1812 | { |
1813 | simplelist_addline(SIMPLELIST_ADD_LINE, "Not Found!"); | 1813 | simplelist_addline(SIMPLELIST_ADD_LINE, "Not Found!"); |
1814 | } | 1814 | } |
1815 | #ifndef HAVE_MMC | 1815 | #if (CONFIG_STORAGE & STORAGE_SD) |
1816 | else /* card->initialized < 0 */ | 1816 | else /* card->initialized < 0 */ |
1817 | { | 1817 | { |
1818 | simplelist_addline(SIMPLELIST_ADD_LINE, "Init Error! (%d)", card->initialized); | 1818 | simplelist_addline(SIMPLELIST_ADD_LINE, "Init Error! (%d)", card->initialized); |
@@ -1826,7 +1826,7 @@ static int disk_callback(int btn, struct gui_synclist *lists) | |||
1826 | } | 1826 | } |
1827 | return btn; | 1827 | return btn; |
1828 | } | 1828 | } |
1829 | #else /* !defined(HAVE_MMC) && !defined(HAVE_ATA_SD) */ | 1829 | #else /* !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD) */ |
1830 | static int disk_callback(int btn, struct gui_synclist *lists) | 1830 | static int disk_callback(int btn, struct gui_synclist *lists) |
1831 | { | 1831 | { |
1832 | (void)lists; | 1832 | (void)lists; |
@@ -1960,13 +1960,13 @@ static bool dbg_identify_info(void) | |||
1960 | } | 1960 | } |
1961 | return false; | 1961 | return false; |
1962 | } | 1962 | } |
1963 | #endif /* !defined(HAVE_MMC) && !defined(HAVE_ATA_SD) */ | 1963 | #endif /* !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD) */ |
1964 | 1964 | ||
1965 | static bool dbg_disk_info(void) | 1965 | static bool dbg_disk_info(void) |
1966 | { | 1966 | { |
1967 | struct simplelist_info info; | 1967 | struct simplelist_info info; |
1968 | simplelist_info_init(&info, "Disk Info", 1, NULL); | 1968 | simplelist_info_init(&info, "Disk Info", 1, NULL); |
1969 | #if defined(HAVE_MMC) || defined(HAVE_ATA_SD) | 1969 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) |
1970 | char title[16]; | 1970 | char title[16]; |
1971 | int card = 0; | 1971 | int card = 0; |
1972 | info.callback_data = (void*)&card; | 1972 | info.callback_data = (void*)&card; |
@@ -2146,7 +2146,7 @@ static bool dbg_save_roms(void) | |||
2146 | 2146 | ||
2147 | return false; | 2147 | return false; |
2148 | } | 2148 | } |
2149 | #elif defined(CPU_PP) && !defined(HAVE_ATA_SD) | 2149 | #elif defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD) |
2150 | static bool dbg_save_roms(void) | 2150 | static bool dbg_save_roms(void) |
2151 | { | 2151 | { |
2152 | int fd; | 2152 | int fd; |
@@ -2467,7 +2467,7 @@ struct the_menu_item { | |||
2467 | }; | 2467 | }; |
2468 | static const struct the_menu_item menuitems[] = { | 2468 | static const struct the_menu_item menuitems[] = { |
2469 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ | 2469 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ |
2470 | (defined(CPU_PP) && !defined(HAVE_ATA_SD)) | 2470 | (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) |
2471 | { "Dump ROM contents", dbg_save_roms }, | 2471 | { "Dump ROM contents", dbg_save_roms }, |
2472 | #endif | 2472 | #endif |
2473 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \ | 2473 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \ |
@@ -2504,7 +2504,7 @@ static const struct the_menu_item menuitems[] = { | |||
2504 | #endif | 2504 | #endif |
2505 | #ifndef SIMULATOR | 2505 | #ifndef SIMULATOR |
2506 | { "View disk info", dbg_disk_info }, | 2506 | { "View disk info", dbg_disk_info }, |
2507 | #if !defined(HAVE_MMC) && !defined(HAVE_ATA_SD) | 2507 | #if !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD) |
2508 | { "Dump ATA identify info", dbg_identify_info}, | 2508 | { "Dump ATA identify info", dbg_identify_info}, |
2509 | #endif | 2509 | #endif |
2510 | #endif | 2510 | #endif |
diff --git a/apps/main.c b/apps/main.c index bacaa51e01..50597699c5 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -89,7 +89,7 @@ | |||
89 | #if CONFIG_TUNER | 89 | #if CONFIG_TUNER |
90 | #include "radio.h" | 90 | #include "radio.h" |
91 | #endif | 91 | #endif |
92 | #ifdef HAVE_MMC | 92 | #if (CONFIG_STORAGE & STORAGE_MMC) |
93 | #include "ata_mmc.h" | 93 | #include "ata_mmc.h" |
94 | #endif | 94 | #endif |
95 | 95 | ||
@@ -377,7 +377,7 @@ static void init(void) | |||
377 | #ifdef DEBUG | 377 | #ifdef DEBUG |
378 | debug_init(); | 378 | debug_init(); |
379 | #else | 379 | #else |
380 | #if !defined(HAVE_FMADC) && !defined(HAVE_MMC) | 380 | #if !defined(HAVE_FMADC) && !(CONFIG_STORAGE & STORAGE_MMC) |
381 | serial_setup(); | 381 | serial_setup(); |
382 | #endif | 382 | #endif |
383 | #endif | 383 | #endif |
@@ -456,7 +456,7 @@ static void init(void) | |||
456 | #endif | 456 | #endif |
457 | /* enter USB mode early, before trying to mount */ | 457 | /* enter USB mode early, before trying to mount */ |
458 | if (button_get_w_tmo(HZ/10) == SYS_USB_CONNECTED) | 458 | if (button_get_w_tmo(HZ/10) == SYS_USB_CONNECTED) |
459 | #ifdef HAVE_MMC | 459 | #if (CONFIG_STORAGE & STORAGE_MMC) |
460 | if (!mmc_touched() || | 460 | if (!mmc_touched() || |
461 | (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED)) | 461 | (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED)) |
462 | #endif | 462 | #endif |
diff --git a/apps/misc.c b/apps/misc.c index cd59dbc40f..7c8ff0fbd8 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -61,7 +61,7 @@ | |||
61 | #include "playlist.h" | 61 | #include "playlist.h" |
62 | #include "yesno.h" | 62 | #include "yesno.h" |
63 | 63 | ||
64 | #ifdef HAVE_MMC | 64 | #if (CONFIG_STORAGE & STORAGE_MMC) |
65 | #include "ata_mmc.h" | 65 | #include "ata_mmc.h" |
66 | #endif | 66 | #endif |
67 | #include "tree.h" | 67 | #include "tree.h" |
@@ -910,7 +910,7 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
910 | case SYS_USB_CONNECTED: | 910 | case SYS_USB_CONNECTED: |
911 | if (callback != NULL) | 911 | if (callback != NULL) |
912 | callback(parameter); | 912 | callback(parameter); |
913 | #ifdef HAVE_MMC | 913 | #if (CONFIG_STORAGE & STORAGE_MMC) |
914 | if (!mmc_touched() || | 914 | if (!mmc_touched() || |
915 | (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED)) | 915 | (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED)) |
916 | #endif | 916 | #endif |
diff --git a/apps/mpeg.c b/apps/mpeg.c index 713915d5a6..3c37a6b22f 100644 --- a/apps/mpeg.c +++ b/apps/mpeg.c | |||
@@ -1603,7 +1603,8 @@ static void mpeg_thread(void) | |||
1603 | /* Don't read more than until the end of the buffer */ | 1603 | /* Don't read more than until the end of the buffer */ |
1604 | amount_to_read = MIN(audiobuflen - audiobuf_write, | 1604 | amount_to_read = MIN(audiobuflen - audiobuf_write, |
1605 | amount_to_read); | 1605 | amount_to_read); |
1606 | #ifdef HAVE_MMC /* MMC is slow, so don't read too large chunks */ | 1606 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1607 | /* MMC is slow, so don't read too large chunks */ | ||
1607 | amount_to_read = MIN(0x40000, amount_to_read); | 1608 | amount_to_read = MIN(0x40000, amount_to_read); |
1608 | #elif MEM == 8 | 1609 | #elif MEM == 8 |
1609 | amount_to_read = MIN(0x100000, amount_to_read); | 1610 | amount_to_read = MIN(0x100000, amount_to_read); |
@@ -1912,7 +1913,8 @@ static void mpeg_thread(void) | |||
1912 | 1913 | ||
1913 | amount_to_save = MIN(amount_to_save, | 1914 | amount_to_save = MIN(amount_to_save, |
1914 | audiobuflen - audiobuf_read); | 1915 | audiobuflen - audiobuf_read); |
1915 | #ifdef HAVE_MMC /* MMC is slow, so don't save too large chunks at once */ | 1916 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1917 | /* MMC is slow, so don't save too large chunks at once */ | ||
1916 | amount_to_save = MIN(0x40000, amount_to_save); | 1918 | amount_to_save = MIN(0x40000, amount_to_save); |
1917 | #elif MEM == 8 | 1919 | #elif MEM == 8 |
1918 | amount_to_save = MIN(0x100000, amount_to_save); | 1920 | amount_to_save = MIN(0x100000, amount_to_save); |
diff --git a/apps/mpeg.h b/apps/mpeg.h index f5ce613b8d..3aaa990881 100644 --- a/apps/mpeg.h +++ b/apps/mpeg.h | |||
@@ -32,7 +32,7 @@ | |||
32 | #define MPEG_RECORDING_LOW_WATER 0x80000 | 32 | #define MPEG_RECORDING_LOW_WATER 0x80000 |
33 | #define MPEG_LOW_WATER_CHUNKSIZE 0x40000 | 33 | #define MPEG_LOW_WATER_CHUNKSIZE 0x40000 |
34 | #define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000 | 34 | #define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000 |
35 | #ifdef HAVE_MMC | 35 | #if (CONFIG_STORAGE & STORAGE_MMC) |
36 | #define MPEG_PLAY_PENDING_THRESHOLD 0x20000 | 36 | #define MPEG_PLAY_PENDING_THRESHOLD 0x20000 |
37 | #define MPEG_PLAY_PENDING_SWAPSIZE 0x20000 | 37 | #define MPEG_PLAY_PENDING_SWAPSIZE 0x20000 |
38 | #else | 38 | #else |
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 0c27a5b1de..a4ddbacfd0 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES | |||
@@ -120,7 +120,8 @@ nim.c | |||
120 | mp3_encoder.c | 120 | mp3_encoder.c |
121 | wav2wv.c | 121 | wav2wv.c |
122 | #else /* hardware codec platforms */ | 122 | #else /* hardware codec platforms */ |
123 | #ifndef HAVE_MMC /* not for Ondio, has no remote control pin */ | 123 | #if !defined(ARCHOS_ONDIOSP) && !defined(ARCHOS_ONDIOFM) |
124 | /* not for Ondio, has no remote control pin */ | ||
124 | alpine_cdc.c | 125 | alpine_cdc.c |
125 | #endif | 126 | #endif |
126 | splitedit.c | 127 | splitedit.c |
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c index f23255aea6..dfffc3b3cd 100644 --- a/apps/plugins/alpine_cdc.c +++ b/apps/plugins/alpine_cdc.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "plugin.h" | 34 | #include "plugin.h" |
35 | 35 | ||
36 | /* Only build for (correct) target */ | 36 | /* Only build for (correct) target */ |
37 | #if CONFIG_CPU==SH7034 && !defined(HAVE_MMC) | 37 | #if CONFIG_CPU==SH7034 && !(CONFIG_STORAGE & STORAGE_MMC) |
38 | 38 | ||
39 | PLUGIN_HEADER | 39 | PLUGIN_HEADER |
40 | 40 | ||
@@ -1199,4 +1199,4 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
1199 | return (main(parameter)==0) ? PLUGIN_OK : PLUGIN_ERROR; | 1199 | return (main(parameter)==0) ? PLUGIN_OK : PLUGIN_ERROR; |
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | #endif /* CONFIG_CPU==SH7034 && !defined(HAVE_MMC) */ | 1202 | #endif /* CONFIG_CPU==SH7034 && !(CONFIG_STORAGE & STORAGE_MMC) */ |
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c index 8de6a746ab..dda46a0f29 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c | |||
@@ -1044,7 +1044,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1044 | case LOOP_MODE_TO: | 1044 | case LOOP_MODE_TO: |
1045 | rb->audio_pause(); | 1045 | rb->audio_pause(); |
1046 | rb->audio_ff_rewind(range_start); | 1046 | rb->audio_ff_rewind(range_start); |
1047 | #ifdef HAVE_MMC | 1047 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1048 | /* MMC is slow - wait some time to allow track reload to finish */ | 1048 | /* MMC is slow - wait some time to allow track reload to finish */ |
1049 | rb->sleep(HZ/20); | 1049 | rb->sleep(HZ/20); |
1050 | if (mp3->elapsed > play_end) /* reload in progress */ | 1050 | if (mp3->elapsed > play_end) /* reload in progress */ |
@@ -1056,7 +1056,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1056 | case LOOP_MODE_FROM: | 1056 | case LOOP_MODE_FROM: |
1057 | rb->audio_pause(); | 1057 | rb->audio_pause(); |
1058 | rb->audio_ff_rewind(xpos_to_time(split_x)); | 1058 | rb->audio_ff_rewind(xpos_to_time(split_x)); |
1059 | #ifdef HAVE_MMC | 1059 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1060 | /* MMC is slow - wait some time to allow track reload to finish */ | 1060 | /* MMC is slow - wait some time to allow track reload to finish */ |
1061 | rb->sleep(HZ/20); | 1061 | rb->sleep(HZ/20); |
1062 | if (mp3->elapsed > play_end) /* reload in progress */ | 1062 | if (mp3->elapsed > play_end) /* reload in progress */ |
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index 7638fbf831..2e421e151e 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c | |||
@@ -29,7 +29,7 @@ PLUGIN_HEADER | |||
29 | #define TEST_FILE TESTBASEDIR "/test_disk.tmp" | 29 | #define TEST_FILE TESTBASEDIR "/test_disk.tmp" |
30 | #define FRND_SEED 0x78C3 /* arbirary */ | 30 | #define FRND_SEED 0x78C3 /* arbirary */ |
31 | 31 | ||
32 | #ifdef HAVE_MMC | 32 | #if (CONFIG_STORAGE & STORAGE_MMC) |
33 | #define TEST_SIZE (20*1024*1024) | 33 | #define TEST_SIZE (20*1024*1024) |
34 | #else | 34 | #else |
35 | #define TEST_SIZE (300*1024*1024) | 35 | #define TEST_SIZE (300*1024*1024) |
diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c index 333d16135c..c37b656d1c 100644 --- a/apps/plugins/wavplay.c +++ b/apps/plugins/wavplay.c | |||
@@ -3574,7 +3574,7 @@ int play_file(char* filename) | |||
3574 | while (!(SSR0 & SCI_TEND)); /* wait for end of transfer */ | 3574 | while (!(SSR0 & SCI_TEND)); /* wait for end of transfer */ |
3575 | BRR0 = 0; /* maximum speed, ~3 MBit/s */ | 3575 | BRR0 = 0; /* maximum speed, ~3 MBit/s */ |
3576 | 3576 | ||
3577 | #ifndef HAVE_MMC | 3577 | #if !(CONFIG_STORAGE & STORAGE_MMC) |
3578 | low_water = 5 /* seconds */ | 3578 | low_water = 5 /* seconds */ |
3579 | * 2 /* bytes per sample */ | 3579 | * 2 /* bytes per sample */ |
3580 | * channels | 3580 | * channels |
@@ -3603,7 +3603,7 @@ int play_file(char* filename) | |||
3603 | else | 3603 | else |
3604 | { | 3604 | { |
3605 | wanted = MIN(free_space, aud_size - aud_write); | 3605 | wanted = MIN(free_space, aud_size - aud_write); |
3606 | #ifdef HAVE_MMC | 3606 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3607 | wanted = MIN(wanted, 256*1024); | 3607 | wanted = MIN(wanted, 256*1024); |
3608 | #elif MEM == 8 | 3608 | #elif MEM == 8 |
3609 | wanted = MIN(wanted, 1024*1024); | 3609 | wanted = MIN(wanted, 1024*1024); |
diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c index d57a61a6a2..d4b8bf1fd2 100644 --- a/apps/plugins/wavrecord.c +++ b/apps/plugins/wavrecord.c | |||
@@ -3587,7 +3587,7 @@ static int record_file(char *filename) | |||
3587 | if (to_save > aud_size) | 3587 | if (to_save > aud_size) |
3588 | { | 3588 | { |
3589 | rec_tick_enable(false); | 3589 | rec_tick_enable(false); |
3590 | #ifdef HAVE_MMC | 3590 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3591 | rb->splash(HZ, "Data overrun (slow MMC)"); | 3591 | rb->splash(HZ, "Data overrun (slow MMC)"); |
3592 | #else | 3592 | #else |
3593 | rb->splash(HZ, "Data overrun"); | 3593 | rb->splash(HZ, "Data overrun"); |
@@ -3597,7 +3597,7 @@ static int record_file(char *filename) | |||
3597 | break; | 3597 | break; |
3598 | } | 3598 | } |
3599 | write_now = MIN(to_save, aud_size - aud_read); | 3599 | write_now = MIN(to_save, aud_size - aud_read); |
3600 | #ifdef HAVE_MMC | 3600 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3601 | write_now = MIN(write_now, 256*1024); | 3601 | write_now = MIN(write_now, 256*1024); |
3602 | #else | 3602 | #else |
3603 | write_now = MIN(write_now, 1024*1024); | 3603 | write_now = MIN(write_now, 1024*1024); |
@@ -3802,7 +3802,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
3802 | return rc; | 3802 | return rc; |
3803 | 3803 | ||
3804 | #if 0 | 3804 | #if 0 |
3805 | #ifdef HAVE_MMC | 3805 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3806 | return record_file("/<MMC1>/test.wav"); | 3806 | return record_file("/<MMC1>/test.wav"); |
3807 | #else | 3807 | #else |
3808 | return record_file("/test.wav"); | 3808 | return record_file("/test.wav"); |
diff --git a/apps/screens.c b/apps/screens.c index d8ce695a9a..753b666902 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -68,7 +68,7 @@ | |||
68 | #include <bitmaps/remote_usblogo.h> | 68 | #include <bitmaps/remote_usblogo.h> |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #ifdef HAVE_MMC | 71 | #if (CONFIG_STORAGE & STORAGE_MMC) |
72 | #include "ata_mmc.h" | 72 | #include "ata_mmc.h" |
73 | #endif | 73 | #endif |
74 | #if CONFIG_CODEC == SWCODEC | 74 | #if CONFIG_CODEC == SWCODEC |
@@ -145,9 +145,9 @@ void usb_screen(void) | |||
145 | usb_acknowledge(SYS_USB_CONNECTED_ACK); | 145 | usb_acknowledge(SYS_USB_CONNECTED_ACK); |
146 | while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ)) { | 146 | while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ)) { |
147 | if(usb_inserted()) { | 147 | if(usb_inserted()) { |
148 | #ifdef HAVE_MMC /* USB-MMC bridge can report activity */ | 148 | #if (CONFIG_STORAGE & STORAGE_MMC) /* USB-MMC bridge can report activity */ |
149 | led(mmc_usb_active(HZ)); | 149 | led(mmc_usb_active(HZ)); |
150 | #endif /* HAVE_MMC */ | 150 | #endif /* STORAGE_MMC */ |
151 | gui_syncstatusbar_draw(&statusbars, false); | 151 | gui_syncstatusbar_draw(&statusbars, false); |
152 | } | 152 | } |
153 | } | 153 | } |
@@ -161,7 +161,7 @@ void usb_screen(void) | |||
161 | #endif /* USB_NONE */ | 161 | #endif /* USB_NONE */ |
162 | } | 162 | } |
163 | 163 | ||
164 | #ifdef HAVE_MMC | 164 | #if (CONFIG_STORAGE & STORAGE_MMC) |
165 | int mmc_remove_request(void) | 165 | int mmc_remove_request(void) |
166 | { | 166 | { |
167 | struct queue_event ev; | 167 | struct queue_event ev; |
diff --git a/apps/screens.h b/apps/screens.h index d024cc5f2e..eb613fc178 100644 --- a/apps/screens.h +++ b/apps/screens.h | |||
@@ -34,7 +34,7 @@ int charging_screen(void); | |||
34 | void charging_splash(void); | 34 | void charging_splash(void); |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifdef HAVE_MMC | 37 | #if (CONFIG_STORAGE & STORAGE_MMC) |
38 | int mmc_remove_request(void); | 38 | int mmc_remove_request(void); |
39 | #endif | 39 | #endif |
40 | 40 | ||
diff --git a/apps/talk.c b/apps/talk.c index 2da4cd5c26..44ba063655 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -187,7 +187,7 @@ static unsigned char* get_clip(long id, long* p_size) | |||
187 | return NULL; | 187 | return NULL; |
188 | clipbuf = (unsigned char *) p_voicefile + p_voicefile->index[id].offset; | 188 | clipbuf = (unsigned char *) p_voicefile + p_voicefile->index[id].offset; |
189 | 189 | ||
190 | #ifdef HAVE_MMC /* dynamic loading, on demand */ | 190 | #if (CONFIG_STORAGE & STORAGE_MMC) /* dynamic loading, on demand */ |
191 | if (!(clipsize & LOADED_MASK)) | 191 | if (!(clipsize & LOADED_MASK)) |
192 | { /* clip used for the first time, needs loading */ | 192 | { /* clip used for the first time, needs loading */ |
193 | lseek(filehandle, p_voicefile->index[id].offset, SEEK_SET); | 193 | lseek(filehandle, p_voicefile->index[id].offset, SEEK_SET); |
@@ -225,7 +225,7 @@ static void load_voicefile(void) | |||
225 | if (file_size > audiobufend - audiobuf) /* won't fit? */ | 225 | if (file_size > audiobufend - audiobuf) /* won't fit? */ |
226 | goto load_err; | 226 | goto load_err; |
227 | 227 | ||
228 | #ifdef HAVE_MMC /* load only the header for now */ | 228 | #if (CONFIG_STORAGE & STORAGE_MMC) /* load only the header for now */ |
229 | load_size = offsetof(struct voicefile, index); | 229 | load_size = offsetof(struct voicefile, index); |
230 | #else /* load the full file */ | 230 | #else /* load the full file */ |
231 | load_size = file_size; | 231 | load_size = file_size; |
@@ -266,7 +266,7 @@ static void load_voicefile(void) | |||
266 | structec_convert(&p_voicefile->index[i], "ll", 1, true); | 266 | structec_convert(&p_voicefile->index[i], "ll", 1, true); |
267 | #endif | 267 | #endif |
268 | 268 | ||
269 | #ifdef HAVE_MMC | 269 | #if (CONFIG_STORAGE & STORAGE_MMC) |
270 | /* load the index table, now that we know its size from the header */ | 270 | /* load the index table, now that we know its size from the header */ |
271 | load_size = (p_voicefile->id1_max + p_voicefile->id2_max) | 271 | load_size = (p_voicefile->id1_max + p_voicefile->id2_max) |
272 | * sizeof(struct clip_entry); | 272 | * sizeof(struct clip_entry); |
@@ -520,7 +520,7 @@ void talk_init(void) | |||
520 | return; | 520 | return; |
521 | } | 521 | } |
522 | 522 | ||
523 | #ifdef HAVE_MMC | 523 | #if (CONFIG_STORAGE & STORAGE_MMC) |
524 | if (filehandle >= 0) /* MMC: An old voice file might still be open */ | 524 | if (filehandle >= 0) /* MMC: An old voice file might still be open */ |
525 | { | 525 | { |
526 | close(filehandle); | 526 | close(filehandle); |
@@ -577,7 +577,7 @@ void talk_buffer_steal(void) | |||
577 | #if CONFIG_CODEC != SWCODEC | 577 | #if CONFIG_CODEC != SWCODEC |
578 | mp3_play_stop(); | 578 | mp3_play_stop(); |
579 | #endif | 579 | #endif |
580 | #ifdef HAVE_MMC | 580 | #if (CONFIG_STORAGE & STORAGE_MMC) |
581 | if (filehandle >= 0) /* only relevant for MMC */ | 581 | if (filehandle >= 0) /* only relevant for MMC */ |
582 | { | 582 | { |
583 | close(filehandle); | 583 | close(filehandle); |