2016-09-07 07:36:43 +01:00
|
|
|
#ifndef WINUSBDRIVER_H
|
|
|
|
#define WINUSBDRIVER_H
|
|
|
|
|
2016-10-20 02:54:05 +01:00
|
|
|
//libusbK includes
|
|
|
|
#include <windows.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <conio.h>
|
|
|
|
#include "libusbk.h"
|
2016-10-24 02:40:06 +01:00
|
|
|
|
2016-10-17 23:44:58 +01:00
|
|
|
#include "genericusbdriver.h"
|
2016-09-07 07:36:43 +01:00
|
|
|
|
2016-10-17 23:44:58 +01:00
|
|
|
class winUsbDriver : public genericUsbDriver
|
2016-09-07 07:36:43 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2016-10-17 02:53:44 +01:00
|
|
|
//Generic Functions
|
|
|
|
explicit winUsbDriver(QWidget *parent = 0);
|
|
|
|
~winUsbDriver();
|
2016-10-20 07:16:09 +01:00
|
|
|
void usbSendControl(uint8_t RequestType, uint8_t Request, uint16_t Value, uint16_t Index, uint16_t Length, unsigned char *LDATA);
|
2016-10-17 23:44:58 +01:00
|
|
|
char *isoRead(unsigned int *newLength);
|
2016-09-07 07:36:43 +01:00
|
|
|
private:
|
2016-10-17 02:53:44 +01:00
|
|
|
//USB Vars
|
|
|
|
KUSB_HANDLE handle = NULL;
|
|
|
|
//USBIso Vars
|
2016-10-13 23:17:00 +01:00
|
|
|
PKISO_CONTEXT isoCtx[NUM_FUTURE_CTX];
|
|
|
|
KOVL_HANDLE ovlkHandle[NUM_FUTURE_CTX];
|
|
|
|
KOVL_POOL_HANDLE ovlPool;
|
|
|
|
unsigned char dataBuffer[NUM_FUTURE_CTX][ISO_PACKET_SIZE*ISO_PACKETS_PER_CTX];
|
2016-10-17 02:53:44 +01:00
|
|
|
//Generic Functions
|
2016-10-20 02:54:05 +01:00
|
|
|
unsigned char usbInit(unsigned long VIDin, unsigned long PIDin);
|
2016-10-17 02:53:44 +01:00
|
|
|
unsigned char usbIsoInit(void);
|
2016-09-07 07:36:43 +01:00
|
|
|
signals:
|
|
|
|
public slots:
|
2016-11-10 04:50:34 +00:00
|
|
|
void isoTimerTick(void);
|
2016-09-07 07:36:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // WINUSBDRIVER_H
|