Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when the given data length is zero.

This commit is contained in:
Dean Camera committed 2009-11-20 06:56:43 +00:00
1 parent 7ef58eef7a
commit 6c38ca2890
7 files changed
+14 -8

No files matched your search

@@ -102,10 +102,10 @@ void ProcessNextSample(void)
/* Audio sample is ADC value scaled to fit the entire range */
int16_t AudioSample = ((SAMPLE_MAX_RANGE / ADC_MAX_RANGE) * ADC_GetResult());
#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
#if defined(MICROPHONE_BIASED_TO_HALF_RAIL)
/* Microphone is biased to half rail voltage, subtract the bias from the sample value */
AudioSample -= (SAMPLE_MAX_RANGE / 2));
#endif
#endif
Audio_Device_WriteSample16(&Microphone_Audio_Interface, AudioSample);
}