STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches

Usb VCP device module. More...

Collaboration diagram for USBD_CDC_IF:

Topics

 USBD_CDC_IF_Private_TypesDefinitions
 Private types.
 USBD_CDC_IF_Private_Defines
 Private defines.
 USBD_CDC_IF_Private_Macros
 Private macros.
 USBD_CDC_IF_Private_Variables
 Private variables.
 USBD_CDC_IF_Exported_Variables
 Public variables.
 USBD_CDC_IF_Private_FunctionPrototypes
 Private functions declaration.
 USBD_CDC_IF_Exported_Defines
 Defines.
 USBD_CDC_IF_Exported_Types
 Types.
 USBD_CDC_IF_Exported_Macros
 Aliases.
 USBD_CDC_IF_Exported_FunctionsPrototype
 Public functions declaration.

Functions

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)
bool usb_terminal_open (void)
void usb_bootloader_check (void)

Variables

USBD_CDC_ItfTypeDef USBD_Interface_fops_HS
 CDC Interface callback.

Detailed Description

Usb VCP device module.

Function Documentation

◆ CDC_Transmit_HS()

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.

Parameters
BufBuffer of data to be sent
LenNumber of data to be sent (in bytes)
Return values
Resultof the operation: USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY

Definition at line 283 of file usbd_cdc_if.c.

References hUsbDeviceHS, NULL, result, USBD_CDC_HandleTypeDef::TxState, usb_terminal_open(), USBD_BUSY, USBD_CDC_SetTxBuffer(), USBD_CDC_TransmitPacket(), USBD_FAIL, and USBD_OK.

◆ usb_bootloader_check()

void usb_bootloader_check ( void )

◆ usb_configured()

bool usb_configured ( void )

Definition at line 325 of file usbd_cdc_if.c.

References hUsbDeviceHS, and USBD_STATE_CONFIGURED.

Referenced by board_sleep(), and usb_terminal_open().

◆ usb_terminal_open()

bool usb_terminal_open ( void )

Definition at line 330 of file usbd_cdc_if.c.

References g_usb_terminal_connected, and usb_configured().

Referenced by CDC_Transmit_HS().

Variable Documentation

◆ USBD_Interface_fops_HS

USBD_CDC_ItfTypeDef USBD_Interface_fops_HS
Initial value:
=
{
}
static int8_t CDC_Receive_HS(uint8_t *pbuf, uint32_t *Len)
Data received over USB OUT endpoint are sent over CDC interface through this function.
static int8_t CDC_Control_HS(uint8_t cmd, uint8_t *pbuf, uint16_t length)
Manage the CDC class requests.
static int8_t CDC_DeInit_HS(void)
DeInitializes the CDC media low layer.
static int8_t CDC_Init_HS(void)
Initializes the CDC media low layer over the USB HS IP.
static int8_t CDC_TransmitCplt_HS(uint8_t *pbuf, uint32_t *Len, uint8_t epnum)
CDC_TransmitCplt_HS Data transmitted callback.

CDC Interface callback.

Definition at line 145 of file usbd_cdc_if.c.

Referenced by MX_USB_DEVICE_Init().