Descriptor processing routines now pass around void pointers rather than uint8_t pointers, as their destination datatype is know well known -- they are just streams of bytes until they are cast to the correct destination type by DESCRIPTOR_CAST.
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+\r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
\r
.HIDInterfaceProtocol = HID_NON_BOOT_PROTOCOL,\r
\r
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+\r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
\r
.HIDInterfaceProtocol = HID_BOOT_KEYBOARD_PROTOCOL,\r
},\r
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+\r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
\r
.HIDInterfaceProtocol = HID_NON_BOOT_PROTOCOL,\r
\r
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+ \r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
},\r
};\r
\r
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+ \r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
},\r
};\r
\r
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+ \r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
\r
.HIDInterfaceProtocol = HID_BOOT_MOUSE_PROTOCOL,\r
},\r
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+\r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
\r
.HIDInterfaceProtocol = HID_NON_BOOT_PROTOCOL,\r
\r
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+ \r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
},\r
};\r
\r
.Config =\r
{\r
.DataINPipeNumber = 1,\r
+ .DataINPipeDoubleBank = false,\r
+ \r
.DataOUTPipeNumber = 2,\r
+ .DataOUTPipeDoubleBank = false,\r
+ \r
.EventsPipeNumber = 3,\r
+ .EventsPipeDoubleBank = false,\r
},\r
};\r
\r
{\r
Endpoint_ClearSETUP();\r
\r
- AudioInterfaceInfo->State.InterfaceEnabled = (USB_ControlRequest.wValue != 0);\r
+ AudioInterfaceInfo->State.InterfaceEnabled = ((USB_ControlRequest.wValue & 0xFF) != 0);\r
\r
Endpoint_ClearStatusStage();\r
}\r
#include "CDC.h"\r
\r
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* ConfigDescriptorData)\r
+ void* ConfigDescriptorData)\r
{\r
uint8_t FoundEndpoints = 0;\r
\r
const struct\r
{\r
uint8_t DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe */\r
+ bool DataINPipeDoubleBank; /** Indicates if the CDC interface's IN data pipe should use double banking */\r
+\r
uint8_t DataOUTPipeNumber; /**< Pipe number of the CDC interface's OUT data pipe */\r
+ bool DataOUTPipeDoubleBank; /** Indicates if the CDC interface's OUT data pipe should use double banking */\r
+\r
uint8_t NotificationPipeNumber; /**< Pipe number of the CDC interface's IN notification endpoint, if used */ \r
+ bool NotificationPipeDoubleBank; /** Indicates if the CDC interface's notification pipe should use double banking */\r
} Config; /**< Config data for the USB class interface within the device. All elements in this section\r
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
*/\r
* \return A value from the \ref CDCHost_EnumerationFailure_ErrorCodes_t enum\r
*/\r
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
+ void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
\r
/** Sets the line encoding for the attached device's virtual serial port. This should be called when the LineEncoding\r
* values of the interface have been changed to push the new settings to the USB device.\r
#include "HID.h"\r
\r
uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* ConfigDescriptorData)\r
+ void* ConfigDescriptorData)\r
{\r
uint8_t FoundEndpoints = 0;\r
\r
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)\r
{\r
Pipe_ConfigurePipe(HIDInterfaceInfo->Config.DataINPipeNumber, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
- EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
+ EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
+ HIDInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
HIDInterfaceInfo->State.DataINPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= HID_FOUND_DATAPIPE_IN;\r
else\r
{\r
Pipe_ConfigurePipe(HIDInterfaceInfo->Config.DataOUTPipeNumber, EP_TYPE_INTERRUPT, PIPE_TOKEN_OUT,\r
- EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
+ EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
+ HIDInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
HIDInterfaceInfo->State.DataOUTPipeSize = EndpointData->EndpointSize;\r
\r
HIDInterfaceInfo->State.DeviceUsesOUTPipe = true;\r
const struct\r
{\r
uint8_t DataINPipeNumber; /**< Pipe number of the HID interface's IN data pipe */\r
+ bool DataINPipeDoubleBank; /** Indicates if the HID interface's IN data pipe should use double banking */\r
+\r
uint8_t DataOUTPipeNumber; /**< Pipe number of the HID interface's OUT data pipe */\r
+ bool DataOUTPipeDoubleBank; /** Indicates if the HID interface's OUT data pipe should use double banking */\r
\r
uint8_t HIDInterfaceProtocol; /**< HID interface protocol value to match against if a specific\r
* boot subclass protocol is required, either \ref HID_BOOT_MOUSE_PROTOCOL,\r
* \return A value from the \ref HIDHost_EnumerationFailure_ErrorCodes_t enum\r
*/\r
uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
+ void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
\r
\r
/** Receives a HID IN report from the attached HID device, when a report has been received on the HID IN Data pipe.\r
#include "MIDI.h"\r
\r
uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* ConfigDescriptorData)\r
+ void* ConfigDescriptorData)\r
{\r
uint8_t FoundEndpoints = 0;\r
\r
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)\r
{\r
Pipe_ConfigurePipe(MIDIInterfaceInfo->Config.DataINPipeNumber, EP_TYPE_BULK, PIPE_TOKEN_IN,\r
- EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
+ EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
+ MIDIInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
MIDIInterfaceInfo->State.DataINPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= MIDI_FOUND_DATAPIPE_IN;\r
else\r
{\r
Pipe_ConfigurePipe(MIDIInterfaceInfo->Config.DataOUTPipeNumber, EP_TYPE_BULK, PIPE_TOKEN_OUT,\r
- EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
+ EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
+ MIDIInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
MIDIInterfaceInfo->State.DataOUTPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= MIDI_FOUND_DATAPIPE_OUT;\r
const struct\r
{\r
uint8_t DataINPipeNumber; /**< Pipe number of the MIDI interface's streaming IN data pipe */\r
+ bool DataINPipeDoubleBank; /** Indicates if the MIDI interface's IN data pipe should use double banking */\r
+ \r
uint8_t DataOUTPipeNumber; /**< Pipe number of the MIDI interface's streaming OUT data pipe */\r
+ bool DataOUTPipeDoubleBank; /** Indicates if the MIDI interface's OUT data pipe should use double banking */\r
} Config; /**< Config data for the USB class interface within the device. All elements in this section\r
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
*/\r
* \return A value from the \ref MIDIHost_EnumerationFailure_ErrorCodes_t enum\r
*/\r
uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
+ void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
\r
/** Sends a MIDI event packet to the device. If no device is connected, the event packet is discarded.\r
*\r
#include "MassStorage.h"\r
\r
uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor)\r
+ void* DeviceConfigDescriptor)\r
{\r
uint8_t FoundEndpoints = 0;\r
\r
{\r
Pipe_ConfigurePipe(MSInterfaceInfo->Config.DataINPipeNumber, EP_TYPE_BULK, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
- PIPE_BANK_DOUBLE);\r
+ MSInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
MSInterfaceInfo->State.DataINPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= MS_FOUND_DATAPIPE_IN;\r
{\r
Pipe_ConfigurePipe(MSInterfaceInfo->Config.DataOUTPipeNumber, EP_TYPE_BULK, PIPE_TOKEN_OUT,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
- PIPE_BANK_DOUBLE);\r
+ MSInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
MSInterfaceInfo->State.DataOUTPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= MS_FOUND_DATAPIPE_OUT;\r
{\r
const struct\r
{\r
- uint8_t DataINPipeNumber; /**< Pipe number of the MS interface's IN data pipe */\r
- uint8_t DataOUTPipeNumber; /**< Pipe number of the MS interface's OUT data pipe */\r
+ uint8_t DataINPipeNumber; /**< Pipe number of the Mass Storage interface's IN data pipe */\r
+ bool DataINPipeDoubleBank; /** Indicates if the Mass Storage interface's IN data pipe should use double banking */\r
+\r
+ uint8_t DataOUTPipeNumber; /**< Pipe number of the Mass Storage interface's OUT data pipe */\r
+ bool DataOUTPipeDoubleBank; /** Indicates if the Mass Storage interface's OUT data pipe should use double banking */\r
} Config; /**< Config data for the USB class interface within the device. All elements in this section\r
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
*/\r
*/\r
uint8_t InterfaceNumber; /**< Interface index of the Mass Storage interface within the attached device */\r
\r
- uint16_t DataINPipeSize; /**< Size in bytes of the MS interface's IN data pipe */\r
- uint16_t DataOUTPipeSize; /**< Size in bytes of the MS interface's OUT data pipe */\r
+ uint16_t DataINPipeSize; /**< Size in bytes of the Mass Storage interface's IN data pipe */\r
+ uint16_t DataOUTPipeSize; /**< Size in bytes of the Mass Storage interface's OUT data pipe */\r
\r
uint32_t TransactionTag; /**< Current transaction tag for data synchronising of packets */\r
} State; /**< State data for the USB class interface within the device. All elements in this section\r
* \return A value from the \ref MSHost_EnumerationFailure_ErrorCodes_t enum\r
*/\r
uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
+ void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
\r
/** Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface\r
* and readying it for the next Mass Storage command.\r
#include "Printer.h"\r
\r
uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor)\r
+ void* DeviceConfigDescriptor)\r
{\r
uint8_t FoundEndpoints = 0;\r
\r
{\r
Pipe_ConfigurePipe(PRNTInterfaceInfo->Config.DataINPipeNumber, EP_TYPE_BULK, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
- PIPE_BANK_DOUBLE);\r
+ PRNTInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
PRNTInterfaceInfo->State.DataINPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= PRNT_FOUND_DATAPIPE_IN;\r
{\r
Pipe_ConfigurePipe(PRNTInterfaceInfo->Config.DataOUTPipeNumber, EP_TYPE_BULK, PIPE_TOKEN_OUT,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
- PIPE_BANK_DOUBLE);\r
+ PRNTInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
PRNTInterfaceInfo->State.DataOUTPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= PRNT_FOUND_DATAPIPE_OUT;\r
const struct\r
{\r
uint8_t DataINPipeNumber; /**< Pipe number of the Printer interface's IN data pipe */\r
+ bool DataINPipeDoubleBank; /** Indicates if the Printer interface's IN data pipe should use double banking */\r
+\r
uint8_t DataOUTPipeNumber; /**< Pipe number of the Printer interface's OUT data pipe */\r
+ bool DataOUTPipeDoubleBank; /** Indicates if the Printer interface's OUT data pipe should use double banking */\r
} Config; /**< Config data for the USB class interface within the device. All elements in this section\r
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
*/\r
* \return A value from the \ref PRNTHost_EnumerationFailure_ErrorCodes_t enum\r
*/\r
uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
+ void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
\r
/** Configures the printer to enable Bidirectional mode, if it is not already in this mode. This should be called\r
* once the connected device's configuration has been set, to ensure the printer is ready to accept commands.\r
#include "StillImage.h"\r
\r
uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor)\r
+ void* DeviceConfigDescriptor)\r
{\r
uint8_t FoundEndpoints = 0;\r
\r
{\r
Pipe_ConfigurePipe(SIInterfaceInfo->Config.EventsPipeNumber, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
- PIPE_BANK_DOUBLE); \r
+ SIInterfaceInfo->Config.EventsPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE); \r
SIInterfaceInfo->State.EventsPipeSize = EndpointData->EndpointSize;\r
\r
Pipe_SetInterruptPeriod(EndpointData->PollingIntervalMS);\r
{\r
Pipe_ConfigurePipe(SIInterfaceInfo->Config.DataINPipeNumber, EP_TYPE_BULK, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
- PIPE_BANK_DOUBLE);\r
+ SIInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
SIInterfaceInfo->State.DataINPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= SI_FOUND_DATAPIPE_IN;\r
{\r
Pipe_ConfigurePipe(SIInterfaceInfo->Config.DataOUTPipeNumber, EP_TYPE_BULK, PIPE_TOKEN_OUT,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
- PIPE_BANK_DOUBLE);\r
+ SIInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);\r
SIInterfaceInfo->State.DataOUTPipeSize = EndpointData->EndpointSize;\r
\r
FoundEndpoints |= SI_FOUND_DATAPIPE_OUT;\r
const struct\r
{\r
uint8_t DataINPipeNumber; /**< Pipe number of the Still Image interface's IN data pipe */\r
+ bool DataINPipeDoubleBank; /** Indicates if the Still Image interface's IN data pipe should use double banking */\r
+\r
uint8_t DataOUTPipeNumber; /**< Pipe number of the Still Image interface's OUT data pipe */\r
+ bool DataOUTPipeDoubleBank; /** Indicates if the Still Image interface's OUT data pipe should use double banking */\r
+\r
uint8_t EventsPipeNumber; /**< Pipe number of the Still Image interface's IN events endpoint, if used */ \r
+ bool EventsPipeDoubleBank; /** Indicates if the Still Image interface's events data pipe should use double banking */\r
} Config; /**< Config data for the USB class interface within the device. All elements in this section\r
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
*/\r
* \return A value from the \ref SIHost_EnumerationFailure_ErrorCodes_t enum\r
*/\r
uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, uint16_t ConfigDescriptorSize,\r
- uint8_t* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
+ void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1, 3);\r
\r
/** Opens a new PIMA session with the attached device. This should be used before any session-orientated PIMA commands\r
* are issued to the device. Only one session can be open at the one time.\r
#endif\r
\r
void USB_GetNextDescriptorOfType(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc,\r
+ void** const CurrConfigLoc,\r
const uint8_t Type)\r
{\r
while (*BytesRem)\r
}\r
\r
void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc,\r
+ void** const CurrConfigLoc,\r
const uint8_t Type,\r
const uint8_t BeforeType)\r
{\r
}\r
\r
void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc,\r
+ void** const CurrConfigLoc,\r
const uint8_t Type,\r
const uint8_t AfterType)\r
{\r
USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);\r
}\r
\r
-uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, uint8_t** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine)\r
+uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine)\r
{\r
uint8_t ErrorCode;\r
\r
* }\r
* \endcode\r
*/\r
- uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, uint8_t** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine);\r
+ uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** CurrConfigLoc, ConfigComparatorPtr_t ComparatorRoutine);\r
\r
/* Enums: */\r
/** Enum for the possible return codes of the \ref USB_GetDeviceConfigDescriptor() function. */\r
* \param[in] Type Descriptor type value to search for\r
*/\r
void USB_GetNextDescriptorOfType(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc,\r
+ void** const CurrConfigLoc,\r
const uint8_t Type)\r
ATTR_NON_NULL_PTR_ARG(1, 2);\r
\r
* \param[in] BeforeType Descriptor type value which must not be reached before the given Type descriptor\r
*/\r
void USB_GetNextDescriptorOfTypeBefore(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc,\r
+ void** const CurrConfigLoc,\r
const uint8_t Type,\r
const uint8_t BeforeType)\r
ATTR_NON_NULL_PTR_ARG(1, 2);\r
* \param[in] AfterType Descriptor type value which must be reached before the given Type descriptor\r
*/\r
void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc,\r
+ void** const CurrConfigLoc,\r
const uint8_t Type,\r
const uint8_t AfterType)\r
ATTR_NON_NULL_PTR_ARG(1, 2);\r
* \param[in,out] CurrConfigLoc Pointer to the current descriptor inside the configuration descriptor\r
*/\r
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc) \r
+ void** const CurrConfigLoc) \r
ATTR_NON_NULL_PTR_ARG(1, 2); \r
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,\r
- uint8_t** const CurrConfigLoc)\r
+ void** const CurrConfigLoc)\r
{\r
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;\r
\r
SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);\r
SignatureDescriptor.Header.Type = DTYPE_String;\r
\r
- uint8_t SigReadAddress = 0x0E;\r
+ uint8_t SigReadAddress = 0x0E;\r
\r
for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)\r
{\r
break;\r
#if !defined(CONTROL_ONLY_DEVICE)\r
case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT):\r
- Endpoint_SelectEndpoint((uint8_t)USB_ControlRequest.wIndex);\r
+ Endpoint_SelectEndpoint(USB_ControlRequest.wIndex & 0xFF);\r
\r
CurrentStatus = Endpoint_IsStalled();\r
\r