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 13 #ifdef RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM 14 /* Register the EMAC device */ rt_hw_stm32_cherryusb_cdc_init(void)15static int rt_hw_stm32_cherryusb_cdc_init(void) 16 { 17 extern void cdc_acm_init(uint8_t busid, uintptr_t reg_base); 18 cdc_acm_init(0, USB_OTG_FS_PERIPH_BASE); 19 20 return 0; 21 } 22 INIT_COMPONENT_EXPORT(rt_hw_stm32_cherryusb_cdc_init); cherry_usb_cdc_send(int argc,char ** argv)23static int cherry_usb_cdc_send(int argc, char **argv) 24 { 25 extern void cdc_acm_data_send_with_dtr_test(uint8_t busid); 26 cdc_acm_data_send_with_dtr_test(0); 27 return 0; 28 } 29 MSH_CMD_EXPORT(cherry_usb_cdc_send, send the cdc data for test) 30 #endif 31 32