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

Subversion Repositories ft2232hcore

[/] [ft2232hcore/] [trunk/] [nios_test_app/] [hardware/] [usb_sync/] [usb_sync.cpp] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wes314
 
2
#include "hardware/usb_sync/usb_sync.h"
3
 
4
 
5
void usb_putch(uint8_t c)
6
{
7
        while (USB_TX_FULL);
8
        USB_DATA_WR(c);
9
}
10
 
11
bool usb_kbhit(void)
12
{
13
        return !USB_RX_EMPTY;
14
}
15
 
16
uint8_t usb_getch(void)
17
{
18
        while (USB_RX_EMPTY);
19
        return USB_DATA_RD;
20
}
21
 
22
void usb_print(const char *string)
23
{
24
        while (*string != 0)
25
        {
26
                usb_putch(*string);
27
                string++;
28
        }
29
}

powered by: WebSVN 2.1.0

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