Prusa MINI Firmware overview
|
Private functions declaration.
More...
Private functions declaration.
◆ CDC_Init_FS()
static int8_t CDC_Init_FS |
( |
void |
| ) |
|
|
static |
Initializes the CDC media low layer over the FS USB IP.
- Return values
-
USBD_OK | if all operations are OK else USBD_FAIL |
◆ CDC_DeInit_FS()
static int8_t CDC_DeInit_FS |
( |
void |
| ) |
|
|
static |
DeInitializes the CDC media low layer.
- Return values
-
USBD_OK | if all operations are OK else USBD_FAIL |
◆ CDC_Control_FS()
static int8_t CDC_Control_FS |
( |
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 |
◆ CDC_Receive_FS()
static int8_t CDC_Receive_FS |
( |
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 block any OUT packet reception 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 |
uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff, uint16_t length)
USBD_CDC_SetTxBuffer.
Definition: usbd_cdc.c:810
uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev)
USBD_CDC_ReceivePacket prepare OUT Endpoint for reception.
Definition: usbd_cdc.c:883
#define CDC_SET_LINE_CODING
Definition: usbd_cdc.h:76
#define CDC_CLEAR_COMM_FEATURE
Definition: usbd_cdc.h:75
#define CDC_GET_LINE_CODING
Definition: usbd_cdc.h:77
uint8_t UserRxBufferFS[APP_RX_DATA_SIZE]
Definition: usbd_cdc_if.c:128
#define CDC_SET_COMM_FEATURE
Definition: usbd_cdc.h:73
#define CDC_SEND_ENCAPSULATED_COMMAND
Definition: usbd_cdc.h:71
#define CDC_GET_COMM_FEATURE
Definition: usbd_cdc.h:74
void app_cdc_rx(uint8_t *buffer, uint32_t length)
Definition: appmain.cpp:153
int usbd_cdc_initialized
Definition: usbd_cdc_if.c:64
#define CDC_SET_CONTROL_LINE_STATE
Definition: usbd_cdc.h:78
uint8_t UserTxBufferFS[APP_TX_DATA_SIZE]
Definition: usbd_cdc_if.c:131
#define Len
Definition: deflate.h:82
uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff)
USBD_CDC_SetRxBuffer.
Definition: usbd_cdc.c:829
#define CDC_SEND_BREAK
Definition: usbd_cdc.h:79
USBD_HandleTypeDef hUsbDeviceFS
Definition: usb_device.c:73
Definition: usbd_def.h:195
#define CDC_GET_ENCAPSULATED_RESPONSE
Definition: usbd_cdc.h:72