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.
 
 
 
 
 
 

142 lines
3.1 KiB

  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : usbd_cdc_if.h
  5. * @version : v2.0_Cube
  6. * @brief : Header for usbd_cdc_if.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_CDC_IF_H__
  23. #define __USBD_CDC_IF_H__
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "usbd_cdc.h"
  29. /* USER CODE BEGIN INCLUDE */
  30. /* USER CODE END INCLUDE */
  31. /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
  32. * @brief For Usb device.
  33. * @{
  34. */
  35. /** @defgroup USBD_CDC_IF USBD_CDC_IF
  36. * @brief Usb VCP device module
  37. * @{
  38. */
  39. /** @defgroup USBD_CDC_IF_Exported_Defines USBD_CDC_IF_Exported_Defines
  40. * @brief Defines.
  41. * @{
  42. */
  43. /* USER CODE BEGIN EXPORTED_DEFINES */
  44. /* USER CODE END EXPORTED_DEFINES */
  45. /**
  46. * @}
  47. */
  48. /** @defgroup USBD_CDC_IF_Exported_Types USBD_CDC_IF_Exported_Types
  49. * @brief Types.
  50. * @{
  51. */
  52. /* USER CODE BEGIN EXPORTED_TYPES */
  53. /* USER CODE END EXPORTED_TYPES */
  54. /**
  55. * @}
  56. */
  57. /** @defgroup USBD_CDC_IF_Exported_Macros USBD_CDC_IF_Exported_Macros
  58. * @brief Aliases.
  59. * @{
  60. */
  61. /* USER CODE BEGIN EXPORTED_MACRO */
  62. /* USER CODE END EXPORTED_MACRO */
  63. /**
  64. * @}
  65. */
  66. /** @defgroup USBD_CDC_IF_Exported_Variables USBD_CDC_IF_Exported_Variables
  67. * @brief Public variables.
  68. * @{
  69. */
  70. /** CDC Interface callback. */
  71. extern USBD_CDC_ItfTypeDef USBD_Interface_fops_FS;
  72. /* USER CODE BEGIN EXPORTED_VARIABLES */
  73. extern USBD_HandleTypeDef hUsbDeviceFS;
  74. extern uint8_t* CDC_RX_BUFFER;
  75. extern uint16_t CDC_RX_LEN;
  76. /*
  77. * when CDC_RX_LEN != 0, CDC_RX_LEN bytes are available in CDC_RX_BUFFER.
  78. * Once all bytes have been consumed from the buffer, set CDC_RX_LEN to
  79. * zero and call:
  80. * USBD_CDC_ReceivePacket(&hUsbDeviceFS);
  81. * to receive more data.
  82. */
  83. /* USER CODE END EXPORTED_VARIABLES */
  84. /**
  85. * @}
  86. */
  87. /** @defgroup USBD_CDC_IF_Exported_FunctionsPrototype USBD_CDC_IF_Exported_FunctionsPrototype
  88. * @brief Public functions declaration.
  89. * @{
  90. */
  91. uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len);
  92. /* USER CODE BEGIN EXPORTED_FUNCTIONS */
  93. void usb_printf(const char *format, ...);
  94. uint16_t vcp_status( USBD_SetupReqTypedef *req);
  95. /* USER CODE END EXPORTED_FUNCTIONS */
  96. /**
  97. * @}
  98. */
  99. /**
  100. * @}
  101. */
  102. /**
  103. * @}
  104. */
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108. #endif /* __USBD_CDC_IF_H__ */
  109. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/