File usbh_conf.h¶
File List > external-docs > libDaisy > src > usbh > usbh_conf.h
Go to the documentation of this file
Source Code¶
/* USER CODE BEGIN Header */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBH_CONF__H__
#define __USBH_CONF__H__
#ifdef __cplusplus
extern "C"
{
#endif
/* Includes ------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// #include "main.h"
#include "stm32h7xx.h"
#include "stm32h7xx_hal.h"
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/*---------- -----------*/
#define USBH_MAX_NUM_ENDPOINTS 2U
/*---------- -----------*/
#define USBH_MAX_NUM_INTERFACES 2U
/*---------- -----------*/
#define USBH_MAX_NUM_CONFIGURATION 1U
/*---------- -----------*/
#define USBH_KEEP_CFG_DESCRIPTOR 1U
/*---------- -----------*/
#define USBH_MAX_NUM_SUPPORTED_CLASS 2U
/*---------- -----------*/
#define USBH_MAX_SIZE_CONFIGURATION 256U
/*---------- -----------*/
#define USBH_MAX_DATA_BUFFER 512U
/*---------- -----------*/
#define USBH_DEBUG_LEVEL 0U
/*---------- -----------*/
#define USBH_USE_OS 0U
/****************************************/
/* #define for FS and HS identification */
#define HOST_HS 0
#define HOST_FS 1
#if(USBH_USE_OS == 1)
#include "cmsis_os.h"
#define USBH_PROCESS_PRIO osPriorityNormal
#define USBH_PROCESS_STACK_SIZE ((uint16_t)0)
#endif /* (USBH_USE_OS == 1) */
/* Memory management macros */
#define USBH_malloc malloc
#define USBH_free free
#define USBH_memset memset
#define USBH_memcpy memcpy
/* DEBUG macros */
#if(USBH_DEBUG_LEVEL > 0U)
extern void USBH_LogPrint(const char* format, ...);
#define USBH_UsrLog(...) \
do \
{ \
USBH_LogPrint(__VA_ARGS__); \
USBH_LogPrint("\n"); \
} while(0)
#else
#define USBH_UsrLog(...) \
do \
{ \
} while(0)
#endif
#if(USBH_DEBUG_LEVEL > 1U)
#define USBH_ErrLog(...) \
do \
{ \
USBH_LogPrint("ERROR: "); \
USBH_LogPrint(__VA_ARGS__); \
USBH_LogPrint("\n"); \
} while(0)
#else
#define USBH_ErrLog(...) \
do \
{ \
} while(0)
#endif
#if(USBH_DEBUG_LEVEL > 2U)
#define USBH_DbgLog(...) \
do \
{ \
USBH_LogPrint("DEBUG : "); \
USBH_LogPrint(__VA_ARGS__); \
USBH_LogPrint("\n"); \
} while(0)
#else
#define USBH_DbgLog(...) \
do \
{ \
} while(0)
#endif
/* Exported functions -------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif /* __USBH_CONF__H__ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/