projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7ef58ee
)
Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when...
author
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 20 Nov 2009 06:56:43 +0000
(06:56 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 20 Nov 2009 06:56:43 +0000
(06:56 +0000)
Demos/Device/ClassDriver/AudioInput/AudioInput.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/GenericHID/Descriptors.h
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/GenericHID/GenericHID.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/AudioInput/AudioInput.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Device/ClassDriver/AudioInput/AudioInput.c
b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
index
cf9d3b4
..
9bd5fe4
100644
(file)
--- a/
Demos/Device/ClassDriver/AudioInput/AudioInput.c
+++ b/
Demos/Device/ClassDriver/AudioInput/AudioInput.c
@@
-102,10
+102,10
@@
void ProcessNextSample(void)
/* Audio sample is ADC value scaled to fit the entire range */
\r
int16_t AudioSample = ((SAMPLE_MAX_RANGE / ADC_MAX_RANGE) * ADC_GetResult());
\r
\r
/* Audio sample is ADC value scaled to fit the entire range */
\r
int16_t AudioSample = ((SAMPLE_MAX_RANGE / ADC_MAX_RANGE) * ADC_GetResult());
\r
\r
-#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
\r
+
#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
\r
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
\r
AudioSample -= (SAMPLE_MAX_RANGE / 2));
\r
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
\r
AudioSample -= (SAMPLE_MAX_RANGE / 2));
\r
-#endif
\r
+
#endif
\r
\r
Audio_Device_WriteSample16(&Microphone_Audio_Interface, AudioSample);
\r
}
\r
\r
Audio_Device_WriteSample16(&Microphone_Audio_Interface, AudioSample);
\r
}
\r
diff --git
a/Demos/Device/ClassDriver/GenericHID/Descriptors.h
b/Demos/Device/ClassDriver/GenericHID/Descriptors.h
index
88f16e0
..
0c77922
100644
(file)
--- a/
Demos/Device/ClassDriver/GenericHID/Descriptors.h
+++ b/
Demos/Device/ClassDriver/GenericHID/Descriptors.h
@@
-42,7
+42,7
@@
#include <LUFA/Drivers/USB/USB.h>
\r
#include <LUFA/Drivers/USB/Class/HID.h>
\r
\r
#include <LUFA/Drivers/USB/USB.h>
\r
#include <LUFA/Drivers/USB/Class/HID.h>
\r
\r
- /*
*
Type Defines: */
\r
+ /* Type Defines: */
\r
/** Type define for the device configuration descriptor structure. This must be defined in the
\r
* application code, as the configuration descriptor contains several sub-descriptors which
\r
* vary between devices, and which describe the device's usage to the host.
\r
/** Type define for the device configuration descriptor structure. This must be defined in the
\r
* application code, as the configuration descriptor contains several sub-descriptors which
\r
* vary between devices, and which describe the device's usage to the host.
\r
diff --git
a/Demos/Device/ClassDriver/GenericHID/GenericHID.c
b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
index
bd75e4e
..
5e26580
100644
(file)
--- a/
Demos/Device/ClassDriver/GenericHID/GenericHID.c
+++ b/
Demos/Device/ClassDriver/GenericHID/GenericHID.c
@@
-42,9
+42,9
@@
uint8_t PrevHIDReportBuffer[GENERIC_REPORT_SIZE];
/** Structure to contain reports from the host, so that they can be echoed back upon request */
\r
struct
\r
{
\r
/** Structure to contain reports from the host, so that they can be echoed back upon request */
\r
struct
\r
{
\r
- uint8_t ReportID;
\r
+ uint8_t
ReportID;
\r
uint16_t ReportSize;
\r
uint16_t ReportSize;
\r
- uint8_t ReportData[GENERIC_REPORT_SIZE];
\r
+ uint8_t
ReportData[GENERIC_REPORT_SIZE];
\r
} HIDReportEcho;
\r
\r
/** LUFA HID Class driver interface configuration and state information. This structure is
\r
} HIDReportEcho;
\r
\r
/** LUFA HID Class driver interface configuration and state information. This structure is
\r
diff --git
a/Demos/Device/LowLevel/AudioInput/AudioInput.c
b/Demos/Device/LowLevel/AudioInput/AudioInput.c
index
572e307
..
a61ff59
100644
(file)
--- a/
Demos/Device/LowLevel/AudioInput/AudioInput.c
+++ b/
Demos/Device/LowLevel/AudioInput/AudioInput.c
@@
-169,10
+169,10
@@
void USB_Audio_Task(void)
/* Audio sample is ADC value scaled to fit the entire range */
\r
int16_t AudioSample = ((SAMPLE_MAX_RANGE / ADC_MAX_RANGE) * ADC_GetResult());
\r
\r
/* Audio sample is ADC value scaled to fit the entire range */
\r
int16_t AudioSample = ((SAMPLE_MAX_RANGE / ADC_MAX_RANGE) * ADC_GetResult());
\r
\r
-#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
\r
+
#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
\r
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
\r
AudioSample -= (SAMPLE_MAX_RANGE / 2));
\r
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
\r
AudioSample -= (SAMPLE_MAX_RANGE / 2));
\r
-#endif
\r
+
#endif
\r
\r
/* Write the sample to the buffer */
\r
Endpoint_Write_Word_LE(AudioSample);
\r
\r
/* Write the sample to the buffer */
\r
Endpoint_Write_Word_LE(AudioSample);
\r
diff --git
a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
index
e64f0ed
..
6948296
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
+++ b/
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
@@
-2,6
+2,9
@@
uint8_t TEMPLATE_FUNC_NAME (void* Buffer, uint16_t Length)
{
\r
uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
\r
\r
{
\r
uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
\r
\r
+ if (!(Length))
\r
+ Endpoint_ClearOUT();
\r
+
\r
while (Length)
\r
{
\r
if (Endpoint_IsSETUPReceived())
\r
while (Length)
\r
{
\r
if (Endpoint_IsSETUPReceived())
\r
diff --git
a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
index
a2a9b8c
..
2de7a74
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
+++ b/
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
@@
-5,7
+5,9
@@
uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
\r
if (Length > USB_ControlRequest.wLength)
\r
Length = USB_ControlRequest.wLength;
\r
\r
if (Length > USB_ControlRequest.wLength)
\r
Length = USB_ControlRequest.wLength;
\r
-
\r
+ else if (!(Length))
\r
+ Endpoint_ClearIN();
\r
+
\r
while (Length || LastPacketFull)
\r
{
\r
if (Endpoint_IsSETUPReceived())
\r
while (Length || LastPacketFull)
\r
{
\r
if (Endpoint_IsSETUPReceived())
\r
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
8390fde
..
57a1a2b
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-51,6
+51,7
@@
* - Fixed HID host Class driver report send/receive report broken when issued through the control pipe
\r
* - Fixed HOST_STATE_AS_GPIOR compile time option being ignored when in host mode (thanks to David Lyons)
\r
* - Fixed LowLevel Keyboard demo not saving the issues report only after it has been sent to the host
\r
* - Fixed HID host Class driver report send/receive report broken when issued through the control pipe
\r
* - Fixed HOST_STATE_AS_GPIOR compile time option being ignored when in host mode (thanks to David Lyons)
\r
* - Fixed LowLevel Keyboard demo not saving the issues report only after it has been sent to the host
\r
+ * - Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when given data Length is zero
\r
*
\r
* \section Sec_ChangeLog090924 Version 090924
\r
*
\r
*
\r
* \section Sec_ChangeLog090924 Version 090924
\r
*
\r