Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
67a126a5
Commit
67a126a5
authored
11 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Misc USB device changes reated to SAMA5, trace support, and USB monitoring
parent
8587026c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
configs/sama5d3x-ek/src/sam_nsh.c
+14
-7
14 additions, 7 deletions
configs/sama5d3x-ek/src/sam_nsh.c
configs/sama5d3x-ek/src/sama5d3x-ek.h
+8
-0
8 additions, 0 deletions
configs/sama5d3x-ek/src/sama5d3x-ek.h
drivers/usbdev/Kconfig
+1
-1
1 addition, 1 deletion
drivers/usbdev/Kconfig
with
23 additions
and
8 deletions
configs/sama5d3x-ek/src/sam_nsh.c
+
14
−
7
View file @
67a126a5
...
...
@@ -46,12 +46,8 @@
#include
<errno.h>
#include
<debug.h>
#ifdef CONFIG_SAMA5_SPI0
# include <nuttx/spi/spi.h>
# include <nuttx/mtd.h>
# include <nuttx/fs/nxffs.h>
# include "sam_spi.h"
#ifdef CONFIG_SYSTEM_USBMONITOR
# include <apps/usbmonitor.h>
#endif
#include
"sama5d3x-ek.h"
...
...
@@ -118,7 +114,8 @@
int
nsh_archinitialize
(
void
)
{
#if defined(HAVE_AT25_MTD) || defined(HAVE_HSMCI_MTD) || defined(HAVE_USBHOST)
#if defined(HAVE_AT25_MTD) || defined(HAVE_HSMCI_MTD) || defined(HAVE_USBHOST) || \
defined(HAVE_USBMONITOR)
int
ret
;
#endif
...
...
@@ -168,5 +165,15 @@ int nsh_archinitialize(void)
}
#endif
#ifdef HAVE_USBMONITOR
/* Start the USB Monitor */
ret
=
usbmonitor_start
(
0
,
NULL
);
if
(
ret
!=
OK
)
{
message
(
"nsh_archinitialize: Start USB monitor: %d
\n
"
,
ret
);
}
#endif
return
OK
;
}
This diff is collapsed.
Click to expand it.
configs/sama5d3x-ek/src/sama5d3x-ek.h
+
8
−
0
View file @
67a126a5
...
...
@@ -59,6 +59,7 @@
#define HAVE_AT25_MTD 1
#define HAVE_USBHOST 1
#define HAVE_USBDEV 1
#define HAVE_USBMONITOR 1
/* HSMCI */
/* Can't support MMC/SD if the card interface(s) are not enable */
...
...
@@ -143,6 +144,13 @@
# undef HAVE_USBHOST
#endif
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(HAVE_USBDEV) || !defined(CONFIG_USBDEV_TRACE) || \
!defined(CONFIG_SYSTEM_USBMONITOR)
# undef HAVE_USBMONITOR
#endif
/* LEDs *****************************************************************************/
/* There are two LEDs on the SAMA5D3 series-CM board that can be controlled
* by software. A blue LED is controlled via PIO pins. A red LED normally
...
...
This diff is collapsed.
Click to expand it.
drivers/usbdev/Kconfig
+
1
−
1
View file @
67a126a5
...
...
@@ -88,7 +88,7 @@ config USBDEV_TRACE_NRECORDS
config USBDEV_TRACE_STRINGS
bool "Decode device controller events"
default n
depends on USBDEV_TRACE
depends on USBDEV_TRACE
|| DEBUG_USB
---help---
If USBDEV_TRACE_STRINGS is defined, then the USB device controller
driver must provide arrays of strings to support decoding of device-
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment