Cleanup
[inav.git] / cmake / stm32f7-usb.cmake
blobb57f49e13ac3a45c293a60e732fb7c7e942a9853
1 set(STM32F7_USBCORE_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Core")
2 set(STM32F7_USBCORE_SRC
3     usbd_core.c
4     usbd_ctlreq.c
5     usbd_ioreq.c
7 list(TRANSFORM STM32F7_USBCORE_SRC PREPEND "${STM32F7_USBCORE_DIR}/Src/")
9 set(STM32F7_USBCDC_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC")
10 set(STM32F7_USBCDC_SRC
11     usbd_cdc.c
13 list(TRANSFORM STM32F7_USBCDC_SRC PREPEND "${STM32F7_USBCDC_DIR}/Src/")
15 set(STM32F7_USBHID_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Class/HID")
16 set(STM32F7_USBHID_SRC
17     usbd_hid.c
19 list(TRANSFORM STM32F7_USBHID_SRC PREPEND "${STM32F7_USBHID_DIR}/Src/")
21 set(STM32F7_USBCDCHID_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_HID")
22 set(STM32F7_USBCDCHID_SRC
23     usbd_cdc_hid.c
25 list(TRANSFORM STM32F7_USBCDCHID_SRC PREPEND "${STM32F7_USBCDCHID_DIR}/Src/")
27 set(STM32F7_USBMSC_DIR "${MAIN_LIB_DIR}/main/STM32F7/Middlewares/ST/STM32_USB_Device_Library/Class/MSC")
28 set(STM32F7_USBMSC_SRC
29     usbd_msc.c
30     usbd_msc_bot.c
31     usbd_msc_data.c
32     usbd_msc_scsi.c
34 list(TRANSFORM STM32F7_USBMSC_SRC PREPEND "${STM32F7_USBMSC_DIR}/Src/")
36 set(STM32F7_USB_INCLUDE_DIRS
37     "${STM32F7_USBCORE_DIR}/Inc"
38     "${STM32F7_USBCDC_DIR}/Inc"
39     "${STM32F7_USBHID_DIR}/Inc"
40     "${STM32F7_USBCDCHID_DIR}/Inc"
41     "${STM32F7_USBMSC_DIR}/Inc"
44 list(APPEND STM32F7_USB_SRC ${STM32F7_USBCORE_SRC})
45 list(APPEND STM32F7_USB_SRC ${STM32F7_USBCDC_SRC})
46 list(APPEND STM32F7_USB_SRC ${STM32F7_USBHID_SRC})
47 list(APPEND STM32F7_USB_SRC ${STM32F7_USBCDCHID_SRC})
48 list(APPEND STM32F7_USB_SRC ${STM32F7_USBMSC_SRC})