diff options
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/debug.h | 100 | ||||
-rw-r--r-- | nuttx/include/nuttx/arch.h | 4 | ||||
-rw-r--r-- | nuttx/include/nuttx/can.h | 2 | ||||
-rwxr-xr-x | nuttx/include/nuttx/cs89x0.h | 2 | ||||
-rw-r--r-- | nuttx/include/nuttx/serial.h | 2 | ||||
-rw-r--r-- | nuttx/include/nxflat.h | 2 |
6 files changed, 98 insertions, 14 deletions
diff --git a/nuttx/include/debug.h b/nuttx/include/debug.h index 7253d93e4..485bf8a20 100644 --- a/nuttx/include/debug.h +++ b/nuttx/include/debug.h @@ -71,21 +71,21 @@ # ifdef CONFIG_ARCH_LOWPUTC # define lldbg(format, arg...) \ - lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg) + lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg) # else # define lldbg(x...) # endif # ifdef CONFIG_DEBUG_VERBOSE # define vdbg(format, arg...) \ - lib_rawprintf(EXTRA_FMT format EXTRA_ARG, ##arg) + lib_rawprintf(EXTRA_FMT format EXTRA_ARG, ##arg) -# ifdef CONFIG_ARCH_LOWPUTC -# define llvdbg(format, arg...) \ - lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg) -# else -# define llvdbg(x...) -# endif +# ifdef CONFIG_ARCH_LOWPUTC +# define llvdbg(format, arg...) \ + lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg) +# else +# define llvdbg(x...) +# endif # else # define vdbg(x...) @@ -322,6 +322,86 @@ #endif /* CONFIG_CPP_HAVE_VARARGS */ +/* Buffer dumping macros do not depend on varargs */ + +#ifdef CONFIG_DEBUG +# define dbgdumpbuffer(m,b,n) lib_dumpbuffer(m,b,n) +# ifdef CONFIG_DEBUG_VERBOSE +# define vdbgdumpbuffer(m,b,n) lib_dumpbuffer(m,b,n) +# else +# define vdbgdumpbuffer(m,b,n) +# endif +#else +# define dbgdumpbuffer(m,b,n) +# define vdbgdumpbuffer(m,b,n) +# endif + +/* Subsystem specific debug */ + +#ifdef CONFIG_DEBUG_MM +# define mdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define mvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define mdbgdumpbuffer(m,b,n) +# define mvdbgdumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_SCHED +# define sdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define svdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define sdbgdumpbuffer(m,b,n) +# define svdbgdumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_NET +# define ndbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define nvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define ndbgdumpbuffer(m,b,n) +# define nvdbgdumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_USB +# define udbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define uvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define udbgdumpbuffer(m,b,n) +# define uvdbgdumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_FS +# define fdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define fvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define fdbgdumpbuffer(m,b,n) +# define fvdbgdumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_GRAPHICS +# define gdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define gvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define gdbgdumpbuffer(m,b,n) +# define gvdbgdumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_BINFMT +# define bdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define bvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define bdbgdumpbuffer(m,b,n) +# define bvdbgdumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_LIB +# define ldbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define lvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define ldbgdumpbuffer(m,b,n) +# define lvdbgdumpbuffer(m,b,n) +#endif + /**************************************************************************** * Public Type Declarations ****************************************************************************/ @@ -354,6 +434,10 @@ EXTERN int lib_rawprintf(const char *format, ...); EXTERN int lib_lowprintf(const char *format, ...); #endif +/* Dump a buffer of data */ + +EXTERN int lib_dumpbuffer(FAR const char *msg, FAR const ubyte *buffer, unsigned int buflen); + /* If the cross-compiler's pre-processor does not support variable * length arguments, then these additional APIs will be built. */ diff --git a/nuttx/include/nuttx/arch.h b/nuttx/include/nuttx/arch.h index f3cb5c184..a1182b198 100644 --- a/nuttx/include/nuttx/arch.h +++ b/nuttx/include/nuttx/arch.h @@ -229,7 +229,7 @@ EXTERN void up_unblock_task(FAR _TCB *tcb); * * Inputs: * tcb: Refers to a task in the ready-to-run list (normally - * the task at the the head of the list). It most be + * the task at the head of the list). It most be * stopped, its context saved and moved into one of the * waiting task lists. It it was the task at the head * of the ready-to-run list, then a context to the new @@ -293,7 +293,7 @@ EXTERN void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority); * This function causes the currently executing task to cease * to exist. This is a special case of task_delete() where the task to * be deleted is the currently executing task. It is more complex because - * a context switch must be perform to the the next ready to run task. + * a context switch must be perform to the next ready to run task. * * Unlike other UP APIs, this function may be called directly from user * programs in various states. The implementation of this function should diff --git a/nuttx/include/nuttx/can.h b/nuttx/include/nuttx/can.h index 7a9562b05..370297615 100644 --- a/nuttx/include/nuttx/can.h +++ b/nuttx/include/nuttx/can.h @@ -195,7 +195,7 @@ struct can_ops_s CODE int (*co_send)(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg); /* Return TRUE if all message have been sent. If for example, the CAN - * hardware implements FIFOs, then this would mean the the transmit FIFO is + * hardware implements FIFOs, then this would mean the transmit FIFO is * empty. This method is called when the driver needs to make sure that * all characters are "drained" from the TX hardware before calling co_shutdown(). */ diff --git a/nuttx/include/nuttx/cs89x0.h b/nuttx/include/nuttx/cs89x0.h index 6e2f5bc34..fc990d850 100755 --- a/nuttx/include/nuttx/cs89x0.h +++ b/nuttx/include/nuttx/cs89x0.h @@ -140,7 +140,7 @@ extern "C" { * Initialize the Ethernet driver
*
* Parameters:
- * impl - decribes the the implementation of the cs89x00 implementation.
+ * impl - decribes the implementation of the cs89x00 implementation.
* This reference is retained so so must remain stable throughout the
* life of the driver instance.
* devno - Identifies the device number. This must be a number between
diff --git a/nuttx/include/nuttx/serial.h b/nuttx/include/nuttx/serial.h index ed5c6a1c0..fad9ecd89 100644 --- a/nuttx/include/nuttx/serial.h +++ b/nuttx/include/nuttx/serial.h @@ -167,7 +167,7 @@ struct uart_ops_s CODE boolean (*txready)(FAR struct uart_dev_s *dev); /* Return TRUE if all characters have been sent. If for example, the UART - * hardware implements FIFOs, then this would mean the the transmit FIFO is + * hardware implements FIFOs, then this would mean the transmit FIFO is * empty. This method is called when the driver needs to make sure that * all characters are "drained" from the TX hardware. */ diff --git a/nuttx/include/nxflat.h b/nuttx/include/nxflat.h index 8e551b252..14f071806 100644 --- a/nuttx/include/nxflat.h +++ b/nuttx/include/nxflat.h @@ -73,7 +73,7 @@ struct nxflat_hdr_s /* The following fields provide the memory map for the nxflat binary. * - * h_entry - Offset to the the first executable insruction from + * h_entry - Offset to the first executable insruction from * the beginning of the file. * h_datastart - Offset to the beginning of the data segment from * the beginning of the file. This field can also |