API
ArcusPerformaxDriver.h
Go to the documentation of this file.
1 #ifndef _ARCUSPERFORMAXDRIVER_H_
2 #define _ARCUSPERFORMAXDRIVER_H_
3 
4 //libusb standard header file
5 #include "libusb-1.0/libusb.h"
6 
7 //these are defined by Arcus
8 #define PERFORMAX_RETURN_SERIAL_NUMBER 0x0
9 #define PERFORMAX_RETURN_DESCRIPTION 0x1
10 #define PERFORMAX_MAX_DEVICE_STRLEN 256
11 
12 //these defines are to conveniently turn these types transparent
13 //note: C does not have a bool type.
14 typedef int AR_BOOL;
15 typedef long AR_DWORD;
16 typedef void AR_VOID;
17 //typedef usb_dev_handle* AR_HANDLE;
18 typedef libusb_device_handle* AR_HANDLE;
19 
20 //the function definitions are the same as the windows API
22 AR_BOOL fnPerformaxComGetProductString(AR_DWORD dwNumDevice, AR_VOID *lpDeviceString, AR_DWORD dwOptions);
23 AR_BOOL fnPerformaxComOpen(AR_DWORD dwDeviceNum, AR_HANDLE *pHandle);
25 AR_BOOL fnPerformaxComSetTimeouts(AR_DWORD dwReadTimeout, AR_DWORD dwWriteTimeout);
26 AR_BOOL fnPerformaxComSendRecv(AR_HANDLE Handle, AR_VOID *wBuffer, AR_DWORD dwNumBytesToWrite, AR_DWORD dwNumBytesToRead, AR_VOID *rBuffer);
28 
29 //the following does _not_ need to be called before using the other functions. It is safe to ignore its existence
31 
32 #endif
33 
void AR_VOID
AR_BOOL InitializePerformaxLibrary(AR_VOID)
AR_BOOL fnPerformaxComGetNumDevices(AR_DWORD *numDevices)
int AR_BOOL
AR_BOOL fnPerformaxComGetProductString(AR_DWORD dwNumDevice, AR_VOID *lpDeviceString, AR_DWORD dwOptions)
AR_BOOL fnPerformaxComSetTimeouts(AR_DWORD dwReadTimeout, AR_DWORD dwWriteTimeout)
AR_BOOL fnPerformaxComFlush(AR_HANDLE Handle)
AR_BOOL fnPerformaxComOpen(AR_DWORD dwDeviceNum, AR_HANDLE *pHandle)
libusb_device_handle * AR_HANDLE
AR_BOOL fnPerformaxComClose(AR_HANDLE pHandle)
AR_BOOL fnPerformaxComSendRecv(AR_HANDLE Handle, AR_VOID *wBuffer, AR_DWORD dwNumBytesToWrite, AR_DWORD dwNumBytesToRead, AR_VOID *rBuffer)
long AR_DWORD