projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2bd88eb
)
Fixed inability to enumerate any devices while in host mode (broken in a previous...
author
Dean Camera
<dean@fourwalledcubicle.com>
Thu, 7 May 2009 05:30:19 +0000
(
05:30
+0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Thu, 7 May 2009 05:30:19 +0000
(
05:30
+0000)
LUFA/Drivers/USB/HighLevel/USBTask.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/DevChapter9.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/Host.h
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/Drivers/USB/HighLevel/USBTask.c
b/LUFA/Drivers/USB/HighLevel/USBTask.c
index
738dc15
..
5202cc8
100644
(file)
--- a/
LUFA/Drivers/USB/HighLevel/USBTask.c
+++ b/
LUFA/Drivers/USB/HighLevel/USBTask.c
@@
-83,12
+83,11
@@
static void USB_HostTask(void)
{
\r
uint8_t ErrorCode = HOST_ENUMERROR_NoError;
\r
uint8_t SubErrorCode = HOST_ENUMERROR_NoError;
\r
{
\r
uint8_t ErrorCode = HOST_ENUMERROR_NoError;
\r
uint8_t SubErrorCode = HOST_ENUMERROR_NoError;
\r
+ uint8_t PrevPipe = Pipe_GetCurrentPipe();
\r
\r
static uint16_t WaitMSRemaining;
\r
static uint8_t PostWaitState;
\r
\r
\r
static uint16_t WaitMSRemaining;
\r
static uint8_t PostWaitState;
\r
\r
- uint8_t PrevPipe = Pipe_GetCurrentPipe();
\r
-
\r
Pipe_SelectPipe(PIPE_CONTROLPIPE);
\r
\r
switch (USB_HostState)
\r
Pipe_SelectPipe(PIPE_CONTROLPIPE);
\r
\r
switch (USB_HostState)
\r
@@
-176,10
+175,10
@@
static void USB_HostTask(void)
.bRequest = REQ_GetDescriptor,
\r
.wValue = (DTYPE_Device << 8),
\r
.wIndex = 0,
\r
.bRequest = REQ_GetDescriptor,
\r
.wValue = (DTYPE_Device << 8),
\r
.wIndex = 0,
\r
- .wLength =
PIPE_CONTROLPIPE_DEFAULT_SIZE
,
\r
+ .wLength =
8
,
\r
};
\r
\r
};
\r
\r
- uint8_t DataBuffer[
PIPE_CONTROLPIPE_DEFAULT_SIZE
];
\r
+ uint8_t DataBuffer[
8
];
\r
\r
if ((SubErrorCode = USB_Host_SendControlRequest(DataBuffer)) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if ((SubErrorCode = USB_Host_SendControlRequest(DataBuffer)) != HOST_SENDCONTROL_Successful)
\r
{
\r
diff --git
a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
index
f02d32b
..
f02bb56
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/
LUFA/Drivers/USB/LowLevel/DevChapter9.c
@@
-165,7
+165,7
@@
static void USB_Device_SetConfiguration(void)
\r
void USB_Device_GetConfiguration(void)
\r
{
\r
\r
void USB_Device_GetConfiguration(void)
\r
{
\r
- Endpoint_ClearSETUP();
\r
+ Endpoint_ClearSETUP();
\r
\r
Endpoint_Write_Byte(USB_ConfigurationNumber);
\r
\r
\r
Endpoint_Write_Byte(USB_ConfigurationNumber);
\r
\r
diff --git
a/LUFA/Drivers/USB/LowLevel/Host.h
b/LUFA/Drivers/USB/LowLevel/Host.h
index
b1d60af
..
9ce995f
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Host.h
+++ b/
LUFA/Drivers/USB/LowLevel/Host.h
@@
-60,7
+60,7
@@
* and that the address used is not important (other than the fact that it is non-zero), a
\r
* fixed value is specified by the library.
\r
*/
\r
* and that the address used is not important (other than the fact that it is non-zero), a
\r
* fixed value is specified by the library.
\r
*/
\r
- #define USB_HOST_DEVICEADDRESS 1
\r
+ #define USB_HOST_DEVICEADDRESS
1
\r
\r
#if !defined(USB_HOST_TIMEOUT_MS) || defined(__DOXYGEN__)
\r
/** Constant for the maximum software timeout period of sent USB control transactions to an attached
\r
\r
#if !defined(USB_HOST_TIMEOUT_MS) || defined(__DOXYGEN__)
\r
/** Constant for the maximum software timeout period of sent USB control transactions to an attached
\r
@@
-244,7
+244,7
@@
#define USB_Host_HostMode_On() MACROS{ USBCON |= (1 << HOST); }MACROE
\r
#define USB_Host_HostMode_Off() MACROS{ USBCON &= ~(1 << HOST); }MACROE
\r
\r
#define USB_Host_HostMode_On() MACROS{ USBCON |= (1 << HOST); }MACROE
\r
#define USB_Host_HostMode_Off() MACROS{ USBCON &= ~(1 << HOST); }MACROE
\r
\r
- #define USB_Host_VBUS_Auto_Enable() MACROS{ OTGCON &= ~(1 << VBUSHWC); UHWCON |= (1 << UVCONE);
}MACROE
\r
+ #define USB_Host_VBUS_Auto_Enable() MACROS{ OTGCON &= ~(1 << VBUSHWC); UHWCON |= (1 << UVCONE); }MACROE
\r
#define USB_Host_VBUS_Manual_Enable() MACROS{ OTGCON |= (1 << VBUSHWC); UHWCON &= ~(1 << UVCONE); DDRE |= (1 << 7); }MACROE
\r
\r
#define USB_Host_VBUS_Auto_On() MACROS{ OTGCON |= (1 << VBUSREQ); }MACROE
\r
#define USB_Host_VBUS_Manual_Enable() MACROS{ OTGCON |= (1 << VBUSHWC); UHWCON &= ~(1 << UVCONE); DDRE |= (1 << 7); }MACROE
\r
\r
#define USB_Host_VBUS_Auto_On() MACROS{ OTGCON |= (1 << VBUSREQ); }MACROE
\r