Private functions declaration.
More...
|
| static int8_t | CDC_Init_HS (void) |
| | Initializes the CDC media low layer over the USB HS IP.
|
| static int8_t | CDC_DeInit_HS (void) |
| | DeInitializes the CDC media low layer.
|
| static int8_t | CDC_Control_HS (uint8_t cmd, uint8_t *pbuf, uint16_t length) |
| | Manage the CDC class requests.
|
| static int8_t | CDC_Receive_HS (uint8_t *Buf, uint32_t *Len) |
| | Data received over USB OUT endpoint are sent over CDC interface through this function.
|
| static int8_t | CDC_TransmitCplt_HS (uint8_t *Buf, uint32_t *Len, uint8_t epnum) |
| | CDC_TransmitCplt_HS Data transmitted callback.
|
| static bool | is_bootloader_cmd (const uint8_t *b, uint32_t n) |
Private functions declaration.
◆ CDC_Control_HS()
| int8_t CDC_Control_HS |
( |
uint8_t | cmd, |
|
|
uint8_t * | pbuf, |
|
|
uint16_t | length ) |
|
static |
Manage the CDC class requests.
- Parameters
-
| cmd | Command code |
| pbuf | Buffer containing command data (request parameters) |
| length | 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 190 of file usbd_cdc_if.c.
References CDC_CLEAR_COMM_FEATURE, CDC_GET_COMM_FEATURE, CDC_GET_ENCAPSULATED_RESPONSE, CDC_GET_LINE_CODING, CDC_SEND_BREAK, CDC_SEND_ENCAPSULATED_COMMAND, CDC_SET_COMM_FEATURE, CDC_SET_CONTROL_LINE_STATE, CDC_SET_LINE_CODING, g_usb_terminal_connected, line_coding, and USBD_OK.
◆ CDC_DeInit_HS()
| int8_t CDC_DeInit_HS |
( |
void | | ) |
|
|
static |
◆ CDC_Init_HS()
| int8_t CDC_Init_HS |
( |
void | | ) |
|
|
static |
◆ CDC_Receive_HS()
| int8_t CDC_Receive_HS |
( |
uint8_t * | Buf, |
|
|
uint32_t * | Len ) |
|
static |
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 until 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_FAILL |
Definition at line 258 of file usbd_cdc_if.c.
References app_state(), BOOTLOADER_MAGIC, FLIGHT_IDLE, HAL_PWR_EnableBkUpAccess(), hUsbDeviceHS, is_bootloader_cmd(), NVIC_SystemReset, RTC, USBD_CDC_ReceivePacket(), USBD_CDC_SetRxBuffer(), and USBD_OK.
◆ CDC_TransmitCplt_HS()
| int8_t CDC_TransmitCplt_HS |
( |
uint8_t * | Buf, |
|
|
uint32_t * | Len, |
|
|
uint8_t | epnum ) |
|
static |
CDC_TransmitCplt_HS Data transmitted callback.
- Note
- This function is IN transfer complete callback used to inform user that the submitted Data is successfully sent over USB.
- 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 313 of file usbd_cdc_if.c.
References result, UNUSED, and USBD_OK.
◆ is_bootloader_cmd()
| bool is_bootloader_cmd |
( |
const uint8_t * | b, |
|
|
uint32_t | n ) |
|
static |