summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr
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/avr
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/avr')
-rw-r--r--nuttx/arch/avr/src/avr/up_dumpstate.c17
-rw-r--r--nuttx/arch/avr/src/avr32/up_dumpstate.c14
-rw-r--r--nuttx/arch/avr/src/common/up_assert.c37
3 files changed, 42 insertions, 26 deletions
diff --git a/nuttx/arch/avr/src/avr/up_dumpstate.c b/nuttx/arch/avr/src/avr/up_dumpstate.c
index 8802dd80c..78a8c50bf 100644
--- a/nuttx/arch/avr/src/avr/up_dumpstate.c
+++ b/nuttx/arch/avr/src/avr/up_dumpstate.c
@@ -39,6 +39,13 @@
#include <nuttx/config.h>
+/* Output debug info -- even if debug is not selected. */
+
+#undef CONFIG_DEBUG
+#undef CONFIG_DEBUG_VERBOSE
+#define CONFIG_DEBUG 1
+#define CONFIG_DEBUG_VERBOSE 1
+
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
@@ -64,13 +71,6 @@
# undef CONFIG_DEBUG_STACK
#endif
-/* Output debug info if stack dump is selected -- even if debug is not
- * selected.
- */
-
-#undef lldbg
-#define lldbg lowsyslog
-
/****************************************************************************
* Private Data
****************************************************************************/
@@ -275,4 +275,5 @@ void up_dumpstate(void)
up_registerdump();
}
-#endif
+
+#endif /* CONFIG_ARCH_STACKDUMP */
diff --git a/nuttx/arch/avr/src/avr32/up_dumpstate.c b/nuttx/arch/avr/src/avr32/up_dumpstate.c
index 345eb3486..55c4a7cba 100644
--- a/nuttx/arch/avr/src/avr32/up_dumpstate.c
+++ b/nuttx/arch/avr/src/avr32/up_dumpstate.c
@@ -39,6 +39,13 @@
#include <nuttx/config.h>
+/* Output debug info -- even if debug is not selected. */
+
+#undef CONFIG_DEBUG
+#undef CONFIG_DEBUG_VERBOSE
+#define CONFIG_DEBUG 1
+#define CONFIG_DEBUG_VERBOSE 1
+
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
@@ -64,13 +71,6 @@
# undef CONFIG_DEBUG_STACK
#endif
-/* Output debug info if stack dump is selected -- even if debug is not
- * selected.
- */
-
-#undef lldbg
-#define lldbg lowsyslog
-
/****************************************************************************
* Private Data
****************************************************************************/
diff --git a/nuttx/arch/avr/src/common/up_assert.c b/nuttx/arch/avr/src/common/up_assert.c
index ee180f17f..411f7d68b 100644
--- a/nuttx/arch/avr/src/common/up_assert.c
+++ b/nuttx/arch/avr/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>
@@ -76,15 +87,6 @@
# define CONFIG_PRINT_TASKNAME 1
#endif
-/* If there is going to be stackdump output, then we should turn on output
- * here unconditionally as well.
- */
-
-#ifdef CONFIG_ARCH_STACKDUMP
-# undef lldbg
-# define lldbg lowsyslog
-#endif
-
/****************************************************************************
* Private Data
****************************************************************************/
@@ -126,9 +128,22 @@ static void _up_assert(int errorcode)
****************************************************************************/
#ifdef CONFIG_ARCH_USBDUMP
-static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
+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(FAR struct usbtrace_s *trace, FAR void *arg)
{
- usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
+ usbtrace_trprintf(usbtrace_syslog, trace->event, trace->value);
return 0;
}
#endif