diff --git a/firmware/hw_layer/mass_storage/usb_msd_cfg.c b/firmware/hw_layer/mass_storage/usb_msd_cfg.c index 6421ce7ace..5d8d7a02ef 100644 --- a/firmware/hw_layer/mass_storage/usb_msd_cfg.c +++ b/firmware/hw_layer/mass_storage/usb_msd_cfg.c @@ -19,6 +19,8 @@ #include "hal_usb_msd.h" #include "usb_msd_cfg.h" +#if HAL_USE_USB_MSD + /* * must be 64 for full speed and 512 for high speed */ @@ -228,3 +230,4 @@ const USBConfig msdusbcfg = { NULL }; +#endif /* HAL_USE_USB_MSD */ diff --git a/firmware/hw_layer/mmc_card.cpp b/firmware/hw_layer/mmc_card.cpp index a4c24be903..5f9186f5e9 100644 --- a/firmware/hw_layer/mmc_card.cpp +++ b/firmware/hw_layer/mmc_card.cpp @@ -54,10 +54,11 @@ EXTERN_ENGINE; extern board_configuration_s *boardConfiguration; +#if HAL_USE_USB_MSD //static USBDriver *ms_usb_driver = &USBD1; //static USBMassStorageDriver UMSD1; extern const USBConfig msdusbcfg; - +#endif /* HAL_USE_USB_MSD */ #define PUSHPULLDELAY 500