Merge remote-tracking branch 'origin/master' into mmosca-mavlinkrc
[inav.git] / cmake / at32f4-usb.cmake
blob1806fcf3f07406ef29fbe4bb8c52fa00338c7439
1 set(AT32_USBCORE_DIR "${MAIN_LIB_DIR}/main/AT32F43x/Middlewares/AT/AT32_USB_Device_Library/Core")
2 set(AT32_USBCDC_DIR "${MAIN_LIB_DIR}/main/AT32F43x/Middlewares/AT/AT32_USB_Device_Library/Class/usbd_class/cdc")
3 set(AT32_USBMSC_DIR "${MAIN_LIB_DIR}/main/AT32F43x/Middlewares/AT/AT32_USB_Device_Library/Class/usbd_class/msc")
5 set(AT32F4_USB_INCLUDE_DIRS
6     "${AT32_USBCORE_DIR}/Inc"
7     "${AT32_USBCDC_DIR}"
8     "${AT32_USBMSC_DIR}"
11 set(AT32_USBCORE_SRC
12     usb_core.c
13     usbd_core.c
14     usbd_int.c
15     usbd_sdr.c
17 list(TRANSFORM AT32_USBCORE_SRC PREPEND  "${AT32_USBCORE_DIR}/Src/")
20 set(AT32_USBCDC_SRC
21     "${AT32_USBCDC_DIR}/cdc_class.c"
22     "${AT32_USBCDC_DIR}/cdc_desc.c"
25 main_sources(AT32F4_VCP_SRC 
26     drivers/serial_usb_vcp_at32f43x.c 
27     drivers/usb_io.c
30 set(AT32F4_USBMSC_SRC
31     msc_desc.c
32     msc_class.c
33     msc_bot_scsi.c 
36 main_sources(AT32F4_MSC_SRC 
37     drivers/usb_msc_at32f43x.c 
40 list(TRANSFORM AT32F4_USBMSC_SRC PREPEND "${AT32_USBMSC_DIR}/")
41 list(APPEND AT32F4_USBMSC_SRC ${AT32F4_MSC_SRC})
43 list(APPEND AT32F4_USB_SRC ${AT32F4_VCP_SRC})
44 list(APPEND AT32F4_USB_SRC ${AT32_USBCORE_SRC})
45 list(APPEND AT32F4_USB_SRC ${AT32_USBCDC_SRC})