Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
d9752503
Commit
d9752503
authored
Sep 12, 2010
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Add the "REQ_" prefix to the DFU class bootloader class-specific request constants.
parent
6b59c9b8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Bootloaders/DFU/BootloaderDFU.c
+6
-6
6 additions, 6 deletions
Bootloaders/DFU/BootloaderDFU.c
Bootloaders/DFU/BootloaderDFU.h
+7
-7
7 additions, 7 deletions
Bootloaders/DFU/BootloaderDFU.h
with
13 additions
and
13 deletions
Bootloaders/DFU/BootloaderDFU.c
+
6
−
6
View file @
d9752503
...
@@ -156,7 +156,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
...
@@ -156,7 +156,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
switch
(
USB_ControlRequest
.
bRequest
)
switch
(
USB_ControlRequest
.
bRequest
)
{
{
case
DFU_DNLOAD
:
case
REQ_
DFU_DNLOAD
:
Endpoint_ClearSETUP
();
Endpoint_ClearSETUP
();
/* Check if bootloader is waiting to terminate */
/* Check if bootloader is waiting to terminate */
...
@@ -309,7 +309,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
...
@@ -309,7 +309,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
Endpoint_ClearStatusStage
();
Endpoint_ClearStatusStage
();
break
;
break
;
case
DFU_UPLOAD
:
case
REQ_
DFU_UPLOAD
:
Endpoint_ClearSETUP
();
Endpoint_ClearSETUP
();
while
(
!
(
Endpoint_IsINReady
()))
while
(
!
(
Endpoint_IsINReady
()))
...
@@ -408,7 +408,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
...
@@ -408,7 +408,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
Endpoint_ClearStatusStage
();
Endpoint_ClearStatusStage
();
break
;
break
;
case
DFU_GETSTATUS
:
case
REQ_
DFU_GETSTATUS
:
Endpoint_ClearSETUP
();
Endpoint_ClearSETUP
();
/* Write 8-bit status value */
/* Write 8-bit status value */
...
@@ -428,7 +428,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
...
@@ -428,7 +428,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
Endpoint_ClearStatusStage
();
Endpoint_ClearStatusStage
();
break
;
break
;
case
DFU_CLRSTATUS
:
case
REQ_
DFU_CLRSTATUS
:
Endpoint_ClearSETUP
();
Endpoint_ClearSETUP
();
/* Reset the status value variable to the default OK status */
/* Reset the status value variable to the default OK status */
...
@@ -436,7 +436,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
...
@@ -436,7 +436,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
Endpoint_ClearStatusStage
();
Endpoint_ClearStatusStage
();
break
;
break
;
case
DFU_GETSTATE
:
case
REQ_
DFU_GETSTATE
:
Endpoint_ClearSETUP
();
Endpoint_ClearSETUP
();
/* Write the current device state to the endpoint */
/* Write the current device state to the endpoint */
...
@@ -446,7 +446,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
...
@@ -446,7 +446,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
Endpoint_ClearStatusStage
();
Endpoint_ClearStatusStage
();
break
;
break
;
case
DFU_ABORT
:
case
REQ_
DFU_ABORT
:
Endpoint_ClearSETUP
();
Endpoint_ClearSETUP
();
/* Reset the current state variable to the default idle state */
/* Reset the current state variable to the default idle state */
...
...
This diff is collapsed.
Click to expand it.
Bootloaders/DFU/BootloaderDFU.h
+
7
−
7
View file @
d9752503
...
@@ -102,25 +102,25 @@
...
@@ -102,25 +102,25 @@
#define DFU_FILLER_BYTES_SIZE 26
#define DFU_FILLER_BYTES_SIZE 26
/** DFU class command request to detach from the host. */
/** DFU class command request to detach from the host. */
#define DFU_DETATCH
0x00
#define
REQ_
DFU_DETATCH 0x00
/** DFU class command request to send data from the host to the bootloader. */
/** DFU class command request to send data from the host to the bootloader. */
#define DFU_DNLOAD
0x01
#define
REQ_
DFU_DNLOAD 0x01
/** DFU class command request to send data from the bootloader to the host. */
/** DFU class command request to send data from the bootloader to the host. */
#define DFU_UPLOAD
0x02
#define
REQ_
DFU_UPLOAD 0x02
/** DFU class command request to get the current DFU status and state from the bootloader. */
/** DFU class command request to get the current DFU status and state from the bootloader. */
#define DFU_GETSTATUS
0x03
#define
REQ_
DFU_GETSTATUS 0x03
/** DFU class command request to reset the current DFU status and state variables to their defaults. */
/** DFU class command request to reset the current DFU status and state variables to their defaults. */
#define DFU_CLRSTATUS
0x04
#define
REQ_
DFU_CLRSTATUS 0x04
/** DFU class command request to get the current DFU state of the bootloader. */
/** DFU class command request to get the current DFU state of the bootloader. */
#define DFU_GETSTATE
0x05
#define
REQ_
DFU_GETSTATE 0x05
/** DFU class command request to abort the current multi-request transfer and return to the dfuIDLE state. */
/** DFU class command request to abort the current multi-request transfer and return to the dfuIDLE state. */
#define DFU_ABORT
0x06
#define
REQ_
DFU_ABORT 0x06
/** DFU command to begin programming the device's memory. */
/** DFU command to begin programming the device's memory. */
#define COMMAND_PROG_START 0x01
#define COMMAND_PROG_START 0x01
...
...
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