projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed GenericHIDHost demo report write routine incorrect for control type requests...
[pub/USBasp.git]
/
Demos
/
Device
/
AudioInput
/
AudioInput.c
diff --git
a/Demos/Device/AudioInput/AudioInput.c
b/Demos/Device/AudioInput/AudioInput.c
index
fca24c3
..
c016694
100644
(file)
--- a/
Demos/Device/AudioInput/AudioInput.c
+++ b/
Demos/Device/AudioInput/AudioInput.c
@@
-36,12
+36,6
@@
\r
#include "AudioInput.h"
\r
\r
\r
#include "AudioInput.h"
\r
\r
-/* Project Tags, for reading out using the ButtLoad project */
\r
-BUTTLOADTAG(ProjName, "LUFA AudioIn App");
\r
-BUTTLOADTAG(BuildTime, __TIME__);
\r
-BUTTLOADTAG(BuildDate, __DATE__);
\r
-BUTTLOADTAG(LUFAVersion, "LUFA V" LUFA_VERSION_STRING);
\r
-
\r
/* Scheduler Task List */
\r
TASK_LIST
\r
{
\r
/* Scheduler Task List */
\r
TASK_LIST
\r
{
\r
@@
-145,7
+139,7
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
{
\r
uint16_t wValue = Endpoint_Read_Word_LE();
\r
\r
{
\r
uint16_t wValue = Endpoint_Read_Word_LE();
\r
\r
- Endpoint_Clear
SetupReceived
();
\r
+ Endpoint_Clear
ControlSETUP
();
\r
\r
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */
\r
if (wValue)
\r
\r
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */
\r
if (wValue)
\r
@@
-160,8
+154,8
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
}
\r
\r
/* Acknowledge status stage */
\r
}
\r
\r
/* Acknowledge status stage */
\r
- while (!(Endpoint_Is
Setup
INReady()));
\r
- Endpoint_Clear
Setup
IN();
\r
+ while (!(Endpoint_IsINReady()));
\r
+ Endpoint_Clear
Control
IN();
\r
}
\r
\r
break;
\r
}
\r
\r
break;
\r
@@
-201,8
+195,8
@@
TASK(USB_Audio_Task)
/* Select the audio stream endpoint */
\r
Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM);
\r
\r
/* Select the audio stream endpoint */
\r
Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM);
\r
\r
- /* Check if the current endpoint can be
read from (contains a packet)
and that the next sample should be stored */
\r
- if (Endpoint_
ReadWriteAllowed
() && (TIFR0 & (1 << OCF0A)))
\r
+ /* Check if the current endpoint can be
written to
and that the next sample should be stored */
\r
+ if (Endpoint_
IsINReady
() && (TIFR0 & (1 << OCF0A)))
\r
{
\r
/* Clear the sample reload timer */
\r
TIFR0 |= (1 << OCF0A);
\r
{
\r
/* Clear the sample reload timer */
\r
TIFR0 |= (1 << OCF0A);
\r
@@
-219,10
+213,10
@@
TASK(USB_Audio_Task)
Endpoint_Write_Word_LE(AudioSample);
\r
\r
/* Check to see if the bank is now full */
\r
Endpoint_Write_Word_LE(AudioSample);
\r
\r
/* Check to see if the bank is now full */
\r
- if (!(Endpoint_ReadWriteAllowed()))
\r
+ if (!(Endpoint_
Is
ReadWriteAllowed()))
\r
{
\r
/* Send the full packet to the host */
\r
{
\r
/* Send the full packet to the host */
\r
- Endpoint_Clear
CurrentBank
();
\r
+ Endpoint_Clear
IN
();
\r
}
\r
}
\r
}
\r
}
\r
}
\r
}
\r