/** ****************************************************************************** * @file USB_Device/DFU_Standalone/Inc/usbd_conf.h * @author MCD Application Team * @brief General low level driver configuration ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... *//* Define to prevent recursive inclusion -------------------------------------*/#ifndef__USBD_CONF_H#define__USBD_CONF_H/* Includes ------------------------------------------------------------------*/#include"stm32f4xx_hal.h"#include<stdio.h>#include<stdlib.h>#include<string.h>Includes/* Exported types ------------------------------------------------------------*//* Exported constants --------------------------------------------------------*//* Common Config *//* Maximum number of supported media : Flash */#defineUSBD_MAX_NUM_INTERFACES1#defineUSBD_MAX_NUM_CONFIGURATION1#defineUSBD_MAX_STR_DESC_SIZ0x100#defineUSBD_SUPPORT_USER_STRING_DESC1#defineUSBD_SELF_POWERED1#defineUSBD_DEBUG_LEVEL0/* DFU Class Config */#defineUSBD_DFU_MAX_ITF_NUM1#defineUSBD_DFU_XFER_SIZE1024/* Max DFU Packet Size = 1024 bytes */#defineUSBD_DFU_APP_DEFAULT_ADD0x08008000/* The first 3 sectors (48 KB) are reserved for DFU code */#defineUSBD_DFU_MAX_NB_OF_SECTORS12/* Max number of sectors: 12 sectors in Bank1 */10 definesExported constants/* Exported macro ------------------------------------------------------------*//* Memory management macros */void*USBD_static_malloc(uint32_tsize);voidUSBD_static_free(void*p);#defineMAX_STATIC_ALLOC_SIZE262/*MSC Class Driver Structure size*/#defineUSBD_malloc(void*)USBD_static_malloc#defineUSBD_freeUSBD_static_free#defineUSBD_memsetmemset#defineUSBD_memcpymemcpy#defineUSBD_DelayHAL_Delay6 defines/* DEBUG macros */#if(USBD_DEBUG_LEVEL>0)#defineUSBD_UsrLog(...)printf(__VA_ARGS__);\printf("\n");.../* ... */#else#defineUSBD_UsrLog(...)#endif#if(USBD_DEBUG_LEVEL>1)#defineUSBD_ErrLog(...)printf("ERROR: ");\printf(__VA_ARGS__);\printf("\n");.../* ... */#else#defineUSBD_ErrLog(...)#endif#if(USBD_DEBUG_LEVEL>2)#defineUSBD_DbgLog(...)printf("DEBUG : ");\printf(__VA_ARGS__);\printf("\n");.../* ... */#else#defineUSBD_DbgLog(...)#endifExported macro/* Exported functions ------------------------------------------------------- *//* ... */#endif/* __USBD_CONF_H */