mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user