aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device')
-rw-r--r--Demos/Device/Incomplete/Sideshow/Descriptors.c6
-rw-r--r--Demos/Device/Incomplete/Sideshow/Sideshow.c7
-rw-r--r--Demos/Device/LowLevel/Mouse/Descriptors.c4
3 files changed, 9 insertions, 8 deletions
diff --git a/Demos/Device/Incomplete/Sideshow/Descriptors.c b/Demos/Device/Incomplete/Sideshow/Descriptors.c
index d10bcc8ab..8f4c7c532 100644
--- a/Demos/Device/Incomplete/Sideshow/Descriptors.c
+++ b/Demos/Device/Incomplete/Sideshow/Descriptors.c
@@ -213,8 +213,8 @@ uint16_t USB_GetOSFeatureDescriptor(const uint16_t wValue,
const uint8_t wIndex,
const void** const DescriptorAddress)
{
- void* Address = NULL;
- uint16_t Size = NO_DESCRIPTOR;
+ const void* Address = NULL;
+ uint16_t Size = NO_DESCRIPTOR;
/* Check if a device level OS feature descriptor is being requested */
if (wValue == 0x0000)
@@ -222,7 +222,7 @@ uint16_t USB_GetOSFeatureDescriptor(const uint16_t wValue,
/* Only the Extended Device Compatibility descriptor is supported */
if (wIndex == EXTENDED_COMPAT_ID_DESCRIPTOR)
{
- Address = (void*)&DevCompatIDs;
+ Address = &DevCompatIDs;
Size = sizeof(USB_OSCompatibleIDDescriptor_t);
}
}
diff --git a/Demos/Device/Incomplete/Sideshow/Sideshow.c b/Demos/Device/Incomplete/Sideshow/Sideshow.c
index 644e957fd..8b2842bdf 100644
--- a/Demos/Device/Incomplete/Sideshow/Sideshow.c
+++ b/Demos/Device/Incomplete/Sideshow/Sideshow.c
@@ -114,9 +114,10 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
case REQ_GetOSFeatureDescriptor:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_VENDOR | REQREC_DEVICE))
{
- void* DescriptorPointer;
- uint16_t DescriptorSize = USB_GetOSFeatureDescriptor(USB_ControlRequest.wValue, USB_ControlRequest.wIndex,
- &DescriptorPointer);
+ const void* DescriptorPointer;
+ uint16_t DescriptorSize = USB_GetOSFeatureDescriptor(USB_ControlRequest.wValue,
+ USB_ControlRequest.wIndex,
+ &DescriptorPointer);
if (DescriptorSize == NO_DESCRIPTOR)
return;
diff --git a/Demos/Device/LowLevel/Mouse/Descriptors.c b/Demos/Device/LowLevel/Mouse/Descriptors.c
index 66fdde148..70538fe5c 100644
--- a/Demos/Device/LowLevel/Mouse/Descriptors.c
+++ b/Demos/Device/LowLevel/Mouse/Descriptors.c
@@ -238,11 +238,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case DTYPE_HID:
- Address = (void*)&ConfigurationDescriptor.HID_MouseHID;
+ Address = &ConfigurationDescriptor.HID_MouseHID;
Size = sizeof(USB_Descriptor_HID_t);
break;
case DTYPE_Report:
- Address = (void*)&MouseReport;
+ Address = &MouseReport;
Size = sizeof(MouseReport);
break;
}