Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fadecandy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scanlime
Fadecandy
Commits
a2300808
Commit
a2300808
authored
11 years ago
by
Micah Elizabeth Scott
Browse files
Options
Downloads
Patches
Plain Diff
Bugfixes for dfu_download invocation
parent
c06adec4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bootloader/usb_dev.c
+5
-4
5 additions, 4 deletions
bootloader/usb_dev.c
with
5 additions
and
4 deletions
bootloader/usb_dev.c
+
5
−
4
View file @
a2300808
...
@@ -207,7 +207,7 @@ static void usb_setup(void)
...
@@ -207,7 +207,7 @@ static void usb_setup(void)
endpoint0_stall
();
endpoint0_stall
();
return
;
return
;
case
0x01
4
1
:
// DFU_DNLOAD
case
0x01
2
1
:
// DFU_DNLOAD
if
(
setup
.
wIndex
>
0
)
{
if
(
setup
.
wIndex
>
0
)
{
endpoint0_stall
();
endpoint0_stall
();
return
;
return
;
...
@@ -311,10 +311,12 @@ static void usb_control(uint32_t stat)
...
@@ -311,10 +311,12 @@ static void usb_control(uint32_t stat)
case
0x01
:
// OUT transaction received from host
case
0x01
:
// OUT transaction received from host
case
0x02
:
case
0x02
:
if
(
setup
.
wRequestAndType
==
0x0121
&&
setup
.
wIndex
==
0
)
{
if
(
setup
.
wRequestAndType
==
0x0141
&&
setup
.
wIndex
==
0
)
{
// DFU_DNLOAD
// DFU_DNLOAD
dfu_download
(
setup
.
wValue
,
setup
.
wLength
,
buf
);
dfu_download
(
setup
.
wValue
,
setup
.
wLength
,
buf
);
// Acknowledge with a zero-length IN packet.
endpoint0_transmit
(
reply_buffer
,
0
);
}
}
// give the buffer back
// give the buffer back
...
@@ -408,7 +410,6 @@ restart:
...
@@ -408,7 +410,6 @@ restart:
}
}
if
((
status
&
USB_ISTAT_STALL
/* 80 */
))
{
if
((
status
&
USB_ISTAT_STALL
/* 80 */
))
{
//serial_print("stall:\n");
USB0_ENDPT0
=
USB_ENDPT_EPRXEN
|
USB_ENDPT_EPTXEN
|
USB_ENDPT_EPHSHK
;
USB0_ENDPT0
=
USB_ENDPT_EPRXEN
|
USB_ENDPT_EPTXEN
|
USB_ENDPT_EPHSHK
;
USB0_ISTAT
=
USB_ISTAT_STALL
;
USB0_ISTAT
=
USB_ISTAT_STALL
;
}
}
...
...
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