projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed USBtoSerial and XPLAINBridge demos discarding data from the PC if the send...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
HighLevel
/
DeviceStandardReq.c
diff --git
a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
index
960e243
..
93b4440
100644
(file)
--- a/
LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
+++ b/
LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
@@
-3,7
+3,7
@@
Copyright (C) Dean Camera, 2010.
dean [at] fourwalledcubicle [dot] com
Copyright (C) Dean Camera, 2010.
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
/*
*/
/*
@@
-211,8
+211,8
@@
static void USB_Device_GetConfiguration(void)
#if !defined(NO_INTERNAL_SERIAL) && (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
static char USB_Device_NibbleToASCII(uint8_t Nibble)
{
#if !defined(NO_INTERNAL_SERIAL) && (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
static char USB_Device_NibbleToASCII(uint8_t Nibble)
{
- Nibble
= ((Nibble & 0x0F) + '0')
;
- return (Nibble >
'9') ? (Nibble + ('A' - '9' - 1)) : Nibble
;
+ Nibble
&= 0x0F
;
+ return (Nibble >
= 10) ? (('A' - 10) + Nibble) : ('0' + Nibble)
;
}
static void USB_Device_GetInternalSerialDescriptor(void)
}
static void USB_Device_GetInternalSerialDescriptor(void)
@@
-220,16
+220,16
@@
static void USB_Device_GetInternalSerialDescriptor(void)
struct
{
USB_Descriptor_Header_t Header;
struct
{
USB_Descriptor_Header_t Header;
-
int16
_t UnicodeString[20];
+
wchar
_t UnicodeString[20];
} SignatureDescriptor;
SignatureDescriptor.Header.Type = DTYPE_String;
SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);
} SignatureDescriptor;
SignatureDescriptor.Header.Type = DTYPE_String;
SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);
- uint8_t SigReadAddress = 0x0E;
-
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
+ uint8_t SigReadAddress = 0x0E;
+
for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)
{
uint8_t SerialByte = boot_signature_byte_get(SigReadAddress);
for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)
{
uint8_t SerialByte = boot_signature_byte_get(SigReadAddress);
@@
-346,7
+346,7
@@
static void USB_Device_ClearSetFeature(void)
{
#if !defined(NO_DEVICE_REMOTE_WAKEUP)
case REQREC_DEVICE:
{
#if !defined(NO_DEVICE_REMOTE_WAKEUP)
case REQREC_DEVICE:
- if ((uint8_t)USB_ControlRequest.wValue == FEATURE_
REMOTE_WAKEUP
)
+ if ((uint8_t)USB_ControlRequest.wValue == FEATURE_
SEL_DeviceRemoteWakeup
)
USB_RemoteWakeupEnabled = (USB_ControlRequest.bRequest == REQ_SetFeature);
else
return;
USB_RemoteWakeupEnabled = (USB_ControlRequest.bRequest == REQ_SetFeature);
else
return;
@@
-355,7
+355,7
@@
static void USB_Device_ClearSetFeature(void)
#endif
#if !defined(CONTROL_ONLY_DEVICE)
case REQREC_ENDPOINT:
#endif
#if !defined(CONTROL_ONLY_DEVICE)
case REQREC_ENDPOINT:
- if ((uint8_t)USB_ControlRequest.wValue == FEATURE_
ENDPOINT_HALT
)
+ if ((uint8_t)USB_ControlRequest.wValue == FEATURE_
SEL_EndpointHalt
)
{
uint8_t EndpointIndex = ((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK);
{
uint8_t EndpointIndex = ((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK);