2、新增USB查询产品码(0x66)和查询Dengle配置(0x74)命令 3、修复bleproto组包栈溢出导致设置Dengle后复位的问题,并完善CDC的DTR状态判断
29 lines
772 B
C
29 lines
772 B
C
#ifndef __CDC_H__
|
||
#define __CDC_H__
|
||
|
||
#include "usb/device/usb_stack.h"
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
u32 cdc_desc_config(const usb_dev usb_id, u8 *ptr, u32 *itf);
|
||
void cdc_set_wakeup_handler(void (*handle)(struct usb_device_t *usb_device));
|
||
void cdc_set_output_handle(void *priv, int (*output_handler)(void *priv, u8 *buf, u32 len));
|
||
u32 cdc_read_data(const usb_dev usb_id, u8 *buf, u32 len);
|
||
u32 cdc_write_data(const usb_dev usb_id, u8 *buf, u32 len);
|
||
u32 cdc_write_inir(const usb_dev usb_id, u8 *buf, u32 len);
|
||
void cdc_register(const usb_dev usb_id);
|
||
void cdc_release(const usb_dev usb_id);
|
||
/**
|
||
* @brief 上位机是否已打开 COM(依据 CDC DTR)
|
||
* @return 1=已打开 0=未打开
|
||
*/
|
||
u8 cdc_is_com_open(void);
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
|
||
#endif
|