summaryrefslogtreecommitdiff
path: root/nuttx/arch/z80/src/common/up_assert.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-08 12:48:47 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-08 12:48:47 -0600
commitce145c005c24d2e785601208dfd2322e47454a5b (patch)
tree4cfe2e74efa83e9cacbb8a99ea7a48c11beb2a4d /nuttx/arch/z80/src/common/up_assert.c
parent26710412ad35431bf2c992c2add76314962f401a (diff)
downloadnuttx-ce145c005c24d2e785601208dfd2322e47454a5b.tar.gz
nuttx-ce145c005c24d2e785601208dfd2322e47454a5b.tar.bz2
nuttx-ce145c005c24d2e785601208dfd2322e47454a5b.zip
Update everything under nuttx/arch to use the corrected syslog interfaces
Diffstat (limited to 'nuttx/arch/z80/src/common/up_assert.c')
-rw-r--r--nuttx/arch/z80/src/common/up_assert.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/nuttx/arch/z80/src/common/up_assert.c b/nuttx/arch/z80/src/common/up_assert.c
index 473423262..628557a28 100644
--- a/nuttx/arch/z80/src/common/up_assert.c
+++ b/nuttx/arch/z80/src/common/up_assert.c
@@ -39,6 +39,17 @@
#include <nuttx/config.h>
+/* Output debug info if stack dump is selected -- even if debug is not
+ * selected.
+ */
+
+#ifdef CONFIG_ARCH_STACKDUMP
+# undef CONFIG_DEBUG
+# undef CONFIG_DEBUG_VERBOSE
+# define CONFIG_DEBUG 1
+# define CONFIG_DEBUG_VERBOSE 1
+#endif
+
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
@@ -56,21 +67,13 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+
/* USB trace dumping */
#ifndef CONFIG_USBDEV_TRACE
# undef CONFIG_ARCH_USBDUMP
#endif
-/* Output debug info if stack dump is selected -- even if
- * debug is not selected.
- */
-
-#ifdef CONFIG_ARCH_STACKDUMP
-# undef lldbg
-# define lldbg lowsyslog
-#endif
-
/****************************************************************************
* Private Data
****************************************************************************/
@@ -111,9 +114,22 @@ static void _up_assert(int errorcode) /* noreturn_function */
****************************************************************************/
#ifdef CONFIG_ARCH_USBDUMP
+static int usbtrace_syslog(FAR const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ /* Let vsyslog do the real work */
+
+ va_start(ap, fmt);
+ ret = lowvsyslog(LOG_INFO, fmt, ap);
+ va_end(ap);
+ return ret;
+}
+
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
{
- usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
+ usbtrace_trprintf(FAR usbtrace_syslog, trace->event, FAR trace->value);
return 0;
}
#endif