Skip to content
Snippets Groups Projects
Commit 4897ef89 authored by Dean Camera's avatar Dean Camera
Browse files

Ensure all USB device class drivers have the same three main functions as...

Ensure all USB device class drivers have the same three main functions as their interface for consistency.
parent a67bd74e
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ int main(void)
if (Microphone_Audio_Interface.InterfaceEnabled)
ProcessNextSample();
USB_Audio_USBTask(&Microphone_Audio_Interface);
USB_USBTask();
}
}
......
......@@ -62,6 +62,7 @@ int main(void)
if (Speaker_Audio_Interface.InterfaceEnabled)
ProcessNextSample();
USB_Audio_USBTask(&Speaker_Audio_Interface);
USB_USBTask();
}
}
......
......@@ -64,6 +64,7 @@ int main(void)
{
CheckJoystickMovement();
USB_MIDI_USBTask(&Keyboard_MIDI_Interface);
USB_USBTask();
}
}
......@@ -168,3 +169,9 @@ void EVENT_USB_ConfigurationChanged(void)
if (!(USB_MIDI_ConfigureEndpoints(&Keyboard_MIDI_Interface)))
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
/** Event handler for the library USB Unhandled Control Packet event. */
void EVENT_USB_UnhandledControlPacket(void)
{
USB_MIDI_ProcessControlPacket(&Keyboard_MIDI_Interface);
}
......@@ -80,6 +80,11 @@ bool USB_Audio_ConfigureEndpoints(USB_ClassInfo_Audio_t* AudioInterfaceInfo)
return true;
}
void USB_Audio_USBTask(USB_ClassInfo_Audio_t* AudioInterfaceInfo)
{
}
int8_t USB_Audio_ReadSample8(void)
{
int8_t Sample;
......
......@@ -30,6 +30,11 @@
#include "MIDI.h"
void USB_MIDI_ProcessControlPacket(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo)
{
}
bool USB_MIDI_ConfigureEndpoints(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo)
{
if (MIDIInterfaceInfo->DataINEndpointNumber)
......@@ -55,6 +60,11 @@ bool USB_MIDI_ConfigureEndpoints(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo)
return true;
}
void USB_MIDI_USBTask(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo)
{
}
void USB_MIDI_SendEventPacket(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo, USB_MIDI_EventPacket_t* Event)
{
if (!(USB_IsConnected))
......
......@@ -155,6 +155,7 @@
/* Function Prototypes: */
bool USB_MIDI_ConfigureEndpoints(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo);
void USB_MIDI_ProcessControlPacket(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo);
void USB_MIDI_USBTask(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo);
void USB_MIDI_SendEventPacket(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo, USB_MIDI_EventPacket_t* Event);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment