示例#1
0
// number of bytes available in the receive buffer
int usb_serial_available()
{
	int count = usb_rx_byte_count( CDC_RX_ENDPOINT );
	if ( rx_packet )
		count += rx_packet->len - rx_packet->index;
	return count;
}
示例#2
0
int usb_rawhid_available(void)
{
	uint32_t count;

	if (!usb_configuration) return 0;
	count = usb_rx_byte_count(RAWHID_RX_ENDPOINT);
	return count;
}
示例#3
0
int usb_pokken_available(void)
{
	uint32_t count;

	if (!usb_configuration) return 0;
	count = usb_rx_byte_count(POKKEN_RX_ENDPOINT);
	return count;
}
示例#4
0
// number of bytes available in the receive buffer
int usb_serial_available(void)
{
	int count=0;

	if (usb_configuration) {
		count = usb_rx_byte_count(CDC_RX_ENDPOINT);
	}
	if (rx_packet) count += rx_packet->len - rx_packet->index;
	return count;
}