Minor bootloader tweaks; make some functions static where possible to reduce the...
[pub/USBasp.git] / LUFA / Drivers / USB / Core / HostStandardReq.h
index 92b37f8..d076a8a 100644 (file)
@@ -69,7 +69,7 @@
                                 */
                                #define USB_HOST_TIMEOUT_MS                1000
                        #endif
-                       
+
                /* Enums: */
                        /** Enum for the \ref USB_Host_SendControlRequest() return code, indicating the reason for the error
                         *  if the transfer of the request is unsuccessful.
                         *  \ingroup Group_Host
                         */
                        extern uint8_t USB_Host_ConfigurationNumber;
-                       
+
                /* Function Prototypes: */
                        /** Sends the request stored in the \ref USB_ControlRequest global structure to the attached device,
                         *  and transfers the data stored in the buffer to the device, or from the device to the buffer
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
                        uint8_t USB_Host_SetDeviceConfiguration(const uint8_t ConfigNumber);
-                       
+
                        /** Sends a GET CONFIGURATION standard request to the attached device, to retrieve the currently selected
                         *  device configuration index.
                         *
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
+                       static inline uint8_t USB_Host_GetDeviceDescriptor(USB_Descriptor_Device_t* const DeviceDescriptorPtr) ATTR_NON_NULL_PTR_ARG(1);
                        static inline uint8_t USB_Host_GetDeviceDescriptor(USB_Descriptor_Device_t* const DeviceDescriptorPtr)
                        {
                                return USB_Host_GetDescriptor(DTYPE_Device, 0, DeviceDescriptorPtr, sizeof(USB_Descriptor_Device_t));
                        }
-                       
+
                        /** Sends a GET DESCRIPTOR standard request to the attached device, requesting the string descriptor
                         *  of the specified index. This can be used to easily retrieve string descriptors from the device by
                         *  index, after the index is obtained from the Device or Configuration descriptors. This is a convenience
                         */
                        static inline uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
                                                                                 void* const Buffer,
+                                                                                const uint8_t BufferLength) ATTR_NON_NULL_PTR_ARG(2);
+                       static inline uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
+                                                                                void* const Buffer,
                                                                                 const uint8_t BufferLength)
                        {
                                return USB_Host_GetDescriptor(DTYPE_String, Index,  Buffer, BufferLength);