summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-03-02 20:45:33 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-03-02 20:45:33 +0000
commit776d015cc492cb9c682bb1d223011b7a808011e8 (patch)
tree61e3270b59b1442872779f0ea86ea237d6c92513 /apps/debug_menu.c
parentb3ab7884110b6e3849add5573d1f2a96c7603cd4 (diff)
downloadrockbox-776d015cc492cb9c682bb1d223011b7a808011e8.zip
rockbox-776d015cc492cb9c682bb1d223011b7a808011e8.tar.gz
rockbox-776d015cc492cb9c682bb1d223011b7a808011e8.tar.bz2
rockbox-776d015cc492cb9c682bb1d223011b7a808011e8.tar.xz
implement logf over usb-serial. Needs USB_SERIAL defined in usb_core.h to work, and needs to be enabled in the debug menu.
It stops sending data after a while for unknown reasons. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16486 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index bb9a00c..f448d30 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -2357,6 +2357,18 @@ static bool dbg_scrollwheel(void)
}
#endif
+#if defined(HAVE_USBSTACK) && defined(ROCKBOX_HAS_LOGF)
+extern bool usb_core_serial_enabled;
+
+static bool logf_usb_serial(void)
+{
+ usb_core_serial_enabled = !usb_core_serial_enabled;
+ gui_syncsplash(HZ, "USB logf %s",
+ usb_core_serial_enabled?"enabled":"disabled");
+ return false;
+}
+#endif
+
/****** The menu *********/
struct the_menu_item {
@@ -2436,6 +2448,9 @@ static const struct the_menu_item menuitems[] = {
{"logf", logfdisplay },
{"logfdump", logfdump },
#endif
+#if defined(HAVE_USBSTACK) && defined(ROCKBOX_HAS_LOGF)
+ {"logf over usb",logf_usb_serial },
+#endif
#ifdef CPU_BOOST_LOGGING
{"cpu_boost log",cpu_boost_log},
#endif