-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhid_con.cpp
More file actions
77 lines (70 loc) · 1.5 KB
/
hid_con.cpp
File metadata and controls
77 lines (70 loc) · 1.5 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// hid_con.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "hid.h"
#include <iostream>
using namespace std;
char buffer_out[64];
char buffer_in[64];
int c=0;
void dioda()
{
if(c%4==0)
buffer_out[1]=1;
if(c%4==1)
buffer_out[1]=2;
if(c%4==2)
buffer_out[1]=8;
if(c%4==3)
buffer_out[1]=4;
}
int _tmain(int argc, _TCHAR* argv[])
{
cout << "Starting George, please wait...\n";
cout << "Initializing CPU";
for(int a=0;a<5;a++)
{
cout <<".";
Sleep(100);
}cout << "[Done]\n";
cout << "Initializing memory unit";
for(int a=0;a<5;a++)
{
cout <<".";
Sleep(100);
}cout << "[Done]\n";
cout << "Loading pins\n";
int l=0;
for(int a=0;a<10;a++)
{
cout << "Initiating Pin" << l << " ........[Done]\n";
Sleep(100);
l++;
}cout << "[Done]\n";
cout << "====================================================================\n";
cout << " GEORGE \n";
cout << "---------------------------------------------------------------------\n";
cout << "Welcome to George,\n";
cout << "Switching to monitor mode...\n";
Sleep(100);
cout << "Monitor mode : ON\n";
cout << "George engine status:......[Ready]\n";
cout << ">>Terminal\n";
for (int i=0;i<64;i++) {
buffer_out[i]=0;
buffer_in[i]=0;
}
FindTheHID();
while(1)
{
getchar();
dioda();
WriteOutputReport(buffer_out);
c++;
//ReadInputReport(buffer_in);
//WriteOutputReport(buffer_out);
Sleep(100);
}
system("pause");
return 0;
}