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 2009-11-20 06:56:43 +00:00
parent 7ef58eef7a
commit 6c38ca2890
7 changed files with 14 additions and 8 deletions

View file

@ -169,10 +169,10 @@ void USB_Audio_Task(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
/* Write the sample to the buffer */
Endpoint_Write_Word_LE(AudioSample);