Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
circuitpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
circuitpython
Commits
78602a21
Commit
78602a21
authored
Sep 20, 2017
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/usbdev: Make the USBD callback struct const so it can go in ROM.
parent
fc9a6dd0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
ports/stm32/usbdev/class/inc/usbd_cdc_msc_hid.h
ports/stm32/usbdev/class/inc/usbd_cdc_msc_hid.h
+1
-1
ports/stm32/usbdev/class/src/usbd_cdc_msc_hid.c
ports/stm32/usbdev/class/src/usbd_cdc_msc_hid.c
+1
-1
ports/stm32/usbdev/core/inc/usbd_core.h
ports/stm32/usbdev/core/inc/usbd_core.h
+1
-1
ports/stm32/usbdev/core/inc/usbd_def.h
ports/stm32/usbdev/core/inc/usbd_def.h
+1
-1
ports/stm32/usbdev/core/src/usbd_core.c
ports/stm32/usbdev/core/src/usbd_core.c
+1
-1
No files found.
ports/stm32/usbdev/class/inc/usbd_cdc_msc_hid.h
View file @
78602a21
...
...
@@ -96,7 +96,7 @@ extern const uint8_t USBD_HID_MOUSE_ReportDesc[USBD_HID_MOUSE_REPORT_DESC_SIZE];
extern
const
uint8_t
USBD_HID_KEYBOARD_ReportDesc
[
USBD_HID_KEYBOARD_REPORT_DESC_SIZE
];
extern
USBD_ClassTypeDef
USBD_CDC_MSC_HID
;
extern
const
USBD_ClassTypeDef
USBD_CDC_MSC_HID
;
// returns 0 on success, -1 on failure
int
USBD_SelectMode
(
uint32_t
mode
,
USBD_HID_ModeInfoTypeDef
*
hid_info
);
...
...
ports/stm32/usbdev/class/src/usbd_cdc_msc_hid.c
View file @
78602a21
...
...
@@ -1112,7 +1112,7 @@ uint8_t USBD_HID_ClearNAK(USBD_HandleTypeDef *pdev) {
}
// CDC/MSC/HID interface class callback structure
USBD_ClassTypeDef
USBD_CDC_MSC_HID
=
{
const
USBD_ClassTypeDef
USBD_CDC_MSC_HID
=
{
USBD_CDC_MSC_HID_Init
,
USBD_CDC_MSC_HID_DeInit
,
USBD_CDC_MSC_HID_Setup
,
...
...
ports/stm32/usbdev/core/inc/usbd_core.h
View file @
78602a21
...
...
@@ -88,7 +88,7 @@ USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *
USBD_StatusTypeDef
USBD_DeInit
(
USBD_HandleTypeDef
*
pdev
);
USBD_StatusTypeDef
USBD_Start
(
USBD_HandleTypeDef
*
pdev
);
USBD_StatusTypeDef
USBD_Stop
(
USBD_HandleTypeDef
*
pdev
);
USBD_StatusTypeDef
USBD_RegisterClass
(
USBD_HandleTypeDef
*
pdev
,
USBD_ClassTypeDef
*
pclass
);
USBD_StatusTypeDef
USBD_RegisterClass
(
USBD_HandleTypeDef
*
pdev
,
const
USBD_ClassTypeDef
*
pclass
);
USBD_StatusTypeDef
USBD_RunTestMode
(
USBD_HandleTypeDef
*
pdev
);
USBD_StatusTypeDef
USBD_SetClassConfig
(
USBD_HandleTypeDef
*
pdev
,
uint8_t
cfgidx
);
...
...
ports/stm32/usbdev/core/inc/usbd_def.h
View file @
78602a21
...
...
@@ -235,7 +235,7 @@ typedef struct _USBD_HandleTypeDef
USBD_SetupReqTypedef
request
;
USBD_DescriptorsTypeDef
*
pDesc
;
USBD_ClassTypeDef
*
pClass
;
const
USBD_ClassTypeDef
*
pClass
;
void
*
pClassData
;
void
*
pUserData
;
void
*
pData
;
...
...
ports/stm32/usbdev/core/src/usbd_core.c
View file @
78602a21
...
...
@@ -155,7 +155,7 @@ USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev)
* @param pclass: Class handle
* @retval USBD Status
*/
USBD_StatusTypeDef
USBD_RegisterClass
(
USBD_HandleTypeDef
*
pdev
,
USBD_ClassTypeDef
*
pclass
)
USBD_StatusTypeDef
USBD_RegisterClass
(
USBD_HandleTypeDef
*
pdev
,
const
USBD_ClassTypeDef
*
pclass
)
{
USBD_StatusTypeDef
status
=
USBD_OK
;
if
(
pclass
!=
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment