Exemple #1
0
/* Try to send some bytes to the host */
int tx_stream_handler(struct usb_stream_config const *config)
{
	size_t count;

	if (!*config->is_reset)
		return 0;

	count = QUEUE_REMOVE_UNITS(config->consumer.queue, config->tx_ram,
				   config->tx_size);
	if (count)
		usb_enable_tx(config, count);
	return count;
}
Exemple #2
0
/* Try to send some bytes to the host */
static void tx_fifo_handler(void)
{
	size_t count;

	if (!is_reset)
		return;

	/* If the HW FIFO isn't ready, then we can't do anything right now. */
	if (!tx_fifo_is_ready())
		return;

	count = get_bytes_from_blob(ep_buf_tx, USB_MAX_PACKET_SIZE);
	if (count)
		usb_enable_tx(count);
}
Exemple #3
0
/* Try to send some bytes to the host */
static void tx_fifo_handler(void)
{
	struct dwc_usb_ep *ep = &ep_console_ctl;
	size_t count;

	if (!is_reset)
		return;

	/* If the HW FIFO isn't ready, then we can't do anything right now. */
	if (!tx_fifo_is_ready())
		return;

	count = QUEUE_REMOVE_UNITS(&tx_q,
		ep->in_databuffer, USB_MAX_PACKET_SIZE);
	if (count)
		usb_enable_tx(count);
}