projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed GenericHIDHost demo report write routine incorrect for control type requests...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
LowLevel
/
DevChapter9.c
diff --git
a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
index
765627b
..
19d7298
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/
LUFA/Drivers/USB/LowLevel/DevChapter9.c
@@
-105,10
+105,10
@@
void USB_Device_ProcessControlPacket(void)
if (!(RequestHandled))
\r
RAISE_EVENT(USB_UnhandledControlPacket, bRequest, bmRequestType);
\r
\r
if (!(RequestHandled))
\r
RAISE_EVENT(USB_UnhandledControlPacket, bRequest, bmRequestType);
\r
\r
- if (Endpoint_IsS
etup
Received())
\r
+ if (Endpoint_IsS
ETUP
Received())
\r
{
\r
Endpoint_StallTransaction();
\r
{
\r
Endpoint_StallTransaction();
\r
- Endpoint_Clear
SetupReceived();
\r
+ Endpoint_Clear
ControlSETUP();
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-116,13
+116,13
@@
static void USB_Device_SetAddress(void)
{
\r
uint8_t wValue_LSB = Endpoint_Read_Byte();
\r
\r
{
\r
uint8_t wValue_LSB = Endpoint_Read_Byte();
\r
\r
- Endpoint_Clear
SetupReceived
();
\r
+ Endpoint_Clear
ControlSETUP
();
\r
\r
\r
- while (!(Endpoint_Is
Setup
INReady()));
\r
+ while (!(Endpoint_IsINReady()));
\r
\r
\r
- Endpoint_Clear
Setup
IN();
\r
+ Endpoint_Clear
Control
IN();
\r
\r
\r
- while (!(Endpoint_Is
Setup
INReady()));
\r
+ while (!(Endpoint_IsINReady()));
\r
\r
UDADDR = ((1 << ADDEN) | (wValue_LSB & 0x7F));
\r
\r
\r
UDADDR = ((1 << ADDEN) | (wValue_LSB & 0x7F));
\r
\r
@@
-152,11
+152,11
@@
static void USB_Device_SetConfiguration(void)
return;
\r
}
\r
\r
return;
\r
}
\r
\r
- Endpoint_Clear
SetupReceived
();
\r
+ Endpoint_Clear
ControlSETUP
();
\r
\r
USB_ConfigurationNumber = wValue_LSB;
\r
\r
\r
USB_ConfigurationNumber = wValue_LSB;
\r
\r
- Endpoint_Clear
Setup
IN();
\r
+ Endpoint_Clear
Control
IN();
\r
\r
if (!(AlreadyConfigured) && USB_ConfigurationNumber)
\r
RAISE_EVENT(USB_DeviceEnumerationComplete);
\r
\r
if (!(AlreadyConfigured) && USB_ConfigurationNumber)
\r
RAISE_EVENT(USB_DeviceEnumerationComplete);
\r
@@
-166,14
+166,14
@@
static void USB_Device_SetConfiguration(void)
\r
void USB_Device_GetConfiguration(void)
\r
{
\r
\r
void USB_Device_GetConfiguration(void)
\r
{
\r
- Endpoint_Clear
SetupReceived();
\r
+ Endpoint_Clear
ControlSETUP();
\r
\r
Endpoint_Write_Byte(USB_ConfigurationNumber);
\r
\r
\r
Endpoint_Write_Byte(USB_ConfigurationNumber);
\r
\r
- Endpoint_Clear
Setup
IN();
\r
+ Endpoint_Clear
Control
IN();
\r
\r
\r
- while (!(Endpoint_Is
Setup
OUTReceived()));
\r
- Endpoint_Clear
Setup
OUT();
\r
+ while (!(Endpoint_IsOUTReceived()));
\r
+ Endpoint_Clear
Control
OUT();
\r
}
\r
\r
static void USB_Device_GetDescriptor(void)
\r
}
\r
\r
static void USB_Device_GetDescriptor(void)
\r
@@
-190,18
+190,18
@@
static void USB_Device_GetDescriptor(void)
if ((DescriptorSize = USB_GetDescriptor(wValue, wIndex, &DescriptorPointer)) == NO_DESCRIPTOR)
\r
return;
\r
\r
if ((DescriptorSize = USB_GetDescriptor(wValue, wIndex, &DescriptorPointer)) == NO_DESCRIPTOR)
\r
return;
\r
\r
- Endpoint_Clear
SetupReceived();
\r
+ Endpoint_Clear
ControlSETUP();
\r
\r
if (wLength > DescriptorSize)
\r
wLength = DescriptorSize;
\r
\r
while (wLength)
\r
{
\r
\r
if (wLength > DescriptorSize)
\r
wLength = DescriptorSize;
\r
\r
while (wLength)
\r
{
\r
- while (!(Endpoint_Is
Setup
INReady()))
\r
+ while (!(Endpoint_IsINReady()))
\r
{
\r
{
\r
- if (Endpoint_Is
Setup
OUTReceived())
\r
+ if (Endpoint_IsOUTReceived())
\r
{
\r
{
\r
- Endpoint_Clear
Setup
OUT();
\r
+ Endpoint_Clear
Control
OUT();
\r
return;
\r
}
\r
}
\r
return;
\r
}
\r
}
\r
@@
-220,17
+220,17
@@
static void USB_Device_GetDescriptor(void)
}
\r
\r
SendZLP = (Endpoint_BytesInEndpoint() == USB_ControlEndpointSize);
\r
}
\r
\r
SendZLP = (Endpoint_BytesInEndpoint() == USB_ControlEndpointSize);
\r
- Endpoint_Clear
Setup
IN();
\r
+ Endpoint_Clear
Control
IN();
\r
}
\r
\r
if (SendZLP)
\r
{
\r
}
\r
\r
if (SendZLP)
\r
{
\r
- while (!(Endpoint_Is
Setup
INReady()));
\r
- Endpoint_Clear
Setup
IN();
\r
+ while (!(Endpoint_IsINReady()));
\r
+ Endpoint_Clear
Control
IN();
\r
}
\r
\r
}
\r
\r
- while (!(Endpoint_Is
Setup
OUTReceived()));
\r
- Endpoint_Clear
Setup
OUT();
\r
+ while (!(Endpoint_IsOUTReceived()));
\r
+ Endpoint_Clear
Control
OUT();
\r
}
\r
\r
static void USB_Device_GetStatus(const uint8_t bmRequestType)
\r
}
\r
\r
static void USB_Device_GetStatus(const uint8_t bmRequestType)
\r
@@
-264,13
+264,14
@@
static void USB_Device_GetStatus(const uint8_t bmRequestType)
}
\r
\r
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
\r
}
\r
\r
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
\r
- Endpoint_ClearSetupReceived();
\r
+ Endpoint_ClearControlSETUP();
\r
+
\r
Endpoint_Write_Word_LE(CurrentStatus);
\r
\r
Endpoint_Write_Word_LE(CurrentStatus);
\r
\r
- Endpoint_Clear
Setup
IN();
\r
+ Endpoint_Clear
Control
IN();
\r
\r
\r
- while (!(Endpoint_Is
Setup
OUTReceived()));
\r
- Endpoint_Clear
Setup
OUT();
\r
+ while (!(Endpoint_IsOUTReceived()));
\r
+ Endpoint_Clear
Control
OUT();
\r
}
\r
\r
#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)
\r
}
\r
\r
#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)
\r
@@
-305,8
+306,8
@@
static void USB_Device_ClearSetFeature(const uint8_t bRequest, const uint8_t bmR
}
\r
\r
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
\r
}
\r
\r
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
\r
- Endpoint_Clear
SetupReceived
();
\r
- Endpoint_Clear
Setup
IN();
\r
+ Endpoint_Clear
ControlSETUP
();
\r
+ Endpoint_Clear
Control
IN();
\r
}
\r
}
\r
\r
}
\r
}
\r
\r