Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

175 lines
3.9 KiB

  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : usbd_conf.h
  5. * @version : v2.0_Cube
  6. * @brief : Header for usbd_conf.c file.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under Ultimate Liberty license
  14. * SLA0044, the "License"; You may not use this file except in compliance with
  15. * the License. You may obtain a copy of the License at:
  16. * www.st.com/SLA0044
  17. *
  18. ******************************************************************************
  19. */
  20. /* USER CODE END Header */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __USBD_CONF__H__
  23. #define __USBD_CONF__H__
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include <stdio.h>
  29. #include <stdlib.h>
  30. #include <string.h>
  31. #include "main.h"
  32. #include "usb_common_inc.h"
  33. /* USER CODE BEGIN INCLUDE */
  34. /* USER CODE END INCLUDE */
  35. /** @addtogroup USBD_OTG_DRIVER
  36. * @{
  37. */
  38. /** @defgroup USBD_CONF USBD_CONF
  39. * @brief Configuration file for Usb otg low level driver.
  40. * @{
  41. */
  42. /** @defgroup USBD_CONF_Exported_Variables USBD_CONF_Exported_Variables
  43. * @brief Public variables.
  44. * @{
  45. */
  46. /**
  47. * @}
  48. */
  49. /** @defgroup USBD_CONF_Exported_Defines USBD_CONF_Exported_Defines
  50. * @brief Defines for configuration of the Usb device.
  51. * @{
  52. */
  53. /*---------- -----------*/
  54. #define USBD_MAX_NUM_INTERFACES 1U
  55. /*---------- -----------*/
  56. #define USBD_MAX_NUM_CONFIGURATION 1U
  57. /*---------- -----------*/
  58. #define USBD_MAX_STR_DESC_SIZ 512U
  59. /*---------- -----------*/
  60. #define USBD_DEBUG_LEVEL 0U
  61. /*---------- -----------*/
  62. #define USBD_SELF_POWERED 1U
  63. /****************************************/
  64. /* #define for FS and HS identification */
  65. #define DEVICE_FS 0
  66. /**
  67. * @}
  68. */
  69. /** @defgroup USBD_CONF_Exported_Macros USBD_CONF_Exported_Macros
  70. * @brief Aliases.
  71. * @{
  72. */
  73. /* Memory management macros */
  74. /** Alias for memory allocation. */
  75. #define USBD_malloc (uint32_t *)USBD_static_malloc
  76. /** Alias for memory release. */
  77. #define USBD_free USBD_static_free
  78. /** Alias for memory set. */
  79. #define USBD_memset /* Not used */
  80. /** Alias for memory copy. */
  81. #define USBD_memcpy /* Not used */
  82. /** Alias for delay. */
  83. #define USBD_Delay HAL_Delay
  84. /* For footprint reasons and since only one allocation is handled in the HID class
  85. driver, the malloc/free is changed into a static allocation method */
  86. void *USBD_static_malloc(uint32_t size);
  87. void USBD_static_free(void *p);
  88. /* DEBUG macros */
  89. #if (USBD_DEBUG_LEVEL > 0)
  90. #define USBD_UsrLog(...) printf(__VA_ARGS__);\
  91. printf("\n");
  92. #else
  93. #define USBD_UsrLog(...)
  94. #endif
  95. #if (USBD_DEBUG_LEVEL > 1)
  96. #define USBD_ErrLog(...) printf("ERROR: ") ;\
  97. printf(__VA_ARGS__);\
  98. printf("\n");
  99. #else
  100. #define USBD_ErrLog(...)
  101. #endif
  102. #if (USBD_DEBUG_LEVEL > 2)
  103. #define USBD_DbgLog(...) printf("DEBUG : ") ;\
  104. printf(__VA_ARGS__);\
  105. printf("\n");
  106. #else
  107. #define USBD_DbgLog(...)
  108. #endif
  109. /**
  110. * @}
  111. */
  112. /** @defgroup USBD_CONF_Exported_Types USBD_CONF_Exported_Types
  113. * @brief Types.
  114. * @{
  115. */
  116. /**
  117. * @}
  118. */
  119. /** @defgroup USBD_CONF_Exported_FunctionsPrototype USBD_CONF_Exported_FunctionsPrototype
  120. * @brief Declaration of public functions for Usb device.
  121. * @{
  122. */
  123. /* Exported functions -------------------------------------------------------*/
  124. /**
  125. * @}
  126. */
  127. /**
  128. * @}
  129. */
  130. /**
  131. * @}
  132. */
  133. #ifdef __cplusplus
  134. }
  135. #endif
  136. #endif /* __USBD_CONF__H__ */
  137. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/