65 lines
1.8 KiB
C
65 lines
1.8 KiB
C
#ifndef _QUEC_USB_H_
|
|
#define _QUEC_USB_H_
|
|
#include "quec_cust_feature.h"
|
|
|
|
#define QUEC_USB_CDC_RX_ENDPOINT 0x0D /*uÅ̸´ÓÃ*/
|
|
|
|
#define QUEC_USB_CDC_TX_ENDPOINT 0x04 /*uÅ̸´ÓÃ*/
|
|
|
|
#define QUEC_USB_CDC_CTRL_ENDPOINT 0x05 /*sulog¸´ÓÃ*/
|
|
|
|
/* USB Modem control endpoint. */
|
|
#define QUEC_CDC_CtrlEP (QUEC_USB_CDC_CTRL_ENDPOINT | 0x80)
|
|
|
|
/* Usb Modem TX endpoint. */
|
|
#define QUEC_CDC_TxEP (QUEC_USB_CDC_TX_ENDPOINT | 0x80)
|
|
|
|
/* Modem RX endpoint. */
|
|
#define QUEC_CDC_RxEP (QUEC_USB_CDC_RX_ENDPOINT)
|
|
|
|
#define MANUFACTURER_NAME_MAX_LEN 50
|
|
|
|
typedef unsigned short UINT16;
|
|
typedef unsigned char BOOL;
|
|
|
|
typedef struct
|
|
{
|
|
char imanufacturer[MANUFACTURER_NAME_MAX_LEN/2];
|
|
char iporduct[MANUFACTURER_NAME_MAX_LEN/2];
|
|
|
|
} quec_UsbManuInfo_S;
|
|
|
|
typedef struct usb_printer_config
|
|
{
|
|
char *device_1284_id;
|
|
} usb_printer_config_s;
|
|
|
|
typedef void(*_api_quec_usb_descriptor)(char storage);
|
|
|
|
int quec_usbcdc_open(void);
|
|
int quec_usbcdc_close(void);
|
|
int quec_uartcdc_write(unsigned char *data,int len);
|
|
int quec_usbcdc_read(unsigned char *data, int len);
|
|
void quec_usbcdc_register_cb(void* uart_cb);
|
|
void quec_usbcdc_register_cb_ex(void* uart_cb, void *priavte);
|
|
void quec_usbcdc_flowctl_enable(unsigned char enable);
|
|
void quec_usb_descriptor_map(char storage);
|
|
unsigned char quec_get_cdc_switch_ccid_flag(void);
|
|
void quec_cdc_switch_ccid_desc(unsigned char enable);
|
|
void quec_cdc_switch_printer_desc(unsigned char enable,struct usb_printer_config config);
|
|
int quec_usbcdc_set_rx_buf(int size);
|
|
|
|
#ifdef MV_USB2_HID_SUPPORT
|
|
void quec_enable_hid(unsigned char enable);
|
|
unsigned char quec_get_hid_enable(void);
|
|
#endif
|
|
|
|
|
|
BOOL quec_read_manufacturer_info(void);
|
|
|
|
BOOL quec_getUsbDescStrUTF16(char* input, UINT16 input_size, char* out_buf, UINT16 out_buf_size);
|
|
|
|
|
|
|
|
#endif
|