Update config.c
[inav.git] / cmake / stm32h7-usb.cmake
blobaf6123b493bfa3aeb34649cd3520d83fcdf24b71
1 set(STM32H7_USBCORE_DIR "${MAIN_LIB_DIR}/main/STM32H7/Middlewares/ST/STM32_USB_Device_Library/Core")
2 set(STM32H7_USBCORE_SRC
3     usbd_core.c
4     usbd_ctlreq.c
5     usbd_ioreq.c
7 list(TRANSFORM STM32H7_USBCORE_SRC PREPEND "${STM32H7_USBCORE_DIR}/Src/")
9 set(STM32H7_USBCDC_DIR "${MAIN_LIB_DIR}/main/STM32H7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC")
10 set(STM32H7_USBCDC_SRC
11     usbd_cdc.c
13 list(TRANSFORM STM32H7_USBCDC_SRC PREPEND "${STM32H7_USBCDC_DIR}/Src/")
15 set(STM32H7_USBHID_DIR "${MAIN_LIB_DIR}/main/STM32H7/Middlewares/ST/STM32_USB_Device_Library/Class/HID")
16 set(STM32H7_USBHID_SRC
17     usbd_hid.c
19 list(TRANSFORM STM32H7_USBHID_SRC PREPEND "${STM32H7_USBHID_DIR}/Src/")
21 set(STM32H7_USBMSC_DIR "${MAIN_LIB_DIR}/main/STM32H7/Middlewares/ST/STM32_USB_Device_Library/Class/MSC")
22 set(STM32H7_USBMSC_SRC
23     usbd_msc.c
24     usbd_msc_bot.c
25     usbd_msc_data.c
26     usbd_msc_scsi.c
28 list(TRANSFORM STM32H7_USBMSC_SRC PREPEND "${STM32H7_USBMSC_DIR}/Src/")
30 set(STM32H7_USB_INCLUDE_DIRS
31     "${STM32H7_USBCORE_DIR}/Inc"
32     "${STM32H7_USBCDC_DIR}/Inc"
33     "${STM32H7_USBHID_DIR}/Inc"
34     "${STM32H7_USBMSC_DIR}/Inc"
37 list(APPEND STM32H7_USB_SRC ${STM32H7_USBCORE_SRC})
38 list(APPEND STM32H7_USB_SRC ${STM32H7_USBCDC_SRC})
39 list(APPEND STM32H7_USB_SRC ${STM32H7_USBHID_SRC})
40 #XXX: Not working yet
41 #list(APPEND STM32H7_USB_SRC ${STM32H7_USBMSC_SRC})