forked from iNavFlight/inav
-
Notifications
You must be signed in to change notification settings - Fork 2
/
stm32f7-usb.cmake
48 lines (42 loc) · 1.62 KB
/
stm32f7-usb.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
set(STM32F7_USBCORE_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Core")
set(STM32F7_USBCORE_SRC
usbd_core.c
usbd_ctlreq.c
usbd_ioreq.c
)
list(TRANSFORM STM32F7_USBCORE_SRC PREPEND "${STM32F7_USBCORE_DIR}/Src/")
set(STM32F7_USBCDC_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC")
set(STM32F7_USBCDC_SRC
usbd_cdc.c
)
list(TRANSFORM STM32F7_USBCDC_SRC PREPEND "${STM32F7_USBCDC_DIR}/Src/")
set(STM32F7_USBHID_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Class/HID")
set(STM32F7_USBHID_SRC
usbd_hid.c
)
list(TRANSFORM STM32F7_USBHID_SRC PREPEND "${STM32F7_USBHID_DIR}/Src/")
set(STM32F7_USBCDCHID_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_HID")
set(STM32F7_USBCDCHID_SRC
usbd_cdc_hid.c
)
list(TRANSFORM STM32F7_USBCDCHID_SRC PREPEND "${STM32F7_USBCDCHID_DIR}/Src/")
set(STM32F7_USBMSC_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Class/MSC")
set(STM32F7_USBMSC_SRC
usbd_msc.c
usbd_msc_bot.c
usbd_msc_data.c
usbd_msc_scsi.c
)
list(TRANSFORM STM32F7_USBMSC_SRC PREPEND "${STM32F7_USBMSC_DIR}/Src/")
set(STM32F7_USB_INCLUDE_DIRS
"${STM32F7_USBCORE_DIR}/Inc"
"${STM32F7_USBCDC_DIR}/Inc"
"${STM32F7_USBHID_DIR}/Inc"
"${STM32F7_USBCDCHID_DIR}/Inc"
"${STM32F7_USBMSC_DIR}/Inc"
)
list(APPEND STM32F7_USB_SRC ${STM32F7_USBCORE_SRC})
list(APPEND STM32F7_USB_SRC ${STM32F7_USBCDC_SRC})
list(APPEND STM32F7_USB_SRC ${STM32F7_USBHID_SRC})
list(APPEND STM32F7_USB_SRC ${STM32F7_USBCDCHID_SRC})
list(APPEND STM32F7_USB_SRC ${STM32F7_USBMSC_SRC})