OpenCBM
xu1541.h
1 #ifndef XU1541_H
2 #define XU1541_H
3 
4 #include <stdio.h>
5 #include <usb.h>
6 
7 #include "opencbm.h"
8 
9 #ifndef FUNC_ENTER
10  #define FUNC_ENTER()
11 #endif
12 
13 /* time out 10% after device itself times out */
14 /* so make sure we should normally never time out on usb */
15 #define USB_TIMEOUT (XU1541_W4L_TIMEOUT * 1100)
16 
17 #include "xu1541_types.h"
18 
19 /* vendor and product id (donated by ftdi) */
20 #define XU1541_VID 0x0403
21 #define XU1541_PID 0xc632
22 
23 /* calls required for standard io */
24 extern int xu1541_init(void);
25 extern void xu1541_close(void);
26 extern int xu1541_ioctl(unsigned int cmd, unsigned int addr, unsigned int secaddr);
27 extern int xu1541_write(const unsigned char *data, size_t len);
28 extern int xu1541_read(unsigned char *data, size_t len);
29 
30 /* calls for speeder supported modes */
31 extern int xu1541_special_write(int mode, const unsigned char *data, size_t size);
32 extern int xu1541_special_read(int mode, unsigned char *data, size_t size);
33 
34 #endif // XU1541_H
int xu1541_special_read(int mode, unsigned char *data, size_t size)
"special" read data from the xu1541 device
Definition: xu1541.c:636
void xu1541_close(void)
close the xu1541 device
Definition: xu1541.c:243
int xu1541_ioctl(unsigned int cmd, unsigned int addr, unsigned int secaddr)
perform an ioctl on the xu1541
Definition: xu1541.c:270
int xu1541_special_write(int mode, const unsigned char *data, size_t size)
"special" write data to the xu1541 device
Definition: xu1541.c:588
int xu1541_init(void)
initialise the xu1541 device
Definition: xu1541.c:132
int xu1541_read(unsigned char *data, size_t len)
read data from the xu1541 device
Definition: xu1541.c:461
DLL interface for accessing the driver.
int xu1541_write(const unsigned char *data, size_t len)
write data to the xu1541 device
Definition: xu1541.c:379