summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/drivers/Makefile20
-rw-r--r--nuttx/include/nuttx/usbdev_trace.h16
2 files changed, 25 insertions, 11 deletions
diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile
index 7a3463b2f..c6ba7f7ad 100644
--- a/nuttx/drivers/Makefile
+++ b/nuttx/drivers/Makefile
@@ -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
diff --git a/nuttx/include/nuttx/usbdev_trace.h b/nuttx/include/nuttx/usbdev_trace.h
index 1a2ecdbc1..82726f0d5 100644
--- a/nuttx/include/nuttx/usbdev_trace.h
+++ b/nuttx/include/nuttx/usbdev_trace.h
@@ -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