]> Joshua Wise's Git repositories - s3load.git/blob - libnexys.h
GPLv2
[s3load.git] / libnexys.h
1 /* libnexys.h
2  * Main include file for libnexys
3  * libnexys, a free driver for Digilent NEXYS2 boards
4  *
5  * Copyright (c) 2007-2008 Joshua Wise
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License.
10  *
11  * Commercial licenses are available by request.
12  */
13 #ifndef _LIBNEXYS_H
14 #define _LIBNEXYS_H
15
16 #ifdef LIBNEXYS_INTERNAL
17 #ifdef WIN32_NATIVE
18 #       include <windows.h>
19 #       include "gendefs.h"
20 #       include "dpcdefs.h"
21 #       include "dpcutil.h"
22         typedef HANDLE nexys2_t;
23 #else
24 #ifdef PARPORT
25         typedef int nexys2_t;
26 #else
27 #       include <usb.h>
28         typedef usb_dev_handle *nexys2_t;
29 #endif
30 #endif
31 #else
32         typedef void *nexys2_t;
33 #endif
34
35 extern nexys2_t nexys2_init(void);
36 extern int nexys2_jtag_enable(nexys2_t dev);
37 extern int nexys2_jtag_disable(nexys2_t dev);
38 extern int nexys2_jtag_setbits(nexys2_t dev, int tms, int tdi, int tck);
39 extern int nexys2_jtag_puttdi(nexys2_t dev, int tms, int nbits, unsigned char *bits, unsigned char *obits);
40 extern int nexys2_jtag_puttmstdi(nexys2_t dev, int nbits, unsigned char *bits, unsigned char *obits);
41 extern int nexys2_jtag_gettdo(nexys2_t dev, int tdi, int tms, int nbits, unsigned char *obits);
42
43 #endif
This page took 0.027737 seconds and 4 git commands to generate.