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 |
TEMPLATE_Control Manage the CDC class requests.
- Parameters
-
Cmd Command code Buf Buffer containing command data (request parameters) Len Number of data to be sent (in bytes)
- Return values
-
Result of 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 |
TEMPLATE_DeInit DeInitializes the CDC media low layer.
- Parameters
-
None
- Return values
-
Result of 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 |
TEMPLATE_Init Initializes the CDC media low layer.
- Parameters
-
None
- Return values
-
Result of 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 |
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
-
Buf Buffer of data to be received Len Number of data received (in bytes)
- Return values
-
Result of 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
|
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
USBD_CDC_LineCodingTypeDef 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.
Definition: usbd_cdc_if_template.c:130
static int8_t TEMPLATE_DeInit(void)
TEMPLATE_DeInit DeInitializes the CDC media low layer.
Definition: usbd_cdc_if_template.c:113
static int8_t TEMPLATE_Init(void)
TEMPLATE_Init Initializes the CDC media low layer.
Definition: usbd_cdc_if_template.c:99
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: usbd_cdc_if_template.c:207
Definition at line 75 of file usbd_cdc_if_template.c.
Generated by 1.8.13