summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-02-20 17:13:08 +0000
committerJens Arnold <amiconn@rockbox.org>2009-02-20 17:13:08 +0000
commit3e67e3b1f06488f67d2ebbf844ff40893cc16bf0 (patch)
treea066891b9a91f8eaf84b2eb0501ce0a09000b765 /firmware
parent2c3517d67a5387f422c7fcccf3c70f43a386b729 (diff)
downloadrockbox-3e67e3b1f06488f67d2ebbf844ff40893cc16bf0.tar.gz
rockbox-3e67e3b1f06488f67d2ebbf844ff40893cc16bf0.zip
Add a rockbox kernel thread for simulator specific tasks, and use that for calling the screendump function(s). Fixes screendump in simulators for backlight-less targets (Ondio), and reduces mixing of unrelated functionality a bit (screendump was called from backlight thread, triggered by a sim-only system wide event).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20065 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/backlight.c10
-rw-r--r--firmware/export/kernel.h7
2 files changed, 3 insertions, 14 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 513f643171..588867f1a5 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -597,16 +597,6 @@ void backlight_thread(void)
597 break; 597 break;
598#endif /* HAVE_REMOTE_LCD/ HAVE_REMOTE_LCD_AS_MAIN */ 598#endif /* HAVE_REMOTE_LCD/ HAVE_REMOTE_LCD_AS_MAIN */
599#endif /* !SIMULATOR */ 599#endif /* !SIMULATOR */
600#ifdef SIMULATOR
601 /* TODO: find a better way to do it but we need
602 * a kernel thread somewhere to handle this */
603 case SYS_SCREENDUMP:
604 screen_dump();
605#ifdef HAVE_REMOTE_LCD
606 remote_screen_dump();
607#endif
608 break;
609#endif
610 case SYS_USB_CONNECTED: 600 case SYS_USB_CONNECTED:
611 /* Tell the USB thread that we are safe */ 601 /* Tell the USB thread that we are safe */
612 DEBUGF("backlight_thread got SYS_USB_CONNECTED\n"); 602 DEBUGF("backlight_thread got SYS_USB_CONNECTED\n");
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h
index 90a21630ed..63cc174cb6 100644
--- a/firmware/export/kernel.h
+++ b/firmware/export/kernel.h
@@ -76,10 +76,9 @@
76#define SYS_PHONE_UNPLUGGED MAKE_SYS_EVENT(SYS_EVENT_CLS_PLUG, 3) 76#define SYS_PHONE_UNPLUGGED MAKE_SYS_EVENT(SYS_EVENT_CLS_PLUG, 3)
77#define SYS_REMOTE_PLUGGED MAKE_SYS_EVENT(SYS_EVENT_CLS_PLUG, 4) 77#define SYS_REMOTE_PLUGGED MAKE_SYS_EVENT(SYS_EVENT_CLS_PLUG, 4)
78#define SYS_REMOTE_UNPLUGGED MAKE_SYS_EVENT(SYS_EVENT_CLS_PLUG, 5) 78#define SYS_REMOTE_UNPLUGGED MAKE_SYS_EVENT(SYS_EVENT_CLS_PLUG, 5)
79#define SYS_SCREENDUMP MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 0) 79#define SYS_CAR_ADAPTER_RESUME MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 0)
80#define SYS_CAR_ADAPTER_RESUME MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 1) 80#define SYS_IAP_PERIODIC MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 1)
81#define SYS_IAP_PERIODIC MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 2) 81#define SYS_IAP_HANDLEPKT MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 2)
82#define SYS_IAP_HANDLEPKT MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 3)
83 82
84#define IS_SYSEVENT(ev) ((ev & SYS_EVENT) == SYS_EVENT) 83#define IS_SYSEVENT(ev) ((ev & SYS_EVENT) == SYS_EVENT)
85 84