forked from Iskuri/Disney-Infinity-and-Skylanders-Lighting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SkylandersPortal.h
39 lines (36 loc) · 901 Bytes
/
SkylandersPortal.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
34
35
36
37
38
39
#ifndef SKYLANDERSPORTAL_H
#define SKYLANDERSPORTAL_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>
// #include "PortalAudio.h"
class SkylandersPortal {
public:
SkylandersPortal(int deviceId);
SkylandersPortal();
virtual ~SkylandersPortal();
void setColour(char r, char g, char b);
void setLeftColour(char r, char g, char b);
void setRightColour(char r, char g, char b);
unsigned char* getFigures();
unsigned char getVersion();
void activateSpeaker();
void tryAudio();
void reset();
void set();
void flashTrapLight();
void writeMaskerMind();
private:
libusb_device_handle* deviceHandler;
void writeData(char* data);
unsigned char* readData(unsigned char* data);
libusb_device_handle* connect(int deviceId);
};
#endif