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
1af49ff4
Commit
1af49ff4
authored
14 years ago
by
patacongo
Browse files
Options
Downloads
Patches
Plain Diff
Init TDSTATUS
git-svn-id:
svn://svn.code.sf.net/p/nuttx/code/trunk@3211
42af7a65-404d-4744-a932-0658087f49c3
parent
452832f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/arm/src/lpc17xx/lpc17_usbhost.c
+15
-1
15 additions, 1 deletion
arch/arm/src/lpc17xx/lpc17_usbhost.c
with
15 additions
and
1 deletion
arch/arm/src/lpc17xx/lpc17_usbhost.c
+
15
−
1
View file @
1af49ff4
...
...
@@ -653,6 +653,7 @@ static int lpc17_ctrltd(struct lpc17_usbhost_s *priv, uint32_t dirpid,
/* Then enqueue the transfer */
priv
->
tdstatus
=
0
;
lpc17_enqueuetd
(
EDCTRL
,
dirpid
,
toggle
,
buffer
,
buflen
);
lpc17_putreg
(
LPC17_EDCTRL_ADDR
,
LPC17_USBHOST_CTRLHEADED
);
...
...
@@ -1386,12 +1387,22 @@ static int lpc17_transfer(FAR struct usbhost_driver_s *drvr,
if
((
uintptr_t
)
buffer
<
LPC17_SRAM_BANK0
||
(
uintptr_t
)
buffer
>=
(
LPC17_SRAM_BANK0
+
LPC17_SRAM_BANK0
+
LPC17_SRAM_BANK0
))
{
/* Will the transfer fit in an IO buffer? */
if
(
buflen
>
CONFIG_USBHOST_IOBUFSIZE
)
{
uvdbg
(
"buflen (%d) > IO buffer size (%d)
\n
"
,
buflen
,
CONFIG_USBHOST_IOBUFSIZE
);
goto
errout
;
}
/* Allocate an IO buffer in AHB SRAM */
origbuf
=
buffer
;
buffer
=
lpc17_ioalloc
(
priv
);
if
(
!
buffer
)
{
uvdbg
(
"IO buffer allocation failed
\n
"
);
goto
errout
;
}
...
...
@@ -1409,6 +1420,7 @@ static int lpc17_transfer(FAR struct usbhost_driver_s *drvr,
ed
=
lpc17_edalloc
(
priv
);
if
(
!
ed
)
{
uvdbg
(
"ED allocation failed
\n
"
);
goto
errout
;
}
...
...
@@ -1433,6 +1445,7 @@ static int lpc17_transfer(FAR struct usbhost_driver_s *drvr,
/* Then enqueue the transfer */
priv
->
tdstatus
=
0
;
lpc17_enqueuetd
(
ed
,
dirpid
,
GTD_STATUS_T_TOGGLE
,
buffer
,
buflen
);
lpc17_putreg
((
uint32_t
)
ed
,
LPC17_USBHOST_BULKHEADED
);
...
...
@@ -1457,6 +1470,7 @@ static int lpc17_transfer(FAR struct usbhost_driver_s *drvr,
}
else
{
uvdbg
(
"Bad TD completion status: %d
\n
"
,
priv
->
tdstatus
);
ret
=
-
EIO
;
}
...
...
@@ -1657,7 +1671,7 @@ FAR struct usbhost_driver_s *usbhost_initialize(int controller)
buffer
=
IOFREE
;
for
(
i
=
0
;
i
<
LPC17_IOBUFFERS
;
i
++
)
{
/* Put the
TD
buffer in a free list */
/* Put the
IO
buffer in a free list */
lpc17_iofree
(
priv
,
buffer
);
buffer
+=
CONFIG_USBHOST_IOBUFSIZE
;
...
...
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