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)
|
||||
include net/Make.defs
|
||||
ROOTDEPPATH = --dep-path .
|
||||
NETDEPPATH = --dep-path net
|
||||
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))
|
||||
|
||||
CSRCS =
|
||||
@ -50,7 +58,7 @@ ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
|
||||
CSRCS += ramdisk.c
|
||||
endif
|
||||
endif
|
||||
CSRCS += $(NET_CSRCS)
|
||||
CSRCS += $(NET_CSRCS) $(USBDEV_CSRCS)
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
SRCS = $(ASRCS) $(CSRCS)
|
||||
@ -58,7 +66,7 @@ OBJS = $(AOBJS) $(COBJS)
|
||||
|
||||
BIN = libdrivers$(LIBEXT)
|
||||
|
||||
VPATH = net
|
||||
VPATH = net:usbdev
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
@ -74,11 +82,7 @@ $(BIN): $(OBJS)
|
||||
done ; )
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
@$(MKDEP) --dep-path . --dep-path net $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
else
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
endif
|
||||
@$(MKDEP) $(ROOTDEPPATH) $(NETDEPPATH) $(USBDEVDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
@ -151,10 +151,14 @@ extern "C" {
|
||||
* Description:
|
||||
* Enable/disable tracing
|
||||
*
|
||||
* Assumptions:
|
||||
* - Initial state is enabled
|
||||
* - May be called from an interrupt handler
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV_TRACE
|
||||
EXTERN void usbtrace_enable(boolen enable);
|
||||
EXTERN void usbtrace_enable(boolean enable);
|
||||
#else
|
||||
# define usbtrace_enable(enable)
|
||||
#endif
|
||||
@ -165,6 +169,9 @@ EXTERN void usbtrace_enable(boolen enable);
|
||||
* Description:
|
||||
* Record a USB event (tracing must be enabled)
|
||||
*
|
||||
* Assumptions:
|
||||
* May be called from an interrupt handler
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV_TRACE
|
||||
@ -177,12 +184,15 @@ EXTERN void usbtrace(uint16 event, uint16 value);
|
||||
* Name: usbtrace_enumerate
|
||||
*
|
||||
* 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
|
||||
EXTERN int usbtrace_enumerate(tracecallback_t *callback, void *arg);
|
||||
EXTERN int usbtrace_enumerate(trace_callback_t callback, void *arg);
|
||||
#else
|
||||
# define usbtrace_enumerate(event)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user