Skip to content

Commit 05a5011

Browse files
committed
feat: cdc_vcom: add vcom_line_coding_updated callback
Signed-off-by: jiaoxy0 <jiaoxiaoyu0@163.com>
1 parent f19da94 commit 05a5011

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

components/legacy/usb/usbdevice/class/cdc_vcom.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ static rt_uint8_t vcom_thread_stack[VCOM_TASK_STK_SIZE];
7878
static struct rt_thread vcom_thread;
7979
static struct ucdc_line_coding line_coding;
8080

81+
rt_weak void vcom_line_coding_updated(struct ucdc_line_coding *coding);
82+
8183
#define CDC_TX_BUFSIZE 1024
8284
#define CDC_BULKIN_MAXSIZE (CDC_TX_BUFSIZE / 8)
8385

@@ -416,6 +418,8 @@ static rt_err_t _cdc_set_line_coding_callback(udevice_t device, rt_size_t size)
416418
{
417419
LOG_D("_cdc_set_line_coding_callback");
418420

421+
vcom_line_coding_updated(&line_coding);
422+
419423
dcd_ep0_send_status(device->dcd);
420424

421425
return RT_EOK;

0 commit comments

Comments
 (0)