summaryrefslogtreecommitdiff
path: root/firmware/usb.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-02-10 23:43:37 +0000
committerJens Arnold <amiconn@rockbox.org>2009-02-10 23:43:37 +0000
commit11ad7b4bc8bcb049040c02fae04074faf5dfaf27 (patch)
treece92c57120cb9b019743a863083f654e8d80f95f /firmware/usb.c
parenteddb5680f9aefecdaccf24279cff2d3cf4fd5d86 (diff)
downloadrockbox-11ad7b4bc8bcb049040c02fae04074faf5dfaf27.tar.gz
rockbox-11ad7b4bc8bcb049040c02fae04074faf5dfaf27.zip
Move screendump from apps to firmware, solving two nasty firmware-to-apps calls. This required to move the filename creation functions as well. * Fix bug in the BMP header of Clip screendumps. * Add remote screendump for targets with an LCD remote. * Simplify some ifdefs and rename a macro in the sim.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19967 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index a1e552a321..a720215731 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -42,7 +42,8 @@
42#ifdef HAVE_USBSTACK 42#ifdef HAVE_USBSTACK
43#include "usb_core.h" 43#include "usb_core.h"
44#endif 44#endif
45#include "logf.h" 45#include "logf.h"
46#include "screendump.h"
46 47
47/* Conditions under which we want the entire driver */ 48/* Conditions under which we want the entire driver */
48#if !defined(BOOTLOADER) || (CONFIG_CPU == SH7034) || \ 49#if !defined(BOOTLOADER) || (CONFIG_CPU == SH7034) || \
@@ -55,11 +56,6 @@
55 56
56#ifdef HAVE_LCD_BITMAP 57#ifdef HAVE_LCD_BITMAP
57bool do_screendump_instead_of_usb = false; 58bool do_screendump_instead_of_usb = false;
58#if defined(USB_FULL_INIT) && defined(BOOTLOADER)
59static void screen_dump(void) {}
60#else
61void screen_dump(void); /* Nasty again. Defined in apps/ too */
62#endif
63#endif 59#endif
64 60
65#if !defined(SIMULATOR) && !defined(USB_NONE) 61#if !defined(SIMULATOR) && !defined(USB_NONE)
@@ -262,6 +258,9 @@ static void usb_thread(void)
262 { 258 {
263 usb_state = USB_SCREENDUMP; 259 usb_state = USB_SCREENDUMP;
264 screen_dump(); 260 screen_dump();
261#ifdef HAVE_REMOTE_LCD
262 remote_screen_dump();
263#endif
265 break; 264 break;
266 } 265 }
267#endif 266#endif