STSW-STLKT01: USBD_CDC_Private_FunctionPrototypes

STSW-STLKT01

STSW-STLKT01
USBD_CDC_Private_FunctionPrototypes

Functions

static int8_t TEMPLATE_Init (void)
 TEMPLATE_Init Initializes the CDC media low layer. More...
 
static int8_t TEMPLATE_DeInit (void)
 TEMPLATE_DeInit DeInitializes the CDC media low layer. More...
 
static int8_t TEMPLATE_Control (uint8_t cmd, uint8_t *pbuf, uint16_t length)
 TEMPLATE_Control Manage the CDC class requests. More...
 
static int8_t TEMPLATE_Receive (uint8_t *Buf, uint32_t *Len)
 TEMPLATE_Receive Data received over USB OUT endpoint are sent over CDC interface through this function. More...
 

Variables

static __ALIGN_BEGIN uint8_t USBD_CDC_DeviceQualifierDesc [USB_LEN_DEV_QUALIFIER_DESC] __ALIGN_END
 
USBD_CDC_ItfTypeDef USBD_CDC_Template_fops
 
USBD_CDC_LineCodingTypeDef linecoding
 

Detailed Description

Function Documentation

◆ TEMPLATE_Control()

static int8_t TEMPLATE_Control ( uint8_t  cmd,
uint8_t *  pbuf,
uint16_t  length 
)
static

TEMPLATE_Control Manage the CDC class requests.

Parameters
CmdCommand code
BufBuffer containing command data (request parameters)
LenNumber of data to be sent (in bytes)
Return values
Resultof the operation: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 130 of file usbd_cdc_if_template.c.

◆ TEMPLATE_DeInit()

static int8_t TEMPLATE_DeInit ( void  )
static

TEMPLATE_DeInit DeInitializes the CDC media low layer.

Parameters
None
Return values
Resultof the operation: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 113 of file usbd_cdc_if_template.c.

◆ TEMPLATE_Init()

static int8_t TEMPLATE_Init ( void  )
static

TEMPLATE_Init Initializes the CDC media low layer.

Parameters
None
Return values
Resultof the operation: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 99 of file usbd_cdc_if_template.c.

◆ TEMPLATE_Receive()

static int8_t TEMPLATE_Receive ( uint8_t *  Buf,
uint32_t *  Len 
)
static

TEMPLATE_Receive Data received over USB OUT endpoint are sent over CDC interface through this function.

Note
This function will issue a NAK packet on any OUT packet received on USB endpoint untill exiting this function. If you exit this function before transfer is complete on CDC interface (ie. using DMA controller) it will result in receiving more data while previous ones are still not sent.
Parameters
BufBuffer of data to be received
LenNumber of data received (in bytes)
Return values
Resultof the operation: USBD_OK if all operations are OK else USBD_FAIL

Definition at line 207 of file usbd_cdc_if_template.c.

Variable Documentation

◆ __ALIGN_END

__ALIGN_BEGIN uint8_t USBD_CDC_OtherSpeedCfgDesc [USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END
static
Initial value:
=
{
USB_LEN_DEV_QUALIFIER_DESC,
USB_DESC_TYPE_DEVICE_QUALIFIER,
0x00,
0x02,
0x00,
0x00,
0x00,
0x40,
0x01,
0x00,
}

Definition at line 135 of file usbd_cdc.c.

◆ linecoding

Initial value:
=
{
115200,
0x00,
0x00,
0x08
}

Definition at line 83 of file usbd_cdc_if_template.c.

◆ USBD_CDC_Template_fops

USBD_CDC_ItfTypeDef USBD_CDC_Template_fops
Initial value:
=
{
}
static int8_t TEMPLATE_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length)
TEMPLATE_Control Manage the CDC class requests.
static int8_t TEMPLATE_DeInit(void)
TEMPLATE_DeInit DeInitializes the CDC media low layer.
static int8_t TEMPLATE_Init(void)
TEMPLATE_Init Initializes the CDC media low layer.
static int8_t TEMPLATE_Receive(uint8_t *pbuf, uint32_t *Len)
TEMPLATE_Receive Data received over USB OUT endpoint are sent over CDC interface through this functio...

Definition at line 75 of file usbd_cdc_if_template.c.

Generated by   doxygen 1.8.13