STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
usbd_cdc_if.h
Go to the documentation of this file.
1/* USER CODE BEGIN Header */
2/**
3 ******************************************************************************
4 * @file : usbd_cdc_if.h
5 * @version : v1.0_Cube
6 * @brief : Header for usbd_cdc_if.c file.
7 ******************************************************************************
8 * @attention
9 *
10 * Copyright (c) 2026 STMicroelectronics.
11 * All rights reserved.
12 *
13 * This software is licensed under terms that can be found in the LICENSE file
14 * in the root directory of this software component.
15 * If no LICENSE file comes with this software, it is provided AS-IS.
16 *
17 ******************************************************************************
18 */
19/* USER CODE END Header */
20
21/* Define to prevent recursive inclusion -------------------------------------*/
22
23#ifndef __USBD_CDC_IF_H__
24#define __USBD_CDC_IF_H__
25
26#ifdef __cplusplus
27 extern "C" {
28#endif
29
30/* Includes ------------------------------------------------------------------*/
31#include "usbd_cdc.h"
32
33/* USER CODE BEGIN INCLUDE */
34#include <stdbool.h>
35/* USER CODE END INCLUDE */
36
37/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
38 * @brief For Usb device.
39 * @{
40 */
41
42/** @defgroup USBD_CDC_IF USBD_CDC_IF
43 * @brief Usb VCP device module
44 * @{
45 */
46
47/** @defgroup USBD_CDC_IF_Exported_Defines USBD_CDC_IF_Exported_Defines
48 * @brief Defines.
49 * @{
50 */
51/* Define size for the receive and transmit buffer over CDC */
52#define APP_RX_DATA_SIZE 2048
53#define APP_TX_DATA_SIZE 2048
54/* USER CODE BEGIN EXPORTED_DEFINES */
55
56/* USER CODE END EXPORTED_DEFINES */
57
58/**
59 * @}
60 */
61
62/** @defgroup USBD_CDC_IF_Exported_Types USBD_CDC_IF_Exported_Types
63 * @brief Types.
64 * @{
65 */
66
67/* USER CODE BEGIN EXPORTED_TYPES */
68
69/* USER CODE END EXPORTED_TYPES */
70
71/**
72 * @}
73 */
74
75/** @defgroup USBD_CDC_IF_Exported_Macros USBD_CDC_IF_Exported_Macros
76 * @brief Aliases.
77 * @{
78 */
79
80/* USER CODE BEGIN EXPORTED_MACRO */
81
82/* USER CODE END EXPORTED_MACRO */
83
84/**
85 * @}
86 */
87
88/** @defgroup USBD_CDC_IF_Exported_Variables USBD_CDC_IF_Exported_Variables
89 * @brief Public variables.
90 * @{
91 */
92
93/** CDC Interface callback. */
95
96/* USER CODE BEGIN EXPORTED_VARIABLES */
97/* Level 3: Global flag indicating if PC terminal software is open */
98extern volatile bool g_usb_terminal_connected;
99/* USER CODE END EXPORTED_VARIABLES */
100
101/**
102 * @}
103 */
104
105/** @defgroup USBD_CDC_IF_Exported_FunctionsPrototype USBD_CDC_IF_Exported_FunctionsPrototype
106 * @brief Public functions declaration.
107 * @{
108 */
109
110uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len);
111
112/* USER CODE BEGIN EXPORTED_FUNCTIONS */
113bool usb_configured(void);
114bool usb_terminal_open(void); /* configured and DTR set */
115void usb_bootloader_check(void);
116
117/* USER CODE END EXPORTED_FUNCTIONS */
118
119/**
120 * @}
121 */
122
123/**
124 * @}
125 */
126
127/**
128 * @}
129 */
130
131#ifdef __cplusplus
132}
133#endif
134
135#endif /* __USBD_CDC_IF_H__ */
136
uint8_t CDC_Transmit_HS(uint8_t *Buf, uint16_t Len)
Data to send over USB IN endpoint are sent over CDC interface through this function.
bool usb_configured(void)
void usb_bootloader_check(void)
bool usb_terminal_open(void)
volatile bool g_usb_terminal_connected
Definition usbd_cdc_if.c:37
USBD_CDC_ItfTypeDef USBD_Interface_fops_HS
CDC Interface callback.
struct _USBD_CDC_Itf USBD_CDC_ItfTypeDef
header file for the usbd_cdc.c file.