diff options
author | Dean Camera <[email protected]> | 2010-01-05 04:50:18 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-01-05 04:50:18 +0000 |
commit | 60e96412220b62a614348c287354c56f282fcc70 (patch) | |
tree | e9ed81aa0184a784958c697a26062cc2861b84a7 /LUFA | |
parent | 6122ba93cf957bd495fdd1838bac16fb24896a17 (diff) | |
download | qmk_firmware-60e96412220b62a614348c287354c56f282fcc70.tar.gz qmk_firmware-60e96412220b62a614348c287354c56f282fcc70.zip |
Inline USB management functions in the Class drivers which are standardized but currently unused, to prevent them from using up unneccesary cycles and flash in the user application.
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Common/Common.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/Audio.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/Audio.h | 18 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/HID.h | 29 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MIDI.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MIDI.h | 19 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/HID.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/HID.h | 21 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/MIDI.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/MIDI.h | 21 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/MassStorage.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/MassStorage.h | 21 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/Printer.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/Printer.h | 22 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/RNDIS.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/RNDIS.h | 19 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/StillImage.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/StillImage.h | 24 | ||||
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 1 | ||||
-rw-r--r-- | LUFA/ManPages/LibraryResources.txt | 2 |
20 files changed, 119 insertions, 120 deletions
diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index 2b57cda914..2ddb58c8c0 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -172,7 +172,7 @@ {
Temp = *Data;
*Data = *(Data + Bytes - 1);
- *(Data + Bytes) = Temp;
+ *(Data + Bytes - 1) = Temp;
Data++;
Bytes -= 2;
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.c b/LUFA/Drivers/USB/Class/Device/Audio.c index 52d299f2a7..89115f2db0 100644 --- a/LUFA/Drivers/USB/Class/Device/Audio.c +++ b/LUFA/Drivers/USB/Class/Device/Audio.c @@ -84,11 +84,6 @@ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* AudioInterfac return true;
}
-void Audio_Device_USBTask(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
-{
- (void)AudioInterfaceInfo;
-}
-
bool Audio_Device_IsSampleReceived(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
{
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(AudioInterfaceInfo->State.InterfaceEnabled))
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h index e516b71011..c6b68b0cba 100644 --- a/LUFA/Drivers/USB/Class/Device/Audio.h +++ b/LUFA/Drivers/USB/Class/Device/Audio.h @@ -112,13 +112,6 @@ * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state
*/
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
- /** General management task for a given Audio class interface, required for the correct operation of the interface. This should
- * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
- *
- * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state
- */
- void Audio_Device_USBTask(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
/** Determines if the given audio interface is ready for a sample to be read from it, and selects the streaming
* OUT endpoint ready for reading.
@@ -145,6 +138,17 @@ bool Audio_Device_IsReadyForNextSample(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
+ * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
+ *
+ * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state
+ */
+ static inline void Audio_Device_USBTask(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo);
+ static inline void Audio_Device_USBTask(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
+ {
+ (void)AudioInterfaceInfo;
+ }
+
/** Reads the next 8-bit audio sample from the current audio interface.
*
* \note This should be preceded immediately by a call to the USB_Audio_IsSampleReceived() function to ensure that
diff --git a/LUFA/Drivers/USB/Class/Device/HID.h b/LUFA/Drivers/USB/Class/Device/HID.h index 14a5ff601c..f62c08c392 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.h +++ b/LUFA/Drivers/USB/Class/Device/HID.h @@ -131,20 +131,6 @@ */
void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
- /** Indicates that a millisecond of idle time has elapsed on the given HID interface, and the interface's idle count should be
- * decremented. This should be called once per millisecond so that hardware key-repeats function correctly. It is recommended
- * that this be called by the \ref EVENT_USB_Device_StartOfFrame() event, once SOF events have been enabled via
- * \ref USB_Device_EnableSOFEvents();.
- *
- * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state
- */
- static inline void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo);
- static inline void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo)
- {
- if (HIDInterfaceInfo->State.IdleMSRemaining)
- HIDInterfaceInfo->State.IdleMSRemaining--;
- }
-
/** HID class driver callback for the user creation of a HID IN report. This callback may fire in response to either
* HID class control requests from the host, or by the normal HID endpoint polling procedure. Inside this callback the
* user is responsible for the creation of the next HID input report to be sent to the host.
@@ -178,6 +164,21 @@ const void* ReportData, const uint16_t ReportSize) ATTR_NON_NULL_PTR_ARG(1)
ATTR_NON_NULL_PTR_ARG(3);
+ /* Inline Functions: */
+ /** Indicates that a millisecond of idle time has elapsed on the given HID interface, and the interface's idle count should be
+ * decremented. This should be called once per millisecond so that hardware key-repeats function correctly. It is recommended
+ * that this be called by the \ref EVENT_USB_Device_StartOfFrame() event, once SOF events have been enabled via
+ * \ref USB_Device_EnableSOFEvents();.
+ *
+ * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state
+ */
+ static inline void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo);
+ static inline void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo)
+ {
+ if (HIDInterfaceInfo->State.IdleMSRemaining)
+ HIDInterfaceInfo->State.IdleMSRemaining--;
+ }
+
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.c b/LUFA/Drivers/USB/Class/Device/MIDI.c index a01d196395..bc191d77a6 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.c +++ b/LUFA/Drivers/USB/Class/Device/MIDI.c @@ -65,11 +65,6 @@ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter return true;
}
-void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
-{
- (void)MIDIInterfaceInfo;
-}
-
uint8_t MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
{
if (USB_DeviceState != DEVICE_STATE_Configured)
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h index 3899f6e711..fef789024c 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.h +++ b/LUFA/Drivers/USB/Class/Device/MIDI.h @@ -104,13 +104,6 @@ */
void MIDI_Device_ProcessControlRequest(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
- /** General management task for a given MIDI class interface, required for the correct operation of the interface. This should
- * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
- *
- * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state
- */
- void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
/** Sends a MIDI event packet to the host. If no host is connected, the event packet is discarded.
*
* \note This function must only be called when the Device state machine is in the DEVICE_STATE_Configured state or
@@ -137,6 +130,18 @@ bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo,
MIDI_EventPacket_t* const Event) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+ /* Inline Functions: */
+ /** General management task for a given MIDI class interface, required for the correct operation of the interface. This should
+ * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
+ *
+ * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state
+ */
+ static inline void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo);
+ static inline void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
+ {
+ (void)MIDIInterfaceInfo;
+ }
+
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
diff --git a/LUFA/Drivers/USB/Class/Host/HID.c b/LUFA/Drivers/USB/Class/Host/HID.c index e297ee5a75..3cd939411b 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.c +++ b/LUFA/Drivers/USB/Class/Host/HID.c @@ -150,11 +150,6 @@ static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescri return DESCRIPTOR_SEARCH_NotFound;
}
-void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)
-{
- (void)HIDInterfaceInfo;
-}
-
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, const uint8_t ReportID, void* Buffer)
{
diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h index 72478c2e63..3aaf809fd7 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.h +++ b/LUFA/Drivers/USB/Class/Host/HID.h @@ -130,14 +130,6 @@ };
/* Function Prototypes: */
- /** General management task for a given Human Interface Class host class interface, required for the correct operation of
- * the interface. This should be called frequently in the main program loop, before the master USB management task
- * \ref USB_USBTask().
- *
- * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state
- */
- void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
/** Host interface configuration routine, to configure a given HID host interface instance using the Configuration
* Descriptor read from an attached USB device. This function automatically updates the given HID Host instance's
* state values and configures the pipes required to communicate with the interface if it is found within the
@@ -261,6 +253,19 @@ uint8_t HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
#endif
+ /* Inline Functions: */
+ /** General management task for a given Human Interface Class host class interface, required for the correct operation of
+ * the interface. This should be called frequently in the main program loop, before the master USB management task
+ * \ref USB_USBTask().
+ *
+ * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state
+ */
+ static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo);
+ static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)
+ {
+ (void)HIDInterfaceInfo;
+ }
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.c b/LUFA/Drivers/USB/Class/Host/MIDI.c index 62f66c3799..3cb0df6fb6 100644 --- a/LUFA/Drivers/USB/Class/Host/MIDI.c +++ b/LUFA/Drivers/USB/Class/Host/MIDI.c @@ -122,11 +122,6 @@ static uint8_t DComp_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const Current return DESCRIPTOR_SEARCH_NotFound;
}
-void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
-{
- (void)MIDIInterfaceInfo;
-}
-
uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
{
if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive))
diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.h b/LUFA/Drivers/USB/Class/Host/MIDI.h index 2a64dc099f..b1971b16de 100644 --- a/LUFA/Drivers/USB/Class/Host/MIDI.h +++ b/LUFA/Drivers/USB/Class/Host/MIDI.h @@ -97,13 +97,6 @@ };
/* Function Prototypes: */
- /** General management task for a given MIDI host class interface, required for the correct operation of the interface. This should
- * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
- *
- * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing an MIDI Class host configuration and state
- */
- void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
/** Host interface configuration routine, to configure a given MIDI host interface instance using the Configuration
* Descriptor read from an attached USB device. This function automatically updates the given MIDI Host instance's
* state values and configures the pipes required to communicate with the interface if it is found within the device.
@@ -144,7 +137,19 @@ */
bool MIDI_Host_ReceiveEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo,
MIDI_EventPacket_t* const Event) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
-
+
+ /* Inline Functions: */
+ /** General management task for a given MIDI host class interface, required for the correct operation of the interface. This should
+ * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
+ *
+ * \param[in,out] MIDIInterfaceInfo Pointer to a structure containing an MIDI Class host configuration and state
+ */
+ static inline void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo);
+ static inline void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
+ {
+ (void)MIDIInterfaceInfo;
+ }
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.c b/LUFA/Drivers/USB/Class/Host/MassStorage.c index c3390a59ca..7a302632bf 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.c +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.c @@ -127,11 +127,6 @@ static uint8_t DComp_NextMSInterfaceEndpoint(void* const CurrentDescriptor) return DESCRIPTOR_SEARCH_NotFound;
}
-void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
-{
- (void)MSInterfaceInfo;
-}
-
static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, MS_CommandBlockWrapper_t* const SCSICommandBlock,
void* BufferPtr)
{
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h index 7c304097b0..6dda5c0a94 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h @@ -113,14 +113,6 @@ };
/* Function Prototypes: */
- /** General management task for a given Mass Storage host class interface, required for the correct operation of
- * the interface. This should be called frequently in the main program loop, before the master USB management task
- * \ref USB_USBTask().
- *
- * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state
- */
- void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
/** Host interface configuration routine, to configure a given Mass Storage host interface instance using the
* Configuration Descriptor read from an attached USB device. This function automatically updates the given Mass
* Storage Host instance's state values and configures the pipes required to communicate with the interface if it
@@ -269,6 +261,19 @@ const uint32_t BlockAddress, const uint8_t Blocks, const uint16_t BlockSize,
void* BlockBuffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6);
+ /* Inline Functions: */
+ /** General management task for a given Mass Storage host class interface, required for the correct operation of
+ * the interface. This should be called frequently in the main program loop, before the master USB management task
+ * \ref USB_USBTask().
+ *
+ * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state
+ */
+ static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo);
+ static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
+ {
+ (void)MSInterfaceInfo;
+ }
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.c b/LUFA/Drivers/USB/Class/Host/Printer.c index 6b59638a35..d1fb7c91c5 100644 --- a/LUFA/Drivers/USB/Class/Host/Printer.c +++ b/LUFA/Drivers/USB/Class/Host/Printer.c @@ -122,11 +122,6 @@ static uint8_t DComp_NextPRNTInterfaceEndpoint(void* CurrentDescriptor) return DESCRIPTOR_SEARCH_NotFound;
}
-void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
-{
- (void)PRNTInterfaceInfo;
-}
-
uint8_t PRNT_Host_SetBidirectionalMode(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
{
if (PRNTInterfaceInfo->State.AlternateSetting)
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.h b/LUFA/Drivers/USB/Class/Host/Printer.h index c424dafab2..06a1f8433c 100644 --- a/LUFA/Drivers/USB/Class/Host/Printer.h +++ b/LUFA/Drivers/USB/Class/Host/Printer.h @@ -100,15 +100,6 @@ };
/* Function Prototypes: */
- /** General management task for a given Printer host class interface, required for the correct operation of
- * the interface. This should be called frequently in the main program loop, before the master USB management task
- * \ref USB_USBTask().
- *
- * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state
- */
- void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
-
/** Host interface configuration routine, to configure a given Printer host interface instance using the
* Configuration Descriptor read from an attached USB device. This function automatically updates the given Printer
* instance's state values and configures the pipes required to communicate with the interface if it is found within
@@ -184,6 +175,19 @@ uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, char* DeviceIDString,
uint16_t BufferSize) ATTR_NON_NULL_PTR_ARG(1);
+ /* Inline Functions: */
+ /** General management task for a given Printer host class interface, required for the correct operation of
+ * the interface. This should be called frequently in the main program loop, before the master USB management task
+ * \ref USB_USBTask().
+ *
+ * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state
+ */
+ static inline void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo);
+ static inline void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
+ {
+ (void)PRNTInterfaceInfo;
+ }
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.c b/LUFA/Drivers/USB/Class/Host/RNDIS.c index 1116178371..46aeb98500 100644 --- a/LUFA/Drivers/USB/Class/Host/RNDIS.c +++ b/LUFA/Drivers/USB/Class/Host/RNDIS.c @@ -205,11 +205,6 @@ static uint8_t DComp_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDe return DESCRIPTOR_SEARCH_NotFound;
}
-void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo)
-{
- (void)RNDISInterfaceInfo;
-}
-
static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
void* Buffer, uint16_t Length)
{
diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.h b/LUFA/Drivers/USB/Class/Host/RNDIS.h index fad27b9ad1..fc9b4b325d 100644 --- a/LUFA/Drivers/USB/Class/Host/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Host/RNDIS.h @@ -120,13 +120,6 @@ #define RNDIS_COMMAND_FAILED 0xC0
/* Function Prototypes: */
- /** General management task for a given RNDIS host class interface, required for the correct operation of the interface. This should
- * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
- *
- * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state
- */
- void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
/** Host interface configuration routine, to configure a given RNDIS host interface instance using the Configuration
* Descriptor read from an attached USB device. This function automatically updates the given RNDIS Host instance's
* state values and configures the pipes required to communicate with the interface if it is found within the device.
@@ -229,6 +222,18 @@ uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, uint16_t PacketLength)
ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+ /* Inline Functions: */
+ /** General management task for a given RNDIS host class interface, required for the correct operation of the interface. This should
+ * be called frequently in the main program loop, before the master USB management task \ref USB_USBTask().
+ *
+ * \param[in,out] RNDISInterfaceInfo Pointer to a structure containing an RNDIS Class host configuration and state
+ */
+ static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo);
+ static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo)
+ {
+ (void)RNDISInterfaceInfo;
+ }
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.c b/LUFA/Drivers/USB/Class/Host/StillImage.c index 24b76b93cb..2f5addaa1d 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImage.c +++ b/LUFA/Drivers/USB/Class/Host/StillImage.c @@ -142,11 +142,6 @@ uint8_t DComp_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor) return DESCRIPTOR_SEARCH_NotFound;
}
-void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
-{
- (void)SIInterfaceInfo;
-}
-
uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader)
{
uint8_t ErrorCode;
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.h b/LUFA/Drivers/USB/Class/Host/StillImage.h index 9b655967f5..b6a24757cb 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImage.h +++ b/LUFA/Drivers/USB/Class/Host/StillImage.h @@ -108,15 +108,6 @@ };
/* Function Prototypes: */
- /** General management task for a given Still Image host class interface, required for the correct operation of the
- * interface. This should be called frequently in the main program loop, before the master USB management task
- * \ref USB_USBTask().
- *
- * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state
- */
- void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
-
-
/** Host interface configuration routine, to configure a given Still Image host interface instance using the
* Configuration Descriptor read from an attached USB device. This function automatically updates the given Still
* Image Host instance's state values and configures the pipes required to communicate with the interface if it is
@@ -268,7 +259,20 @@ */
uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, void* Buffer,
const uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
-
+
+ /* Inline Functions: */
+ /** General management task for a given Still Image host class interface, required for the correct operation of the
+ * interface. This should be called frequently in the main program loop, before the master USB management task
+ * \ref USB_USBTask().
+ *
+ * \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state
+ */
+ static inline void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo);
+ static inline void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
+ {
+ (void)SIInterfaceInfo;
+ }
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 03c19b4a4b..7d75907e20 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -22,6 +22,7 @@ * reset
* - Changed over the MassStorageKeyboard Class driver device demo to use Start of Frame events rather than a timer to keep track
* of elapsed milliseconds
+ * - Inlined currently unused (but standardized) maintenance functions in the Device and Host Class drivers to save space
*
* <b>Fixed:</b>
* - Fixed AVRISP project not able to enter programming mode when ISP protocol is used
diff --git a/LUFA/ManPages/LibraryResources.txt b/LUFA/ManPages/LibraryResources.txt index 7ba267fa5b..6bc06abbad 100644 --- a/LUFA/ManPages/LibraryResources.txt +++ b/LUFA/ManPages/LibraryResources.txt @@ -10,7 +10,7 @@ * Project Homepage: http://www.fourwalledcubicle.com/LUFA.php \n
* Development Blog: http://www.fourwalledcubicle.com/blog \n
* Discussion Group: http://groups.google.com/group/myusb-support-list \n
- * SVN Access, Bug Reports and Feature Requests: http://code.google.com/p/lufa-lib/ \n
+ * Official Releases, SVN Access, Issue Tracker: http://code.google.com/p/lufa-lib/ \n
* Git Access: http://github.com/abcminiuser/lufa-lib
* Commit RSS: http://github.com/feeds/abcminiuser/commits/lufa-lib/master
* Author's Website: http://www.fourwalledcubicle.com \n
|