From 3c1b1001f98989679de6407f56901841c5295a9d Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Mon, 30 Jan 2012 23:01:19 -0500 Subject: [PATCH] f4 usb: Allow USB descriptors to be const through ST APIs --- .../STM32_USB_OTG_Driver/inc/usb_core.h | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/flight/PiOS/STM32F4xx/Libraries/STM32_USB_OTG_Driver/inc/usb_core.h b/flight/PiOS/STM32F4xx/Libraries/STM32_USB_OTG_Driver/inc/usb_core.h index 671592501..0a966a5d3 100644 --- a/flight/PiOS/STM32F4xx/Libraries/STM32_USB_OTG_Driver/inc/usb_core.h +++ b/flight/PiOS/STM32F4xx/Libraries/STM32_USB_OTG_Driver/inc/usb_core.h @@ -182,13 +182,13 @@ typedef struct usb_setup_req { typedef struct _Device_TypeDef { - uint8_t *(*GetDeviceDescriptor)( uint8_t speed , uint16_t *length); - uint8_t *(*GetLangIDStrDescriptor)( uint8_t speed , uint16_t *length); - uint8_t *(*GetManufacturerStrDescriptor)( uint8_t speed , uint16_t *length); - uint8_t *(*GetProductStrDescriptor)( uint8_t speed , uint16_t *length); - uint8_t *(*GetSerialStrDescriptor)( uint8_t speed , uint16_t *length); - uint8_t *(*GetConfigurationStrDescriptor)( uint8_t speed , uint16_t *length); - uint8_t *(*GetInterfaceStrDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetDeviceDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetLangIDStrDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetManufacturerStrDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetProductStrDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetSerialStrDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetConfigurationStrDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetInterfaceStrDescriptor)( uint8_t speed , uint16_t *length); } USBD_DEVICE, *pUSBD_DEVICE; typedef struct USB_OTG_hPort @@ -216,13 +216,13 @@ typedef struct _Device_cb uint8_t (*IsoINIncomplete) (void *pdev); uint8_t (*IsoOUTIncomplete) (void *pdev); - uint8_t *(*GetConfigDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetConfigDescriptor)( uint8_t speed , uint16_t *length); #ifdef USB_OTG_HS_CORE - uint8_t *(*GetOtherConfigDescriptor)( uint8_t speed , uint16_t *length); + const uint8_t *(*GetOtherConfigDescriptor)( uint8_t speed , uint16_t *length); #endif #ifdef USB_SUPPORT_USER_STRING_DESC - uint8_t *(*GetUsrStrDescriptor)( uint8_t speed ,uint8_t index, uint16_t *length); + const uint8_t *(*GetUsrStrDescriptor)( uint8_t speed ,uint8_t index, uint16_t *length); #endif } USBD_Class_cb_TypeDef;