aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-06-16 06:49:08 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-06-16 06:49:08 +0000
commitd8fe01f19a48b960f5f82735b38ab798d07f2891 (patch)
tree70f263f3bae17a97c0e3b776a81ec1178d9dbbd7 /LUFA/Drivers
parent57eedebd191c91ce125238a8a2cb1482186d6164 (diff)
downloadlufa-d8fe01f19a48b960f5f82735b38ab798d07f2891.tar.gz
lufa-d8fe01f19a48b960f5f82735b38ab798d07f2891.tar.bz2
lufa-d8fe01f19a48b960f5f82735b38ab798d07f2891.zip
Rename new Audio class driver functions, callbacks and events to ensure that they contain the USB mode (Device or Host) in the function names.
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r--LUFA/Drivers/USB/Class/Device/Audio.c11
-rw-r--r--LUFA/Drivers/USB/Class/Device/Audio.h18
-rw-r--r--LUFA/Drivers/USB/Class/Host/Audio.c12
-rw-r--r--LUFA/Drivers/USB/Class/Host/Audio.h12
4 files changed, 28 insertions, 25 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.c b/LUFA/Drivers/USB/Class/Device/Audio.c
index 60c091e7f..59792124a 100644
--- a/LUFA/Drivers/USB/Class/Device/Audio.c
+++ b/LUFA/Drivers/USB/Class/Device/Audio.c
@@ -70,7 +70,7 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
Endpoint_ClearStatusStage();
AudioInterfaceInfo->State.InterfaceEnabled = ((USB_ControlRequest.wValue & 0xFF) != 0);
- EVENT_Audio_StreamStartStopChange(AudioInterfaceInfo);
+ EVENT_Audio_Device_StreamStartStop(AudioInterfaceInfo);
}
break;
@@ -93,7 +93,8 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
- if (CALLBACK_Audio_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress, EndpointControl, NULL, NULL))
+ if (CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
+ EndpointControl, NULL, NULL))
{
uint16_t ValueLength = USB_ControlRequest.wLength;
uint8_t Value[ValueLength];
@@ -102,7 +103,8 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
Endpoint_Read_Control_Stream_LE(Value, ValueLength);
Endpoint_ClearIN();
- CALLBACK_Audio_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress, EndpointControl, &ValueLength, Value);
+ CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
+ EndpointControl, &ValueLength, Value);
}
}
@@ -119,7 +121,8 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
uint16_t ValueLength = USB_ControlRequest.wLength;
uint8_t Value[ValueLength];
- if (CALLBACK_Audio_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress, EndpointControl, &ValueLength, Value))
+ if (CALLBACK_Audio_Device_GetSetEndpointProperty(AudioInterfaceInfo, EndpointProperty, EndpointAddress,
+ EndpointControl, &ValueLength, Value))
{
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(Value, ValueLength);
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h
index 486df72d1..60880c29e 100644
--- a/LUFA/Drivers/USB/Class/Device/Audio.h
+++ b/LUFA/Drivers/USB/Class/Device/Audio.h
@@ -149,12 +149,12 @@
*
* \return Boolean true if the property get/set was successful, false otherwise
*/
- bool CALLBACK_Audio_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
- const uint8_t EndpointProperty,
- const uint8_t EndpointAddress,
- const uint8_t EndpointControl,
- uint16_t* const DataLength,
- uint8_t* Data);
+ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
+ const uint8_t EndpointProperty,
+ const uint8_t EndpointAddress,
+ const uint8_t EndpointControl,
+ uint16_t* const DataLength,
+ uint8_t* Data);
/** Audio class driver event for an Audio Stream start/stop change. This event fires each time the device receives a stream enable or
* disable control request from the host, to start and stop the audio stream. The current state of the stream can be determined by the
@@ -162,7 +162,7 @@
*
* \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state.
*/
- void EVENT_Audio_StreamStartStopChange(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo);
+ void EVENT_Audio_Device_StreamStartStop(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo);
/* Inline Functions: */
/** General management task for a given Audio class interface, required for the correct operation of the interface. This should
@@ -358,8 +358,8 @@
#if defined(__INCLUDE_FROM_AUDIO_DEVICE_C)
void Audio_Device_Event_Stub(void) ATTR_CONST;
- void EVENT_Audio_StreamStartStopChange(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
- ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(Audio_Device_Event_Stub);
+ void EVENT_Audio_Device_StreamStartStop(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
+ ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(Audio_Device_Event_Stub);
#endif
#endif
diff --git a/LUFA/Drivers/USB/Class/Host/Audio.c b/LUFA/Drivers/USB/Class/Host/Audio.c
index 1d590e841..088872de4 100644
--- a/LUFA/Drivers/USB/Class/Host/Audio.c
+++ b/LUFA/Drivers/USB/Class/Host/Audio.c
@@ -208,12 +208,12 @@ uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInt
EnableStreaming ? AudioInterfaceInfo->State.EnabledStreamingAltIndex : 0);
}
-uint8_t Audio_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
- const uint8_t DataPipeIndex,
- const uint8_t EndpointProperty,
- const uint8_t EndpointControl,
- const uint16_t DataLength,
- void* const Data)
+uint8_t Audio_Host_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
+ const uint8_t DataPipeIndex,
+ const uint8_t EndpointProperty,
+ const uint8_t EndpointControl,
+ const uint16_t DataLength,
+ void* const Data)
{
if (!(AudioInterfaceInfo->State.IsActive))
return HOST_SENDCONTROL_DeviceDisconnected;
diff --git a/LUFA/Drivers/USB/Class/Host/Audio.h b/LUFA/Drivers/USB/Class/Host/Audio.h
index 81dcedbcd..c4a832bf1 100644
--- a/LUFA/Drivers/USB/Class/Host/Audio.h
+++ b/LUFA/Drivers/USB/Class/Host/Audio.h
@@ -161,12 +161,12 @@
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
*/
- uint8_t Audio_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
- const uint8_t DataPipeIndex,
- const uint8_t EndpointProperty,
- const uint8_t EndpointControl,
- const uint16_t DataLength,
- void* const Data);
+ uint8_t Audio_Host_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
+ const uint8_t DataPipeIndex,
+ const uint8_t EndpointProperty,
+ const uint8_t EndpointControl,
+ const uint16_t DataLength,
+ void* const Data);
/* Inline Functions: */
/** General management task for a given Audio host class interface, required for the correct operation of