新增电脑通过USB发送产品code,然后dongle根据新的code重新发起广播的功能
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
#if TCFG_USB_SLAVE_CDC_ENABLE
|
||||
#include "usb/device/cdc.h"
|
||||
#include "usr_usb_jb.h"
|
||||
#endif
|
||||
|
||||
#if (TCFG_USB_DM_MULTIPLEX_WITH_SD_DAT0)
|
||||
@@ -186,6 +187,13 @@ static void usb_cdc_wakeup(struct usb_device_t *usb_device)
|
||||
log_debug("cdc rx hook");
|
||||
rlen = cdc_read_data(usb_id, buf, 64);
|
||||
|
||||
/* 见宝协议:产品码配置帧 55 AA ... */
|
||||
if (rlen > 0) {
|
||||
printf("cdc rx %u\n", rlen);
|
||||
put_buf(buf, rlen);
|
||||
usr_usb_jb_feed(buf, rlen);
|
||||
}
|
||||
|
||||
/* put_buf(buf, rlen);//固件三部测试使用 */
|
||||
/* cdc_write_data(usb_id, buf, rlen);//固件三部测试使用 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user