Labrador/Desktop Interface/winusbdriver.h

43 lines
1.1 KiB
C
Raw Normal View History

2016-09-07 07:36:43 +01:00
#ifndef WINUSBDRIVER_H
#define WINUSBDRIVER_H
//libusbK includes
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include "libusbk.h"
#include "genericusbdriver.h"
2016-09-07 07:36:43 +01:00
class winUsbDriver : public genericUsbDriver
2016-09-07 07:36:43 +01:00
{
Q_OBJECT
public:
//Generic Functions
explicit winUsbDriver(QWidget *parent = 0);
~winUsbDriver();
void usbSendControl(int RequestType, int Request, int Value, int Index, int Length, unsigned char *LDATA);
char *isoRead(unsigned int *newLength);
2016-09-07 07:36:43 +01:00
private:
//USB Vars
KUSB_HANDLE handle = NULL;
unsigned char pipeID = 0x83;
//USBIso Vars
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];
QTimer *isoTimer;
unsigned char currentWriteBuffer = 0;
unsigned long timerCount = 0;
//Generic Functions
unsigned char usbInit(unsigned long VIDin, unsigned long PIDin);
unsigned char usbIsoInit(void);
2016-09-07 07:36:43 +01:00
signals:
public slots:
void isoTimerTick(void);
2016-09-07 07:36:43 +01:00
};
#endif // WINUSBDRIVER_H