新增电脑通过USB发送产品code,然后dongle根据新的code重新发起广播的功能

This commit is contained in:
2026-07-27 15:00:47 +08:00
parent c843fb24e0
commit df37ff1b23
51 changed files with 2326 additions and 1812 deletions
+8
View File
@@ -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);//固件三部测试使用 */