forked from Iskuri/Disney-Infinity-and-Skylanders-Lighting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
InfinityPortal.h
33 lines (30 loc) · 797 Bytes
/
InfinityPortal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef INFINITYPORTAL_H
#define INFINITYPORTAL_H
#include <stdio.h>
#include "libusb-1.0/libusb.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <iostream>
#include <cstdlib>
#include <math.h>
#include <unistd.h>
class InfinityPortal {
public:
InfinityPortal();
InfinityPortal(int deviceId);
virtual ~InfinityPortal();
libusb_device_handle* deviceHandler;
void setColour(char platform, char r, char g, char b);
void flashColour(char platform, char r, char g, char b);
void fadeColour(char platform, char r, char g, char b);
void activate();
void getTagId();
private:
void processReceivedPacket(unsigned char* packet);
void sendPacket(unsigned char* packet);
int receivePackets();
libusb_device_handle* connect(int deviceId);
};
#endif