OpenCBM
LINUX/dynlibusb.c
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2010 Spiro Trikaliotis
8  *
9 */
10 
19 #include <stdio.h>
20 #include <stdarg.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdarg.h>
24 
25 #include "opencbm.h"
26 
27 #include "arch.h"
28 #include "dynlibusb.h"
29 #include "getpluginaddress.h"
30 
31 usb_dll_t usb = {
32  .shared_object_handle = NULL,
33  .open = usb_open,
34  .close = usb_close,
35  .bulk_write = usb_bulk_write,
36  .bulk_read = usb_bulk_read,
37  .control_msg = usb_control_msg,
38  .set_configuration = usb_set_configuration,
39  .claim_interface = usb_claim_interface,
40  .release_interface = usb_release_interface,
41  .clear_halt = usb_clear_halt,
42  .strerror = usb_strerror,
43  .init = usb_init,
44  .find_busses = usb_find_busses,
45  .find_devices = usb_find_devices,
46  .device = usb_device,
47  .get_busses = usb_get_busses
48 };
49 
50 int dynlibusb_init(void) {
51  int error = 0;
52 
53  return error;
54 }
55 
56 void dynlibusb_uninit(void) {
57 }
Allow for libusb (0.1) to be loaded dynamically (Currently, this is used on Windows only) ...
Shared library / DLL for accessing the driver Functions for obtaining the addresses of plugin functio...
DLL interface for accessing the driver.
Define makros and functions which account for differences between the different architectures.