mirror of https://github.com/drowe67/codec2.git
69 lines
2.6 KiB
C
69 lines
2.6 KiB
C
/**
|
|
******************************************************************************
|
|
* @file usbd_cdc_vcp.h
|
|
* @author MCD Application Team
|
|
* @version V1.0.0
|
|
* @date 22-July-2011
|
|
* @brief Header for usbd_cdc_vcp.c file.
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* 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.
|
|
*
|
|
* <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
|
|
******************************************************************************
|
|
*/
|
|
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
#ifndef __USBD_CDC_VCP_H
|
|
#define __USBD_CDC_VCP_H
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#include "stm32f4xx_conf.h"
|
|
|
|
#include "usbd_cdc_core.h"
|
|
#include "usbd_conf.h"
|
|
#include <stdint.h>
|
|
|
|
/* Exported typef ------------------------------------------------------------*/
|
|
/* The following structures groups all needed parameters to be configured for the
|
|
ComPort. These parameters can modified on the fly by the host through CDC class
|
|
command class requests. */
|
|
typedef struct
|
|
{
|
|
uint32_t bitrate;
|
|
uint8_t format;
|
|
uint8_t paritytype;
|
|
uint8_t datatype;
|
|
}LINE_CODING;
|
|
|
|
/* Exported constants --------------------------------------------------------*/
|
|
/* The following define is used to route the USART IRQ handler to be used.
|
|
The IRQ handler function is implemented in the usbd_cdc_vcp.c file. */
|
|
#ifdef USE_STM322xG_EVAL
|
|
#define EVAL_COM_IRQHandler USART3_IRQHandler
|
|
#elif defined(USE_STM3210C_EVAL)
|
|
#define EVAL_COM_IRQHandler USART2_IRQHandler
|
|
#endif /* USE_STM322xG_EVAL */
|
|
|
|
void VCP_put_char(uint8_t buf);
|
|
void VCP_send_str(uint8_t* buf);
|
|
int VCP_get_char(uint8_t *buf);
|
|
int VCP_get_string(uint8_t *buf);
|
|
void VCP_send_buffer(uint8_t* buf, int len);
|
|
|
|
#define DEFAULT_CONFIG 0
|
|
#define OTHER_CONFIG 1
|
|
|
|
/* Exported macro ------------------------------------------------------------*/
|
|
/* Exported functions ------------------------------------------------------- */
|
|
|
|
#endif /* __USBD_CDC_VCP_H */
|
|
|
|
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
|