|
OpenCBM
|
libusb based xu1541 access routines More...
#include <stdlib.h>#include <stdarg.h>#include <stdio.h>#include <string.h>#include <errno.h>#include "opencbm.h"#include "arch.h"#include "dynlibusb.h"#include "getpluginaddress.h"#include "xu1541.h"Go to the source code of this file.
Macros | |
| #define | TIMEOUT_DELAY 25000 |
| timeout value, used mainly after errors More... | |
Functions | |
| int | xu1541_init (void) |
| initialise the xu1541 device More... | |
| void | xu1541_close (void) |
| close the xu1541 device More... | |
| int | xu1541_ioctl (unsigned int cmd, unsigned int addr, unsigned int secaddr) |
| perform an ioctl on the xu1541 More... | |
| int | xu1541_write (const unsigned char *data, size_t len) |
| write data to the xu1541 device More... | |
| int | xu1541_read (unsigned char *data, size_t len) |
| read data from the xu1541 device More... | |
| int | xu1541_special_write (int mode, const unsigned char *data, size_t size) |
| "special" write data to the xu1541 device More... | |
| int | xu1541_special_read (int mode, unsigned char *data, size_t size) |
| "special" read data from the xu1541 device More... | |
| #define TIMEOUT_DELAY 25000 |
timeout value, used mainly after errors
Definition at line 37 of file xu1541.c.
Referenced by xu1541_ioctl(), xu1541_read(), and xu1541_write().
| void xu1541_close | ( | void | ) |
close the xu1541 device
Definition at line 243 of file xu1541.c.
Referenced by opencbm_plugin_driver_close().
| int xu1541_init | ( | void | ) |
initialise the xu1541 device
This function tries to find and identify the xu1541 device.
Definition at line 132 of file xu1541.c.
Referenced by opencbm_plugin_driver_open().
| int xu1541_ioctl | ( | unsigned int | cmd, |
| unsigned int | addr, | ||
| unsigned int | secaddr | ||
| ) |
perform an ioctl on the xu1541
| cmd | The IOCTL number |
| addr | The (IEC) device to use |
| secaddr | The (IEC) secondary address to use |
Definition at line 270 of file xu1541.c.
References TIMEOUT_DELAY.
Referenced by opencbm_plugin_clear_eoi(), opencbm_plugin_close(), opencbm_plugin_get_eoi(), opencbm_plugin_iec_poll(), opencbm_plugin_iec_release(), opencbm_plugin_iec_set(), opencbm_plugin_iec_setrelease(), opencbm_plugin_iec_wait(), opencbm_plugin_listen(), opencbm_plugin_open(), opencbm_plugin_pp_read(), opencbm_plugin_pp_write(), opencbm_plugin_reset(), opencbm_plugin_talk(), opencbm_plugin_unlisten(), and opencbm_plugin_untalk().
| int xu1541_read | ( | unsigned char * | data, |
| size_t | len | ||
| ) |
read data from the xu1541 device
| data | Pointer to a buffer which will contain the data read from the xu1541 |
| len | The number of bytes to read from the xu1541 |
Definition at line 461 of file xu1541.c.
References TIMEOUT_DELAY.
Referenced by opencbm_plugin_raw_read().
| int xu1541_special_read | ( | int | mode, |
| unsigned char * | data, | ||
| size_t | size | ||
| ) |
"special" read data from the xu1541 device
| mode |
| data | Pointer to a buffer which will contain the data read from the xu1541 |
| size | The number of bytes to read from the xu1541 |
Definition at line 636 of file xu1541.c.
Referenced by opencbm_plugin_pp_cc_read_n(), opencbm_plugin_pp_dc_read_n(), opencbm_plugin_s1_read_n(), and opencbm_plugin_s2_read_n().
| int xu1541_special_write | ( | int | mode, |
| const unsigned char * | data, | ||
| size_t | size | ||
| ) |
"special" write data to the xu1541 device
| mode |
| data | Pointer to buffer which contains the data to be written to the xu1541 |
| size | The length of the data buffer to be written to the xu1541 |
Definition at line 588 of file xu1541.c.
Referenced by opencbm_plugin_pp_cc_write_n(), opencbm_plugin_pp_dc_write_n(), opencbm_plugin_s1_write_n(), and opencbm_plugin_s2_write_n().
| int xu1541_write | ( | const unsigned char * | data, |
| size_t | len | ||
| ) |
write data to the xu1541 device
| data | Pointer to buffer which contains the data to be written to the xu1541 |
| len | The length of the data buffer to be written to the xu1541 |
Definition at line 379 of file xu1541.c.
References TIMEOUT_DELAY.
Referenced by opencbm_plugin_raw_write().
1.8.8