Lines Matching refs:serial
77 struct rt_serial_device serial; member
93 struct rt_serial_device * serial; member
336 if((data->serial.parent.flag & RT_DEVICE_FLAG_ACTIVATED) in _ep_out_handler()
337 && (data->serial.parent.open_flag & RT_DEVICE_OFLAG_OPEN)) in _ep_out_handler()
346 rt_hw_serial_isr(&data->serial,RT_SERIAL_EVENT_RX_IND); in _ep_out_handler()
506 data->serial.serial_rx = &data->rx_ringbuffer; in _function_enable()
672 static rt_err_t _vcom_configure(struct rt_serial_device *serial, in _vcom_configure() argument
678 static rt_err_t _vcom_control(struct rt_serial_device *serial, in _vcom_control() argument
684 func = (struct ufunction*)serial->parent.user_data; in _vcom_control()
703 static int _vcom_getc(struct rt_serial_device *serial) in _vcom_getc() argument
711 func = (struct ufunction*)serial->parent.user_data; in _vcom_getc()
759 static rt_ssize_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, int di… in _vcom_tx() argument
761 static rt_ssize_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, rt_uin… in _vcom_tx()
770 func = (struct ufunction*)serial->parent.user_data; in _vcom_tx()
773 RT_ASSERT(serial != RT_NULL); in _vcom_tx()
780 if((serial->parent.open_flag & RT_DEVICE_FLAG_STREAM)) in _vcom_tx()
816 rt_hw_serial_isr(&data->serial,RT_SERIAL_EVENT_TX_DMADONE); in _vcom_tx()
821 static int _vcom_putc(struct rt_serial_device *serial, char c) in _vcom_putc() argument
827 func = (struct ufunction*)serial->parent.user_data; in _vcom_putc()
830 RT_ASSERT(serial != RT_NULL); in _vcom_putc()
834 if(c == '\n' && (serial->parent.open_flag & RT_DEVICE_FLAG_STREAM)) in _vcom_putc()
898 if(data->serial.parent.open_flag & RT_DEVICE_FLAG_INT_TX) in vcom_tx_thread_entry()
900 if(data->serial.parent.open_flag & RT_DEVICE_FLAG_DMA_TX) in vcom_tx_thread_entry()
904 if(data->serial.parent.open_flag & RT_DEVICE_FLAG_TX_BLOCKING) in vcom_tx_thread_entry()
909 rt_hw_serial_isr(&data->serial,RT_SERIAL_EVENT_TX_DONE); in vcom_tx_thread_entry()
911 rt_hw_serial_isr(&data->serial,RT_SERIAL_EVENT_TX_DMADONE); in vcom_tx_thread_entry()
930 if(data->serial.parent.open_flag & RT_DEVICE_FLAG_INT_TX) in vcom_tx_thread_entry()
932 if(data->serial.parent.open_flag & RT_DEVICE_FLAG_DMA_TX) in vcom_tx_thread_entry()
936 if(data->serial.parent.open_flag & RT_DEVICE_FLAG_TX_BLOCKING) in vcom_tx_thread_entry()
940 rt_hw_serial_isr(&data->serial,RT_SERIAL_EVENT_TX_DONE); in vcom_tx_thread_entry()
942 rt_hw_serial_isr(&data->serial,RT_SERIAL_EVENT_TX_DMADONE); in vcom_tx_thread_entry()
975 data->serial.ops = &usb_vcom_ops; in rt_usb_vcom_init()
976 data->serial.serial_rx = RT_NULL; in rt_usb_vcom_init()
977 data->serial.config = config; in rt_usb_vcom_init()
980 rt_hw_serial_register(&data->serial, VCOM_DEVICE, in rt_usb_vcom_init()