forked from mfulz_github/qmk_firmware
Fixed Set/Clear Feature requests directed to a non-configured endpoint not returning a stall to the host.
Make TeensyHID bootloader use an 8 byte control endpoint to match the official Teensy, just in case Paul decides to authenticate on that attribute in the future.
This commit is contained in:
parent
7b79325aa0
commit
5e14c194c9
|
@ -110,7 +110,7 @@ LUFA_PATH = ../..
|
||||||
# LUFA library compile-time options
|
# LUFA library compile-time options
|
||||||
LUFA_OPTS = -D USB_DEVICE_ONLY
|
LUFA_OPTS = -D USB_DEVICE_ONLY
|
||||||
LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0
|
LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0
|
||||||
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=64
|
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8
|
||||||
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1
|
LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1
|
||||||
LUFA_OPTS += -D USE_RAM_DESCRIPTORS
|
LUFA_OPTS += -D USE_RAM_DESCRIPTORS
|
||||||
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
|
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
|
||||||
|
|
|
@ -323,7 +323,7 @@ static void USB_Device_GetStatus(void)
|
||||||
#endif
|
#endif
|
||||||
#if !defined(CONTROL_ONLY_DEVICE)
|
#if !defined(CONTROL_ONLY_DEVICE)
|
||||||
case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT):
|
case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT):
|
||||||
Endpoint_SelectEndpoint(USB_ControlRequest.wIndex & 0xFF);
|
Endpoint_SelectEndpoint((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK);
|
||||||
|
|
||||||
CurrentStatus = Endpoint_IsStalled();
|
CurrentStatus = Endpoint_IsStalled();
|
||||||
|
|
||||||
|
@ -367,8 +367,9 @@ static void USB_Device_ClearSetFeature(void)
|
||||||
|
|
||||||
Endpoint_SelectEndpoint(EndpointIndex);
|
Endpoint_SelectEndpoint(EndpointIndex);
|
||||||
|
|
||||||
if (Endpoint_IsEnabled())
|
if (!(Endpoint_IsEnabled()))
|
||||||
{
|
return;
|
||||||
|
|
||||||
if (USB_ControlRequest.bRequest == REQ_SetFeature)
|
if (USB_ControlRequest.bRequest == REQ_SetFeature)
|
||||||
{
|
{
|
||||||
Endpoint_StallTransaction();
|
Endpoint_StallTransaction();
|
||||||
|
@ -380,7 +381,6 @@ static void USB_Device_ClearSetFeature(void)
|
||||||
Endpoint_ResetDataToggle();
|
Endpoint_ResetDataToggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,7 +21,7 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
|
||||||
|
|
||||||
if (Endpoint_IsINReady())
|
if (Endpoint_IsINReady())
|
||||||
{
|
{
|
||||||
uint16_t BytesInEndpoint = Endpoint_BytesInEndpoint();
|
uint8_t BytesInEndpoint = Endpoint_BytesInEndpoint();
|
||||||
|
|
||||||
while (Length && (BytesInEndpoint < USB_ControlEndpointSize))
|
while (Length && (BytesInEndpoint < USB_ControlEndpointSize))
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
* - Fixed Still Image Host class driver not resetting the transaction ID when a new session is opened, fixed driver not sending
|
* - Fixed Still Image Host class driver not resetting the transaction ID when a new session is opened, fixed driver not sending
|
||||||
* a valid session ID to the device
|
* a valid session ID to the device
|
||||||
* - Removed invalid dfu and flip related targets from the bootloaders - bootloaders can only be replaced with an external programmer
|
* - Removed invalid dfu and flip related targets from the bootloaders - bootloaders can only be replaced with an external programmer
|
||||||
|
* - Fixed Set/Clear Feature requests directed to a non-configured endpoint not returning a stall to the host
|
||||||
*
|
*
|
||||||
* \section Sec_ChangeLog100219 Version 100219
|
* \section Sec_ChangeLog100219 Version 100219
|
||||||
*
|
*
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
|
|
||||||
# MCU name
|
# MCU name
|
||||||
MCU = at90usb646
|
MCU = at90usb1287
|
||||||
|
|
||||||
|
|
||||||
# Target board (see library "Board Types" documentation, NONE for projects not requiring
|
# Target board (see library "Board Types" documentation, NONE for projects not requiring
|
||||||
|
|
Loading…
Reference in New Issue