Lines Matching refs:func

259 static void rt_usb_vcom_init(struct ufunction *func);
261 static void _vcom_reset_state(ufunction_t func) in _vcom_reset_state() argument
266 RT_ASSERT(func != RT_NULL) in _vcom_reset_state()
268 data = (struct vcom*)func->user_data; in _vcom_reset_state()
285 static rt_err_t _ep_in_handler(ufunction_t func, rt_size_t size) in _ep_in_handler() argument
290 RT_ASSERT(func != RT_NULL); in _ep_in_handler()
292 data = (struct vcom*)func->user_data; in _ep_in_handler()
307 rt_usbd_io_request(func->device, data->ep_in, &data->ep_in->request); in _ep_in_handler()
325 static rt_err_t _ep_out_handler(ufunction_t func, rt_size_t size) in _ep_out_handler() argument
330 RT_ASSERT(func != RT_NULL); in _ep_out_handler()
334 data = (struct vcom*)func->user_data; in _ep_out_handler()
352 rt_usbd_io_request(func->device, data->ep_out, &data->ep_out->request); in _ep_out_handler()
365 static rt_err_t _ep_cmd_handler(ufunction_t func, rt_size_t size) in _ep_cmd_handler() argument
367 RT_ASSERT(func != RT_NULL); in _ep_cmd_handler()
441 static rt_err_t _interface_handler(ufunction_t func, ureq_t setup) in _interface_handler() argument
445 RT_ASSERT(func != RT_NULL); in _interface_handler()
446 RT_ASSERT(func->device != RT_NULL); in _interface_handler()
449 data = (struct vcom*)func->user_data; in _interface_handler()
464 _cdc_set_line_coding(func->device, setup); in _interface_handler()
467 _cdc_get_line_coding(func->device, setup); in _interface_handler()
472 dcd_ep0_send_status(func->device->dcd); in _interface_handler()
491 static rt_err_t _function_enable(ufunction_t func) in _function_enable() argument
495 RT_ASSERT(func != RT_NULL); in _function_enable()
499 _vcom_reset_state(func); in _function_enable()
501 data = (struct vcom*)func->user_data; in _function_enable()
513 rt_usbd_io_request(func->device, data->ep_out, &data->ep_out->request); in _function_enable()
525 static rt_err_t _function_disable(ufunction_t func) in _function_disable() argument
529 RT_ASSERT(func != RT_NULL); in _function_disable()
533 _vcom_reset_state(func); in _function_disable()
535 data = (struct vcom*)func->user_data; in _function_disable()
582 ufunction_t func; in rt_usbd_function_cdc_create() local
605 func = rt_usbd_function_new(device, &dev_desc, &ops); in rt_usbd_function_cdc_create()
614 func->user_data = (void*)data; in rt_usbd_function_cdc_create()
617 rt_usb_vcom_init(func); in rt_usbd_function_cdc_create()
647 rt_usbd_function_add_interface(func, intf_comm); in rt_usbd_function_cdc_create()
664 rt_usbd_function_add_interface(func, intf_data); in rt_usbd_function_cdc_create()
666 return func; in rt_usbd_function_cdc_create()
681 struct ufunction *func; in _vcom_control() local
684 func = (struct ufunction*)serial->parent.user_data; in _vcom_control()
685 data = (struct vcom*)func->user_data; in _vcom_control()
708 struct ufunction *func; in _vcom_getc() local
711 func = (struct ufunction*)serial->parent.user_data; in _vcom_getc()
712 data = (struct vcom*)func->user_data; in _vcom_getc()
764 struct ufunction *func; in _vcom_tx() local
770 func = (struct ufunction*)serial->parent.user_data; in _vcom_tx()
771 data = (struct vcom*)func->user_data; in _vcom_tx()
824 struct ufunction *func; in _vcom_putc() local
827 func = (struct ufunction*)serial->parent.user_data; in _vcom_putc()
828 data = (struct vcom*)func->user_data; in _vcom_putc()
864 struct ufunction *func = (struct ufunction *)parameter; in vcom_tx_thread_entry() local
865 struct vcom *data = (struct vcom*)func->user_data; in vcom_tx_thread_entry()
922 rt_usbd_io_request(func->device, data->ep_in, &data->ep_in->request); in vcom_tx_thread_entry()
951 static void rt_usb_vcom_init(struct ufunction *func) in rt_usb_vcom_init() argument
955 struct vcom *data = (struct vcom*)func->user_data; in rt_usb_vcom_init()
986 func); in rt_usb_vcom_init()
990 vcom_tx_thread_entry, func, in rt_usb_vcom_init()