31 #define DBG_PROGNAME "OPENCBM-XU1541.DLL"
42 #define OPENCBM_PLUGIN
70 UNREFERENCED_PARAMETER(Port);
72 return "libusb/xu1541";
98 UNREFERENCED_PARAMETER(Port);
262 return xu1541_ioctl(XU1541_LISTEN, DeviceAddress, SecondaryAddress);
291 return xu1541_ioctl(XU1541_TALK, DeviceAddress, SecondaryAddress);
318 return xu1541_ioctl(XU1541_OPEN, DeviceAddress, SecondaryAddress);
345 return xu1541_ioctl(XU1541_CLOSE, DeviceAddress, SecondaryAddress);
503 return (
unsigned char)
xu1541_ioctl(XU1541_PP_READ, 0, 0);
int CBMAPIDECL opencbm_plugin_raw_read(CBM_FILE HandleDevice, void *Buffer, size_t Count)
Read data from the IEC serial bus.
int CBMAPIDECL opencbm_plugin_open(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
Open a file on the IEC serial bus.
void CBMAPIDECL opencbm_plugin_driver_close(CBM_FILE HandleDevice)
Closes the driver.
Define makros for debugging purposes.
void CBMAPIDECL opencbm_plugin_iec_set(CBM_FILE HandleDevice, int Line)
Activate a line on the IEC serial bus.
int CBMAPIDECL opencbm_plugin_reset(CBM_FILE HandleDevice)
RESET all devices.
void xu1541_close(void)
close the xu1541 device
void CBMAPIDECL opencbm_plugin_lock(CBM_FILE HandleDevice)
Lock the parallel port for the driver.
int CBMAPIDECL opencbm_plugin_iec_wait(CBM_FILE HandleDevice, int Line, int State)
Wait for a line to have a specific state.
int xu1541_ioctl(unsigned int cmd, unsigned int addr, unsigned int secaddr)
perform an ioctl on the xu1541
int CBMAPIDECL opencbm_plugin_iec_poll(CBM_FILE HandleDevice)
Read status of all bus lines.
int xu1541_init(void)
initialise the xu1541 device
int CBMAPIDECL opencbm_plugin_driver_open(CBM_FILE *HandleDevice, const char *const Port)
Opens the driver.
int xu1541_read(unsigned char *data, size_t len)
read data from the xu1541 device
int CBMAPIDECL opencbm_plugin_raw_write(CBM_FILE HandleDevice, const void *Buffer, size_t Count)
Write data to the IEC serial bus.
void CBMAPIDECL opencbm_plugin_unlock(CBM_FILE HandleDevice)
Unlock the parallel port for the driver.
int CBMAPIDECL opencbm_plugin_talk(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
Send a TALK on the IEC serial bus.
int CBMAPIDECL opencbm_plugin_close(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
Close a file on the IEC serial bus.
int CBMAPIDECL opencbm_plugin_get_eoi(CBM_FILE HandleDevice)
Get EOI flag after bus read.
const char *CBMAPIDECL opencbm_plugin_get_driver_name(const char *const Port)
Get the name of the driver for a specific parallel port.
unsigned char CBMAPIDECL opencbm_plugin_pp_read(CBM_FILE HandleDevice)
Read a byte from a XP1541/XP1571 cable.
int CBMAPIDECL opencbm_plugin_untalk(CBM_FILE HandleDevice)
Send an UNTALK on the IEC serial bus.
void CBMAPIDECL opencbm_plugin_pp_write(CBM_FILE HandleDevice, unsigned char Byte)
Write a byte to a XP1541/XP1571 cable.
void CBMAPIDECL opencbm_plugin_iec_release(CBM_FILE HandleDevice, int Line)
Deactivate a line on the IEC serial bus.
int CBMAPIDECL opencbm_plugin_unlisten(CBM_FILE HandleDevice)
Send an UNLISTEN on the IEC serial bus.
int CBMAPIDECL opencbm_plugin_listen(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
Send a LISTEN on the IEC serial bus.
int CBMAPIDECL opencbm_plugin_clear_eoi(CBM_FILE HandleDevice)
Reset the EOI flag.
void CBMAPIDECL opencbm_plugin_iec_setrelease(CBM_FILE HandleDevice, int Set, int Release)
Activate and deactive a line on the IEC serial bus.
int xu1541_write(const unsigned char *data, size_t len)
write data to the xu1541 device