Update everything under nuttx/arch to use the corrected syslog interfaces
This commit is contained in:
parent
0cd7683711
commit
7b310711a1
46 changed files with 582 additions and 381 deletions
|
@ -39,6 +39,18 @@
|
|||
|
||||
#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 <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
@ -57,6 +69,7 @@
|
|||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* USB trace dumping */
|
||||
|
||||
#ifndef CONFIG_USBDEV_TRACE
|
||||
|
@ -69,15 +82,6 @@
|
|||
# undef CONFIG_DEBUG_STACK
|
||||
#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
|
||||
|
||||
/* The following is just intended to keep some ugliness out of the mainline
|
||||
* code. We are going to print the task name if:
|
||||
*
|
||||
|
@ -172,9 +176,22 @@ static inline void up_registerdump(void)
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -56,15 +67,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -54,17 +65,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -51,15 +62,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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 <assert.h>
|
||||
#include <debug.h>
|
||||
|
@ -51,15 +62,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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>
|
||||
|
@ -57,6 +68,7 @@
|
|||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* USB trace dumping */
|
||||
|
||||
#ifndef CONFIG_USBDEV_TRACE
|
||||
|
@ -69,15 +81,6 @@
|
|||
# undef CONFIG_DEBUG_STACK
|
||||
#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
|
||||
|
||||
/* The following is just intended to keep some ugliness out of the mainline
|
||||
* code. We are going to print the task name if:
|
||||
*
|
||||
|
@ -179,9 +182,22 @@ static inline void up_registerdump(void)
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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>
|
||||
|
@ -69,15 +80,6 @@
|
|||
# undef CONFIG_DEBUG_STACK
|
||||
#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
|
||||
|
||||
/* The following is just intended to keep some ugliness out of the mainline
|
||||
* code. We are going to print the task name if:
|
||||
*
|
||||
|
@ -172,9 +174,22 @@ static inline void up_registerdump(void)
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -56,15 +67,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -54,17 +65,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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 <string.h>
|
||||
#include <syscall.h>
|
||||
|
@ -65,15 +76,6 @@
|
|||
# define svcdbg(x...)
|
||||
#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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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 <assert.h>
|
||||
#include <debug.h>
|
||||
|
@ -51,15 +62,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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>
|
||||
|
@ -69,15 +80,6 @@
|
|||
# undef CONFIG_DEBUG_STACK
|
||||
#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
|
||||
|
||||
/* The following is just intended to keep some ugliness out of the mainline
|
||||
* code. We are going to print the task name if:
|
||||
*
|
||||
|
@ -185,9 +187,22 @@ static inline void up_registerdump(void)
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
void up_decodeirq(uint32_t* regs)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
lowsyslog("Unexpected IRQ\n");
|
||||
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
||||
current_regs = regs;
|
||||
PANIC();
|
||||
#else
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
void up_decodeirq(uint32_t* regs)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
lowsyslog("Unexpected IRQ\n");
|
||||
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
||||
current_regs = regs;
|
||||
PANIC();
|
||||
#else
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include "lpc214x_vic.h"
|
||||
|
||||
/********************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
********************************************************************************/
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -111,7 +111,7 @@ static void lpc214x_decodeirq( uint32_t *regs)
|
|||
#endif
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
lowsyslog("Unexpected IRQ\n");
|
||||
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
||||
current_regs = regs;
|
||||
PANIC();
|
||||
#else
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#include "lpc23xx_vic.h"
|
||||
|
||||
/********************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
********************************************************************************/
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -78,7 +78,7 @@
|
|||
********************************************************************************/
|
||||
|
||||
/********************************************************************************
|
||||
* Public Funstions
|
||||
* Public Functions
|
||||
********************************************************************************/
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -110,7 +110,7 @@ static void lpc23xx_decodeirq(uint32_t *regs)
|
|||
#endif
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
lowsyslog("Unexpected IRQ\n");
|
||||
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
||||
current_regs = regs;
|
||||
PANIC();
|
||||
#else
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
void up_decodeirq(uint32_t *regs)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
lowsyslog("Unexpected IRQ\n");
|
||||
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
||||
current_regs = regs;
|
||||
PANIC();
|
||||
#else
|
||||
|
|
|
@ -921,11 +921,14 @@ static void stm32_i2c_tracedump(FAR struct stm32_i2c_priv_s *priv)
|
|||
struct stm32_trace_s *trace;
|
||||
int i;
|
||||
|
||||
syslog("Elapsed time: %d\n", clock_systimer() - priv->start_time);
|
||||
syslog(LOG_DEBUG, "Elapsed time: %d\n",
|
||||
clock_systimer() - priv->start_time);
|
||||
|
||||
for (i = 0; i <= priv->tndx; i++)
|
||||
{
|
||||
trace = &priv->trace[i];
|
||||
syslog("%2d. STATUS: %08x COUNT: %3d EVENT: %2d PARM: %08x TIME: %d\n",
|
||||
syslog(LOG_DEBUG,
|
||||
"%2d. STATUS: %08x COUNT: %3d EVENT: %2d PARM: %08x TIME: %d\n",
|
||||
i+1, trace->status, trace->count, trace->event, trace->parm,
|
||||
trace->time - priv->start_time);
|
||||
}
|
||||
|
|
|
@ -949,11 +949,14 @@ static void stm32_i2c_tracedump(FAR struct stm32_i2c_priv_s *priv)
|
|||
struct stm32_trace_s *trace;
|
||||
int i;
|
||||
|
||||
syslog("Elapsed time: %d\n", clock_systimer() - priv->start_time);
|
||||
syslog(LOG_DEBUG, "Elapsed time: %d\n",
|
||||
clock_systimer() - priv->start_time);
|
||||
|
||||
for (i = 0; i <= priv->tndx; i++)
|
||||
{
|
||||
trace = &priv->trace[i];
|
||||
syslog("%2d. STATUS: %08x COUNT: %4d EVENT: %4d PARM: %08x TIME: %d\n",
|
||||
syslog(LOG_DEBUG,
|
||||
"%2d. STATUS: %08x COUNT: %4d EVENT: %4d PARM: %08x TIME: %d\n",
|
||||
i+1, trace->status, trace->count, trace->event, trace->parm,
|
||||
trace->time - priv->start_time);
|
||||
}
|
||||
|
|
|
@ -1060,13 +1060,16 @@ static void stm32_i2c_tracedump(FAR struct stm32_i2c_priv_s *priv)
|
|||
struct stm32_trace_s *trace;
|
||||
int i;
|
||||
|
||||
syslog("Elapsed time: %d\n", clock_systimer() - priv->start_time);
|
||||
syslog(LOG_DEBUG, "Elapsed time: %d\n",
|
||||
clock_systimer() - priv->start_time);
|
||||
|
||||
for (i = 0; i <= priv->tndx; i++)
|
||||
{
|
||||
trace = &priv->trace[i];
|
||||
syslog("%2d. STATUS: %08x COUNT: %3d EVENT: %2d PARM: %08x TIME: %d\n",
|
||||
i+1, trace->status, trace->count, trace->event, trace->parm,
|
||||
trace->time - priv->start_time);
|
||||
syslog(LOG_DEBUG,
|
||||
"%2d. STATUS: %08x COUNT: %3d EVENT: %2d PARM: %08x TIME: %d\n",
|
||||
i+1, trace->status, trace->count, trace->event, trace->parm,
|
||||
trace->time - priv->start_time);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_I2C_TRACE */
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include "up_internal.h"
|
||||
|
||||
/********************************************************************************
|
||||
* Pre-procesor Definitions
|
||||
* Pre-processor Definitions
|
||||
********************************************************************************/
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -90,7 +90,7 @@ void up_decodeirq(uint32_t *regs)
|
|||
{
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
board_led_on(LED_INIRQ);
|
||||
lowsyslog("Unexpected IRQ\n");
|
||||
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
||||
current_regs = regs;
|
||||
PANIC();
|
||||
#else
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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>
|
||||
|
@ -63,15 +74,6 @@
|
|||
# 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
|
||||
|
||||
/* The following is just intended to keep some ugliness out of the mainline
|
||||
* code. We are going to print the task name if:
|
||||
*
|
||||
|
@ -161,9 +163,22 @@ static inline void up_registerdump(void)
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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>
|
||||
|
@ -63,15 +74,6 @@
|
|||
# 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
|
||||
|
||||
/* The following is just intended to keep some ugliness out of the mainline
|
||||
* code. We are going to print the task name if:
|
||||
*
|
||||
|
@ -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, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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>
|
||||
|
@ -58,13 +65,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if debug is not
|
||||
* selected.
|
||||
*/
|
||||
|
||||
#undef lldbg
|
||||
#define lldbg lowsyslog
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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>
|
||||
|
@ -57,21 +68,13 @@
|
|||
/****************************************************************************
|
||||
* 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
|
||||
****************************************************************************/
|
||||
|
@ -113,9 +116,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, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -53,18 +60,9 @@
|
|||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -52,18 +59,9 @@
|
|||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
|
|
@ -119,7 +119,7 @@ void up_initialize(void)
|
|||
*/
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
syslog("SIM: Initializing");
|
||||
syslog(LOG_INFO, "SIM: Initializing");
|
||||
#endif
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
|
|
|
@ -61,9 +61,6 @@
|
|||
#include <linux/if_tun.h>
|
||||
#include <linux/net.h>
|
||||
|
||||
extern int syslog(const char *format, ...);
|
||||
extern int netdriver_setmacaddr(unsigned char *macaddr);
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -84,6 +81,11 @@ extern int netdriver_setmacaddr(unsigned char *macaddr);
|
|||
# define TAP_IPADDR3 0
|
||||
#endif
|
||||
|
||||
/* Syslog priority (must match definitions in nuttx/include/syslog.h) */
|
||||
|
||||
#define LOG_INFO 1 /* Informational message */
|
||||
#define LOG_ERR 4 /* Error conditions */
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
@ -103,6 +105,13 @@ struct sel_arg_struct
|
|||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* NuttX Domain Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
int syslog(int priority, const char *format, ...);
|
||||
int netdriver_setmacaddr(unsigned char *macaddr);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
@ -119,8 +128,9 @@ static int gtapdevfd;
|
|||
#ifdef TAPDEV_DEBUG
|
||||
static inline void dump_ethhdr(const char *msg, unsigned char *buf, int buflen)
|
||||
{
|
||||
syslog("TAPDEV: %s %d bytes\n", msg, buflen);
|
||||
syslog(" %02x:%02x:%02x:%02x:%02x:%02x %02x:%02x:%02x:%02x:%02x:%02x %02x%02x\n",
|
||||
syslog(LOG_INFO, "TAPDEV: %s %d bytes\n", msg, buflen);
|
||||
syslog(LOG_INFO,
|
||||
" %02x:%02x:%02x:%02x:%02x:%02x %02x:%02x:%02x:%02x:%02x:%02x %02x%02x\n",
|
||||
buf[0], buf[1], buf[2], buf[3], buf[4], buf[5],
|
||||
buf[6], buf[7], buf[8], buf[9], buf[10], buf[11],
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
|
@ -179,7 +189,7 @@ void tapdev_init(void)
|
|||
gtapdevfd = open(DEVTAP, O_RDWR, 0644);
|
||||
if (gtapdevfd < 0)
|
||||
{
|
||||
syslog("TAPDEV: open failed: %d\n", -gtapdevfd );
|
||||
syslog(LOG_ERR, "TAPDEV: open failed: %d\n", -gtapdevfd );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -190,7 +200,7 @@ void tapdev_init(void)
|
|||
ret = ioctl(gtapdevfd, TUNSETIFF, (unsigned long) &ifr);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog("TAPDEV: ioctl failed: %d\n", -ret );
|
||||
syslog(LOG_ERR, "TAPDEV: ioctl failed: %d\n", -ret );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -235,7 +245,7 @@ unsigned int tapdev_read(unsigned char *buf, unsigned int buflen)
|
|||
ret = read(gtapdevfd, buf, buflen);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog("TAPDEV: read failed: %d\n", -ret);
|
||||
syslog(LOG_ERR, "TAPDEV: read failed: %d\n", -ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -247,12 +257,12 @@ void tapdev_send(unsigned char *buf, unsigned int buflen)
|
|||
{
|
||||
int ret;
|
||||
#ifdef TAPDEV_DEBUG
|
||||
syslog("tapdev_send: sending %d bytes\n", buflen);
|
||||
syslog(LOG_INFO, "tapdev_send: sending %d bytes\n", buflen);
|
||||
|
||||
gdrop++;
|
||||
if (gdrop % 8 == 7)
|
||||
{
|
||||
syslog("Dropped a packet!\n");
|
||||
syslog(LOG_ERR, "TAPDEV: Dropped a packet!\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -260,7 +270,7 @@ void tapdev_send(unsigned char *buf, unsigned int buflen)
|
|||
ret = write(gtapdevfd, buf, buflen);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog("TAPDEV: write failed: %d", -ret);
|
||||
syslog(LOG_ERR, "TAPDEV: write failed: %d", -ret);
|
||||
exit(1);
|
||||
}
|
||||
dump_ethhdr("write", buf, buflen);
|
||||
|
|
|
@ -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>
|
||||
|
@ -64,15 +75,6 @@
|
|||
# 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
|
||||
|
||||
/* The following is just intended to keep some ugliness out of the mainline
|
||||
* code. We are going to print the task name if:
|
||||
*
|
||||
|
@ -120,9 +122,22 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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 <debug.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
|
@ -48,11 +55,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info -- even if debug is not selected. */
|
||||
|
||||
#undef lldbg
|
||||
#define lldbg lowsyslog
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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>
|
||||
|
@ -57,21 +68,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
|
||||
****************************************************************************/
|
||||
|
@ -112,9 +115,22 @@ static void _up_assert(int errorcode) /* noreturn_function */
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
|
||||
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(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -47,18 +58,11 @@
|
|||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
* debug is not selected.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
# undef lldbg
|
||||
# define lldbg lowsyslog
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
|
@ -72,7 +76,6 @@
|
|||
* Name: up_registerdump
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void up_registerdump(void)
|
||||
{
|
||||
FAR uint32_t *regs32 = (FAR uint32_t*)current_regs;
|
||||
|
@ -86,4 +89,5 @@ static void up_registerdump(void)
|
|||
lldbg("FP :%08x SP :%08x FLG:%04x\n"
|
||||
regs32[REG_R14/2], regs32[REG_R15/2], current_regs[REG_FLAGS]);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ARCH_STACKDUMP */
|
||||
|
|
|
@ -39,24 +39,24 @@
|
|||
|
||||
#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 <debug.h>
|
||||
|
||||
#include "chip/chip.h"
|
||||
#include "sched/sched.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
* debug is not selected.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
# undef lldbg
|
||||
# define lldbg lowsyslog
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
|
@ -75,7 +75,6 @@
|
|||
* Name: up_stackdump
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void up_stackdump(void)
|
||||
{
|
||||
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
||||
|
@ -105,4 +104,5 @@ static void up_stackdump(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ARCH_STACKDUMP */
|
||||
|
|
|
@ -48,15 +48,9 @@
|
|||
#include "up_internal.h"
|
||||
|
||||
/***************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_LOWPUTC
|
||||
# define SYSDBG lowsyslog
|
||||
#else
|
||||
# define SYSDBG syslog
|
||||
#endif
|
||||
|
||||
/***************************************************************************
|
||||
* Private Types
|
||||
***************************************************************************/
|
||||
|
@ -94,42 +88,42 @@ void z16f_sysexec(FAR chipreg_t *regs)
|
|||
excp = getreg16(Z16F_SYSEXCP);
|
||||
if ((excp & Z16F_SYSEXCP_SPOVF) != 0)
|
||||
{
|
||||
SYSDBG("SP OVERFLOW\n");
|
||||
lowsyslog(LOG_ERR, "SP OVERFLOW\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_PCOVF) != 0)
|
||||
{
|
||||
SYSDBG("PC OVERFLOW\n");
|
||||
lowsyslog(LOG_ERR, "PC OVERFLOW\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_DIV0) != 0)
|
||||
{
|
||||
SYSDBG("Divide by zero\n");
|
||||
lowsyslog(LOG_ERR, "Divide by zero\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_DIVOVF) != 0)
|
||||
{
|
||||
SYSDBG("Divide overflow\n");
|
||||
lowsyslog(LOG_ERR, "Divide overflow\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_ILL) != 0)
|
||||
{
|
||||
SYSDBG("Illegal instruction\n");
|
||||
lowsyslog(LOG_ERR, "Illegal instruction\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_WDTOSC) != 0)
|
||||
{
|
||||
SYSDBG("WDT oscillator failure\n");
|
||||
lowsyslog(LOG_ERR, "WDT oscillator failure\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_PRIOSC) != 0)
|
||||
{
|
||||
SYSDBG("Primary Oscillator Failure\n");
|
||||
lowsyslog(LOG_ERR, "Primary Oscillator Failure\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_WDT) != 0)
|
||||
{
|
||||
SYSDBG("Watchdog timeout\n");
|
||||
lowsyslog(LOG_ERR, "Watchdog timeout\n");
|
||||
z16f_reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -77,7 +77,7 @@ FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs)
|
|||
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
|
||||
lowsyslog("Unexpected IRQ\n");
|
||||
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
||||
IRQ_ENTER(regs);
|
||||
PANIC();
|
||||
return NULL; /* Won't get here */
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -46,18 +53,11 @@
|
|||
#include "sched/sched.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
* debug is not selected.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
# undef lldbg
|
||||
# define lldbg lowsyslog
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
|
@ -76,7 +76,6 @@
|
|||
* Name: up_stackdump
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void up_stackdump(void)
|
||||
{
|
||||
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
||||
|
@ -106,4 +105,5 @@ static void up_stackdump(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ARCH_STACKDUMP */
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
|
@ -47,18 +54,11 @@
|
|||
#include "chip/switch.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
* debug is not selected.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
# undef lldbg
|
||||
# define lldbg lowsyslog
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
|
@ -72,7 +72,6 @@
|
|||
* Name: z80_registerdump
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void ez80_registerdump(void)
|
||||
{
|
||||
if (current_regs)
|
||||
|
@ -98,4 +97,5 @@ static void ez80_registerdump(void)
|
|||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ARCH_STACKDUMP */
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
|
@ -47,19 +54,12 @@
|
|||
#include "chip/switch.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* 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
|
||||
****************************************************************************/
|
||||
|
@ -72,7 +72,6 @@
|
|||
* Name: z180_registerdump
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void z180_registerdump(void)
|
||||
{
|
||||
if (current_regs)
|
||||
|
@ -89,4 +88,5 @@ static void z180_registerdump(void)
|
|||
inp(Z180_MMU_CBAR), inp(Z180_MMU_BBR), inp(Z180_MMU_CBR));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ARCH_STACKDUMP */
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
|
@ -48,18 +55,11 @@
|
|||
#include "chip/switch.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
* debug is not selected.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
# undef lldbg
|
||||
# define lldbg lowsyslog
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
|
@ -69,7 +69,6 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static inline void z8_dumpregs(FAR chipret_t *regs)
|
||||
{
|
||||
lldbg("REGS: %04x %04x %04x %04x %04x %04x %04x %04x\n",
|
||||
|
@ -84,8 +83,6 @@ static inline void z8_dumpstate(chipreg_t sp, chipreg_t pc, uint8_t irqctl,
|
|||
sp, pc, irqctl & 0xff, rpflags >> 8, rpflags & 0xff);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
@ -94,7 +91,6 @@ static inline void z8_dumpstate(chipreg_t sp, chipreg_t pc, uint8_t irqctl,
|
|||
* Name: z8_registerdump
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
void z8_registerdump(void)
|
||||
{
|
||||
FAR chipret_t *regs;
|
||||
|
@ -137,4 +133,5 @@ void z8_registerdump(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ARCH_STACKDUMP */
|
||||
|
|
|
@ -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 <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
|
@ -47,18 +54,11 @@
|
|||
#include "chip/switch.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
* debug is not selected.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
# undef lldbg
|
||||
# define lldbg lowsyslog
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
|
@ -72,7 +72,6 @@
|
|||
* Name: z80_registerdump
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void z80_registerdump(void)
|
||||
{
|
||||
if (current_regs)
|
||||
|
@ -87,4 +86,5 @@ static void z80_registerdump(void)
|
|||
current_regs[XCPT_SP], current_regs[XCPT_PC]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ARCH_STACKDUMP */
|
||||
|
|
|
@ -98,6 +98,11 @@
|
|||
#define LOG_INFO 1 /* Informational message */
|
||||
#define LOG_DEBUG 0 /* Debug-level message */
|
||||
|
||||
/* Used with setlogmask() */
|
||||
|
||||
#define LOG_MASK(p) (1 << (p))
|
||||
#define LOG_UPTO(p) ((1 << (p)) - 1)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Declarations
|
||||
****************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue