libsidplayfp
2.0.2
|
Go to the source code of this file.
Macros | |
#define | XSFW_EXTERN extern |
#define | XSFW_PROTODEF(a) XSFW_EXTERN a ## _p a |
Typedefs | |
typedef void *(* | xSfw_new_p) (void) |
typedef void(* | xSfw_free_p) (void *ftdi) |
typedef int(* | xSfw_write_data_p) (void *ftdi, const unsigned char *buf, int size) |
typedef int(* | xSfw_read_data_p) (void *ftdi, unsigned char *buf, int size) |
typedef int(* | xSfw_usb_open_desc_p) (void **ftdi, int vid, int pid, const char *desc, const char *serial) |
typedef int(* | xSfw_usb_purge_buffers_p) (void *ftdi) |
typedef int(* | xSfw_usb_close_p) (void *ftdi) |
typedef char *(* | xSfw_get_error_string_p) (void *ftdi) |
Functions | |
XSFW_PROTODEF (xSfw_new) | |
Handle allocation callback. | |
XSFW_PROTODEF (xSfw_free) | |
Handle deallocation callback. | |
XSFW_PROTODEF (xSfw_write_data) | |
Data write callback. | |
XSFW_PROTODEF (xSfw_read_data) | |
Data read callback. | |
XSFW_PROTODEF (xSfw_usb_open_desc) | |
Device open callback. | |
XSFW_PROTODEF (xSfw_usb_purge_buffers) | |
Device buffers purge callback. | |
XSFW_PROTODEF (xSfw_usb_close) | |
Device close callback. | |
XSFW_PROTODEF (xSfw_get_error_string) | |
Human readable error string callback. | |
int | xSfw_usb_setup (void *ftdi, int baudrate, int latency) |
int | xSfw_dlopen () |
void | xSfw_dlclose () |
FTDI access wrapper header file.
typedef void(* xSfw_free_p) (void *ftdi) |
Free ftdi handle.
typedef char*(* xSfw_get_error_string_p) (void *ftdi) |
Get error string.
ftdi | ftdi handle. |
typedef void*(* xSfw_new_p) (void) |
Allocate new ftdi handle.
typedef int(* xSfw_read_data_p) (void *ftdi, unsigned char *buf, int size) |
Read data from FTDI.
ftdi | ftdi handle. |
buf | read buffer. |
size | number of bytes to read. |
typedef int(* xSfw_usb_close_p) (void *ftdi) |
Close FTDI device.
typedef int(* xSfw_usb_open_desc_p) (void **ftdi, int vid, int pid, const char *desc, const char *serial) |
Open device by description.
ftdi | pointer to ftdi handle. |
vid | target vendor id. Ignored by ftd2xx. |
pid | target product id. Ignored by ftd2xx. |
desc | Description string. |
serial | target product serial. Ignored by ftd2xx. |
typedef int(* xSfw_usb_purge_buffers_p) (void *ftdi) |
Purge FTDI buffers.
typedef int(* xSfw_write_data_p) (void *ftdi, const unsigned char *buf, int size) |
Write data to FTDI.
ftdi | ftdi handle. |
buf | write buffer. |
size | number of bytes to write. |
void xSfw_dlclose | ( | ) |
Release dlopen'd library.
int xSfw_dlopen | ( | ) |
Attempt to dlopen a known working library to access FTDI chip. Will try libftd2xx first, then libftdi.
int xSfw_usb_setup | ( | void * | ftdi, |
int | baudrate, | ||
int | latency | ||
) |
Setup FTDI chip to match exSID firmware. Defaults to 8N1, no flow control.
ftdi | ftdi handle |
baudrate | Target baudrate |
latency | Target latency |