1 /*
2  * Copyright (c) 2025, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2025-01-17     Supperthomas first version
9  */
10 #include "board.h"
11 #include "rtthread.h"
12 #include "drv_config.h"
13 
14 #ifdef RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM
15 /* Register the EMAC device */
rt_hw_stm32_cherryusb_cdc_init(void)16 static int rt_hw_stm32_cherryusb_cdc_init(void)
17 {
18     extern void cdc_acm_init(uint8_t busid, uintptr_t reg_base);
19     cdc_acm_init(0, USB_OTG_FS_PERIPH_BASE);
20 
21     return 0;
22 }
23 INIT_COMPONENT_EXPORT(rt_hw_stm32_cherryusb_cdc_init);
cherry_usb_cdc_send(int argc,char ** argv)24 static int cherry_usb_cdc_send(int argc, char **argv)
25 {
26     extern void cdc_acm_data_send_with_dtr_test(uint8_t busid);
27     cdc_acm_data_send_with_dtr_test(0);
28     return 0;
29 }
30 MSH_CMD_EXPORT(cherry_usb_cdc_send, send the cdc data for test)
31 #endif
32 
33