Add USB trace logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@964 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
15485cd306
commit
299a3ead2a
@ -37,9 +37,17 @@
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NET),y)
|
ifeq ($(CONFIG_NET),y)
|
||||||
include net/Make.defs
|
include net/Make.defs
|
||||||
|
ROOTDEPPATH = --dep-path .
|
||||||
|
NETDEPPATH = --dep-path net
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ASRCS = $(NET_ASRCS)
|
ifeq ($(CONFIG_USBDEV),y)
|
||||||
|
include usbdev/Make.defs
|
||||||
|
ROOTDEPPATH = --dep-path .
|
||||||
|
NETDEPPATH = --dep-path usbdev
|
||||||
|
endif
|
||||||
|
|
||||||
|
ASRCS = $(NET_ASRCS) $(USBDEV_ASRCS)
|
||||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||||
|
|
||||||
CSRCS =
|
CSRCS =
|
||||||
@ -50,7 +58,7 @@ ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
|
|||||||
CSRCS += ramdisk.c
|
CSRCS += ramdisk.c
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
CSRCS += $(NET_CSRCS)
|
CSRCS += $(NET_CSRCS) $(USBDEV_CSRCS)
|
||||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||||
|
|
||||||
SRCS = $(ASRCS) $(CSRCS)
|
SRCS = $(ASRCS) $(CSRCS)
|
||||||
@ -58,7 +66,7 @@ OBJS = $(AOBJS) $(COBJS)
|
|||||||
|
|
||||||
BIN = libdrivers$(LIBEXT)
|
BIN = libdrivers$(LIBEXT)
|
||||||
|
|
||||||
VPATH = net
|
VPATH = net:usbdev
|
||||||
|
|
||||||
all: $(BIN)
|
all: $(BIN)
|
||||||
|
|
||||||
@ -74,11 +82,7 @@ $(BIN): $(OBJS)
|
|||||||
done ; )
|
done ; )
|
||||||
|
|
||||||
.depend: Makefile $(SRCS)
|
.depend: Makefile $(SRCS)
|
||||||
ifeq ($(CONFIG_NET),y)
|
@$(MKDEP) $(ROOTDEPPATH) $(NETDEPPATH) $(USBDEVDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||||
@$(MKDEP) --dep-path . --dep-path net $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
|
||||||
else
|
|
||||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
|
||||||
endif
|
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
depend: .depend
|
depend: .depend
|
||||||
|
@ -151,10 +151,14 @@ extern "C" {
|
|||||||
* Description:
|
* Description:
|
||||||
* Enable/disable tracing
|
* Enable/disable tracing
|
||||||
*
|
*
|
||||||
|
* Assumptions:
|
||||||
|
* - Initial state is enabled
|
||||||
|
* - May be called from an interrupt handler
|
||||||
|
*
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_USBDEV_TRACE
|
#ifdef CONFIG_USBDEV_TRACE
|
||||||
EXTERN void usbtrace_enable(boolen enable);
|
EXTERN void usbtrace_enable(boolean enable);
|
||||||
#else
|
#else
|
||||||
# define usbtrace_enable(enable)
|
# define usbtrace_enable(enable)
|
||||||
#endif
|
#endif
|
||||||
@ -165,6 +169,9 @@ EXTERN void usbtrace_enable(boolen enable);
|
|||||||
* Description:
|
* Description:
|
||||||
* Record a USB event (tracing must be enabled)
|
* Record a USB event (tracing must be enabled)
|
||||||
*
|
*
|
||||||
|
* Assumptions:
|
||||||
|
* May be called from an interrupt handler
|
||||||
|
*
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_USBDEV_TRACE
|
#ifdef CONFIG_USBDEV_TRACE
|
||||||
@ -177,12 +184,15 @@ EXTERN void usbtrace(uint16 event, uint16 value);
|
|||||||
* Name: usbtrace_enumerate
|
* Name: usbtrace_enumerate
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Enumerate all buffer trace data (tracing must be disabled)
|
* Enumerate all buffer trace data (will temporarily disable tracing)
|
||||||
|
*
|
||||||
|
* Assumptions:
|
||||||
|
* NEVER called from an interrupt handler
|
||||||
*
|
*
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_USBDEV_TRACE
|
#ifdef CONFIG_USBDEV_TRACE
|
||||||
EXTERN int usbtrace_enumerate(tracecallback_t *callback, void *arg);
|
EXTERN int usbtrace_enumerate(trace_callback_t callback, void *arg);
|
||||||
#else
|
#else
|
||||||
# define usbtrace_enumerate(event)
|
# define usbtrace_enumerate(event)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user