From 776d015cc492cb9c682bb1d223011b7a808011e8 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sun, 2 Mar 2008 20:45:33 +0000 Subject: 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 --- firmware/logf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'firmware/logf.c') diff --git a/firmware/logf.c b/firmware/logf.c index 2056db5cc4..da05a0a0c7 100644 --- a/firmware/logf.c +++ b/firmware/logf.c @@ -32,6 +32,11 @@ #include "logf.h" #include "serial.h" +#ifdef HAVE_USBSTACK +#include "usb_core.h" +#include "usbstack/usb_serial.h" +#endif + /* Only provide all this if asked to */ #ifdef ROCKBOX_HAS_LOGF @@ -107,6 +112,11 @@ void _logf(const char *format, ...) serial_tx(ptr); serial_tx("\r\n"); #endif +#ifdef USB_SERIAL + usb_serial_send(ptr,len); + usb_serial_send("\r\n",2); +#endif + va_end(ap); if(len < MAX_LOGF_ENTRY) /* pad with spaces up to the MAX_LOGF_ENTRY byte border */ -- cgit