17#ifndef included_Retro_RlinkPortCuff
18#define included_Retro_RlinkPortCuff 1
23#include <libusb-1.0/libusb.h>
37 virtual bool Open(
const std::string& url,
RerrMsg& emsg);
84 [[noreturn]]
void BadSysCall(
const char* meth,
const char* text,
int rc);
85 [[noreturn]]
void BadUSBCall(
const char* meth,
const char* text,
int rc);
static const int kUSBWriteEP
USB write endpoint.
void PollfdRemove(int fd)
FIXME_docs.
void Cleanup()
FIXME_docs.
int fFdWriteDriver
fd for write (driver end)
static void ThunkPollfdRemove(int fd, void *udata)
FIXME_docs.
virtual void Close()
FIXME_docs.
void USBWriteDone(libusb_transfer *t)
FIXME_docs.
bool OpenPipe(int &fdread, int &fdwrite, RerrMsg &emsg)
FIXME_docs.
libusb_device_handle * fpUsbDevHdl
void DriverEventWritePipe()
FIXME_docs.
void BadUSBCall(const char *meth, const char *text, int rc)
FIXME_docs.
static const size_t kUSBBufferSize
USB buffer size.
void DriverEventUSB()
FIXME_docs.
const char * USBErrorName(int rc)
FIXME_docs.
bool TraceOn()
FIXME_docs.
void USBReadDone(libusb_transfer *t)
FIXME_docs.
void BadSysCall(const char *meth, const char *text, int rc)
FIXME_docs.
std::thread fDriverThread
driver thread
std::deque< libusb_transfer * > fReadQueuePending
std::vector< pollfd > fPollFds
void CheckUSBTransfer(const char *meth, libusb_transfer *t)
FIXME_docs.
std::deque< libusb_transfer * > fWriteQueueFree
RlinkPortCuff()
Default constructor.
virtual ~RlinkPortCuff()
Destructor.
void PollfdAdd(int fd, short events)
FIXME_docs.
libusb_context * fpUsbContext
static void ThunkPollfdAdd(int fd, short events, void *udata)
FIXME_docs.
libusb_device ** fpUsbDevList
static void ThunkUSBWriteDone(libusb_transfer *t)
FIXME_docs.
libusb_transfer * NewWriteTransfer()
FIXME_docs.
std::deque< libusb_transfer * > fWriteQueuePending
static void ThunkUSBReadDone(libusb_transfer *t)
FIXME_docs.
static const size_t kUSBReadQueue
USB read queue length.
static const int kUSBReadEP
USB read endpoint.
virtual bool Open(const std::string &url, RerrMsg &emsg)
FIXME_docs.
int fFdReadDriver
fd for read (driver end)
Declaration of class ReventLoop.