diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-07-07 15:01:02 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-07-07 15:13:53 -0400 |
commit | 5a2bd580cdd3d83daef3e5c0da1cf0b0236f1d05 (patch) | |
tree | e6c662ba9ccb07e8c9337e2b7fadb8961af3bf2d | |
parent | 1528b44349d33495c7ea5dc7b3fcd8e07995d16e (diff) | |
download | rockbox-5a2bd580cdd3d83daef3e5c0da1cf0b0236f1d05.tar.gz rockbox-5a2bd580cdd3d83daef3e5c0da1cf0b0236f1d05.zip |
Hopefully fix the last of the stragglers.
* xDuoo X3 fix some warnings due to an incorrect #ifdef
* stub storage_removeable() and storage_present() for non-HOTSWAP builds
* sim_trigger_external() is gated by HOTSWAP, not MULTIDRIVE
Change-Id: I38f14fdfeba13957899c378051d49afc2e8245e5
-rw-r--r-- | firmware/export/storage.h | 3 | ||||
-rw-r--r-- | firmware/target/hosted/sdl/button-sdl.c | 2 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c | 6 | ||||
-rw-r--r-- | uisimulator/common/sim_tasks.c | 2 | ||||
-rw-r--r-- | uisimulator/common/sim_tasks.h | 2 |
5 files changed, 10 insertions, 5 deletions
diff --git a/firmware/export/storage.h b/firmware/export/storage.h index ee1423c93a..b87b7d001f 100644 --- a/firmware/export/storage.h +++ b/firmware/export/storage.h | |||
@@ -310,6 +310,9 @@ void storage_get_info(int drive, struct storage_info *info); | |||
310 | #ifdef HAVE_HOTSWAP | 310 | #ifdef HAVE_HOTSWAP |
311 | bool storage_removable(int drive); | 311 | bool storage_removable(int drive); |
312 | bool storage_present(int drive); | 312 | bool storage_present(int drive); |
313 | #else | ||
314 | #define storage_removable(x) 0 | ||
315 | #define storage_present(x) 1 | ||
313 | #endif | 316 | #endif |
314 | int storage_driver_type(int drive); | 317 | int storage_driver_type(int drive); |
315 | 318 | ||
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c index 1055d7e0b9..b5f3720a3b 100644 --- a/firmware/target/hosted/sdl/button-sdl.c +++ b/firmware/target/hosted/sdl/button-sdl.c | |||
@@ -340,7 +340,7 @@ static void button_event(int key, bool pressed) | |||
340 | } | 340 | } |
341 | return; | 341 | return; |
342 | #endif | 342 | #endif |
343 | #ifdef HAVE_MULTIDRIVE | 343 | #ifdef HAVE_HOTSWAP |
344 | case EXT_KEY: | 344 | case EXT_KEY: |
345 | if (!pressed) | 345 | if (!pressed) |
346 | sim_trigger_external(!storage_present(1)); | 346 | sim_trigger_external(!storage_present(1)); |
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c index 1c9fe4300b..914cd6d9d3 100644 --- a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c +++ b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c | |||
@@ -565,7 +565,7 @@ static inline int write_sector(unsigned long start, unsigned int count, | |||
565 | 565 | ||
566 | int nand_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf) | 566 | int nand_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf) |
567 | { | 567 | { |
568 | #ifdef HAVE_MULTIVOLUME | 568 | #ifdef HAVE_MULTIDRIVE |
569 | (void)drive; | 569 | (void)drive; |
570 | #endif | 570 | #endif |
571 | int ret = 0; | 571 | int ret = 0; |
@@ -592,7 +592,7 @@ int nand_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* bu | |||
592 | 592 | ||
593 | int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf) | 593 | int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf) |
594 | { | 594 | { |
595 | #ifdef HAVE_MULTIVOLUME | 595 | #ifdef HAVE_MULTIDRIVE |
596 | (void)drive; | 596 | (void)drive; |
597 | #endif | 597 | #endif |
598 | int ret = 0; | 598 | int ret = 0; |
@@ -664,7 +664,7 @@ void nand_sleepnow(void) | |||
664 | #ifdef STORAGE_GET_INFO | 664 | #ifdef STORAGE_GET_INFO |
665 | void nand_get_info(IF_MD(int drive,) struct storage_info *info) | 665 | void nand_get_info(IF_MD(int drive,) struct storage_info *info) |
666 | { | 666 | { |
667 | #ifdef HAVE_MULTIVOLUME | 667 | #ifdef HAVE_MULTIDRIVE |
668 | (void)drive; | 668 | (void)drive; |
669 | #endif | 669 | #endif |
670 | 670 | ||
diff --git a/uisimulator/common/sim_tasks.c b/uisimulator/common/sim_tasks.c index 839ad828b8..6662b28767 100644 --- a/uisimulator/common/sim_tasks.c +++ b/uisimulator/common/sim_tasks.c | |||
@@ -222,7 +222,7 @@ void usb_wait_for_disconnect(struct event_queue *q) | |||
222 | 222 | ||
223 | static bool is_ext_inserted; | 223 | static bool is_ext_inserted; |
224 | 224 | ||
225 | #ifdef HAVE_MULTIDRIVE | 225 | #ifdef HAVE_HOTSWAP |
226 | void sim_trigger_external(bool inserted) | 226 | void sim_trigger_external(bool inserted) |
227 | { | 227 | { |
228 | is_ext_inserted = inserted; | 228 | is_ext_inserted = inserted; |
diff --git a/uisimulator/common/sim_tasks.h b/uisimulator/common/sim_tasks.h index 689a4a8566..cfe3e71c3a 100644 --- a/uisimulator/common/sim_tasks.h +++ b/uisimulator/common/sim_tasks.h | |||
@@ -28,7 +28,9 @@ | |||
28 | void sim_tasks_init(void); | 28 | void sim_tasks_init(void); |
29 | void sim_trigger_screendump(void); | 29 | void sim_trigger_screendump(void); |
30 | void sim_trigger_usb(bool inserted); | 30 | void sim_trigger_usb(bool inserted); |
31 | #ifdef HAVE_HOTSWAP | ||
31 | void sim_trigger_external(bool inserted); | 32 | void sim_trigger_external(bool inserted); |
33 | #endif | ||
32 | void sim_trigger_hp(bool inserted); | 34 | void sim_trigger_hp(bool inserted); |
33 | void sim_trigger_lo(bool inserted); | 35 | void sim_trigger_lo(bool inserted); |
34 | #endif | 36 | #endif |