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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
526e3989
Commit
526e3989
authored
16 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Fixed inability to enumerate any devices while in host mode (broken in a previous commit).
parent
2bd88ebc
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
LUFA/Drivers/USB/HighLevel/USBTask.c
+3
-4
3 additions, 4 deletions
LUFA/Drivers/USB/HighLevel/USBTask.c
LUFA/Drivers/USB/LowLevel/DevChapter9.c
+1
-1
1 addition, 1 deletion
LUFA/Drivers/USB/LowLevel/DevChapter9.c
LUFA/Drivers/USB/LowLevel/Host.h
+2
-2
2 additions, 2 deletions
LUFA/Drivers/USB/LowLevel/Host.h
with
6 additions
and
7 deletions
LUFA/Drivers/USB/HighLevel/USBTask.c
+
3
−
4
View file @
526e3989
...
...
@@ -83,12 +83,11 @@ static void USB_HostTask(void)
{
uint8_t
ErrorCode
=
HOST_ENUMERROR_NoError
;
uint8_t
SubErrorCode
=
HOST_ENUMERROR_NoError
;
uint8_t
PrevPipe
=
Pipe_GetCurrentPipe
();
static
uint16_t
WaitMSRemaining
;
static
uint8_t
PostWaitState
;
uint8_t
PrevPipe
=
Pipe_GetCurrentPipe
();
Pipe_SelectPipe
(
PIPE_CONTROLPIPE
);
switch
(
USB_HostState
)
...
...
@@ -176,10 +175,10 @@ static void USB_HostTask(void)
.
bRequest
=
REQ_GetDescriptor
,
.
wValue
=
(
DTYPE_Device
<<
8
),
.
wIndex
=
0
,
.
wLength
=
PIPE_CONTROLPIPE_DEFAULT_SIZE
,
.
wLength
=
8
,
};
uint8_t
DataBuffer
[
PIPE_CONTROLPIPE_DEFAULT_SIZE
];
uint8_t
DataBuffer
[
8
];
if
((
SubErrorCode
=
USB_Host_SendControlRequest
(
DataBuffer
))
!=
HOST_SENDCONTROL_Successful
)
{
...
...
This diff is collapsed.
Click to expand it.
LUFA/Drivers/USB/LowLevel/DevChapter9.c
+
1
−
1
View file @
526e3989
...
...
@@ -165,7 +165,7 @@ static void USB_Device_SetConfiguration(void)
void
USB_Device_GetConfiguration
(
void
)
{
Endpoint_ClearSETUP
();
Endpoint_ClearSETUP
();
Endpoint_Write_Byte
(
USB_ConfigurationNumber
);
...
...
This diff is collapsed.
Click to expand it.
LUFA/Drivers/USB/LowLevel/Host.h
+
2
−
2
View file @
526e3989
...
...
@@ -60,7 +60,7 @@
* and that the address used is not important (other than the fact that it is non-zero), a
* fixed value is specified by the library.
*/
#define USB_HOST_DEVICEADDRESS 1
#define USB_HOST_DEVICEADDRESS
1
#if !defined(USB_HOST_TIMEOUT_MS) || defined(__DOXYGEN__)
/** Constant for the maximum software timeout period of sent USB control transactions to an attached
...
...
@@ -244,7 +244,7 @@
#define USB_Host_HostMode_On() MACROS{ USBCON |= (1 << HOST); }MACROE
#define USB_Host_HostMode_Off() MACROS{ USBCON &= ~(1 << HOST); }MACROE
#define USB_Host_VBUS_Auto_Enable() MACROS{ OTGCON &= ~(1 << VBUSHWC); UHWCON |= (1 << UVCONE);
}MACROE
#define USB_Host_VBUS_Auto_Enable() MACROS{ OTGCON &= ~(1 << VBUSHWC); UHWCON |= (1 << UVCONE); }MACROE
#define USB_Host_VBUS_Manual_Enable() MACROS{ OTGCON |= (1 << VBUSHWC); UHWCON &= ~(1 << UVCONE); DDRE |= (1 << 7); }MACROE
#define USB_Host_VBUS_Auto_On() MACROS{ OTGCON |= (1 << VBUSREQ); }MACROE
...
...
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