OpenCores
URL https://opencores.org/ocsvn/ft2232hcore/ft2232hcore/trunk

Subversion Repositories ft2232hcore

[/] [ft2232hcore/] [trunk/] [nios_test_app/] [hardware/] [usb_sync/] [usb_sync.cpp] - Rev 2

Compare with Previous | Blame | View Log

 
#include "hardware/usb_sync/usb_sync.h"
 
 
void usb_putch(uint8_t c)
{
	while (USB_TX_FULL);
	USB_DATA_WR(c);
}
 
bool usb_kbhit(void)
{
	return !USB_RX_EMPTY;
}
 
uint8_t usb_getch(void)
{
	while (USB_RX_EMPTY);
	return USB_DATA_RD;
}
 
void usb_print(const char *string)
{
	while (*string != 0)
	{
		usb_putch(*string);
		string++;
	}
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.