Generic media access Layer. More...
Go to the source code of this file.
Functions | |
uint32_t | CDC_BaudRate (void) |
uint32_t | CDC_Receive_BytesAvailable (void) |
uint32_t | CDC_Receive_DATA (uint8_t *recvBuf, uint32_t len) |
uint32_t | CDC_Send_DATA (const uint8_t *ptrBuffer, uint32_t sendLength) |
uint32_t | CDC_Send_FreeBytes (void) |
void | CDC_SetBaudRateCb (void(*cb)(void *context, uint32_t baud), void *context) |
void | CDC_SetCtrlLineStateCb (void(*cb)(void *context, uint16_t ctrlLineState), void *context) |
uint8_t | usbIsConfigured (void) |
uint8_t | usbIsConnected (void) |
void | ust_cpy (LINE_CODING *plc2, const LINE_CODING *plc1) |
static uint16_t | VCP_Ctrl (uint32_t Cmd, uint8_t *Buf, uint32_t Len) |
VCP_Ctrl Manage the CDC class requests. More... | |
static uint16_t | VCP_DataRx (uint8_t *Buf, uint32_t Len) |
VCP_DataRx Data received over USB OUT endpoint are sent over CDC interface through this function. More... | |
static uint16_t | VCP_DataTx (const uint8_t *Buf, uint32_t Len) |
VCP_DataTx CDC data to be sent to the Host (app) over USB. More... | |
static uint16_t | VCP_DeInit (void) |
VCP_DeInit DeInitializes the Media on the STM32. More... | |
static uint16_t | VCP_Init (void) |
VCP_Init Initializes the Media on the STM32. More... | |
Variables | |
uint8_t | APP_Rx_Buffer [] |
uint32_t | APP_Rx_ptr_in |
uint32_t | APP_Rx_ptr_out |
static uint8_t | APP_Tx_Buffer [APP_TX_DATA_SIZE] |
static uint32_t | APP_Tx_ptr_in = 0 |
static uint32_t | APP_Tx_ptr_out = 0 |
static void(* | baudRateCb )(void *context, uint32_t baud) |
static void * | baudRateCbContext |
__IO uint32_t | bDeviceState = UNCONNECTED |
static void(* | ctrlLineStateCb )(void *context, uint16_t ctrlLineState) |
static void * | ctrlLineStateCbContext |
LINE_CODING | g_lc |
USB_OTG_CORE_HANDLE | USB_OTG_dev |
__IO uint8_t | USB_Tx_State |
CDC_IF_Prop_TypeDef | VCP_fops = {VCP_Init, VCP_DeInit, VCP_Ctrl, VCP_DataTx, VCP_DataRx } |
Generic media access Layer.
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
Definition in file usbd_cdc_vcp.c.
uint32_t CDC_BaudRate | ( | void | ) |
Definition at line 313 of file usbd_cdc_vcp.c.
uint32_t CDC_Receive_BytesAvailable | ( | void | ) |
Definition at line 247 of file usbd_cdc_vcp.c.
uint32_t CDC_Receive_DATA | ( | uint8_t * | recvBuf, |
uint32_t | len | ||
) |
Definition at line 235 of file usbd_cdc_vcp.c.
uint32_t CDC_Send_DATA | ( | const uint8_t * | ptrBuffer, |
uint32_t | sendLength | ||
) |
Definition at line 181 of file usbd_cdc_vcp.c.
uint32_t CDC_Send_FreeBytes | ( | void | ) |
Definition at line 187 of file usbd_cdc_vcp.c.
void CDC_SetBaudRateCb | ( | void(*)(void *context, uint32_t baud) | cb, |
void * | context | ||
) |
Definition at line 325 of file usbd_cdc_vcp.c.
void CDC_SetCtrlLineStateCb | ( | void(*)(void *context, uint16_t ctrlLineState) | cb, |
void * | context | ||
) |
Definition at line 338 of file usbd_cdc_vcp.c.
uint8_t usbIsConfigured | ( | void | ) |
Definition at line 289 of file usbd_cdc_vcp.c.
uint8_t usbIsConnected | ( | void | ) |
Definition at line 301 of file usbd_cdc_vcp.c.
void ust_cpy | ( | LINE_CODING * | plc2, |
const LINE_CODING * | plc1 | ||
) |
Definition at line 100 of file usbd_cdc_vcp.c.
|
static |
VCP_Ctrl Manage the CDC class requests.
Cmd | Command code |
Buf | Buffer containing command data (request parameters) |
Len | Number of data to be sent (in bytes) |
Result | of the opeartion (USBD_OK in all cases) |
Definition at line 116 of file usbd_cdc_vcp.c.
|
static |
VCP_DataRx Data received over USB OUT endpoint are sent over CDC interface through this function.
Buf | Buffer of data to be received |
Len | Number of data received (in bytes) |
Result | of the opeartion: USBD_OK if all operations are OK else VCP_FAIL |
Definition at line 268 of file usbd_cdc_vcp.c.
|
static |
VCP_DataTx CDC data to be sent to the Host (app) over USB.
Buf | Buffer of data to be sent |
Len | Number of data to be sent (in bytes) |
Result | of the operation: USBD_OK if all operations are OK else VCP_FAIL |
Definition at line 206 of file usbd_cdc_vcp.c.
|
static |
VCP_DeInit DeInitializes the Media on the STM32.
None |
Result | of the opeartion (USBD_OK in all cases) |
Definition at line 94 of file usbd_cdc_vcp.c.
|
static |
VCP_Init Initializes the Media on the STM32.
None |
Result | of the opeartion (USBD_OK in all cases) |
Definition at line 80 of file usbd_cdc_vcp.c.
uint8_t APP_Rx_Buffer[] |
|
static |
Definition at line 53 of file usbd_cdc_vcp.c.
|
static |
Definition at line 55 of file usbd_cdc_vcp.c.
|
static |
Definition at line 54 of file usbd_cdc_vcp.c.
|
static |
Definition at line 65 of file usbd_cdc_vcp.c.
|
static |
Definition at line 66 of file usbd_cdc_vcp.c.
__IO uint32_t bDeviceState = UNCONNECTED |
Definition at line 37 of file usbd_cdc_vcp.c.
|
static |
Definition at line 63 of file usbd_cdc_vcp.c.
|
static |
Definition at line 64 of file usbd_cdc_vcp.c.
LINE_CODING g_lc |
Definition at line 32 of file usbd_cdc_vcp.c.
USB_OTG_CORE_HANDLE USB_OTG_dev |
Definition at line 34 of file usbd_cdc_vcp.c.
CDC_IF_Prop_TypeDef VCP_fops = {VCP_Init, VCP_DeInit, VCP_Ctrl, VCP_DataTx, VCP_DataRx } |
Definition at line 70 of file usbd_cdc_vcp.c.