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

Subversion Repositories ft2232hcore

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wes314
#ifndef USB_SYNC_H_
2
#define USB_SYNC_H_
3
 
4
#include <system.h>
5
#include <io.h>
6
 
7
#include "types.h"
8
 
9
#define USB_DATA_RD                     IORD_8DIRECT(USB_SYNC_0_BASE, 0)
10
#define USB_DATA_WR(data)               IOWR_8DIRECT(USB_SYNC_0_BASE, 0, data)
11
#define USB_RX_STATUS                   IORD_32DIRECT(USB_SYNC_0_BASE, 4)
12
#define USB_TX_STATUS                   IORD_32DIRECT(USB_SYNC_0_BASE, 8)
13
#define USB_TX_FULL                     (USB_TX_STATUS & (1 << 12))
14
#define USB_RX_EMPTY                    (USB_RX_STATUS & (1 << 12))
15
#define USB_TX_USED                     (USB_TX_STATUS & 0x0FFF)
16
#define USB_TX_FREE                     (4095 - USB_TX_USED)
17
 
18
 
19
void usb_putch(uint8_t c);
20
bool usb_kbhit(void);
21
uint8_t usb_getch(void);
22
void usb_print(const char *string);
23
 
24
#endif /*USB_SYNC_H_*/

powered by: WebSVN 2.1.0

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