Renamed project.

This commit is contained in:
2018-08-12 09:38:39 +00:00
parent cf69741c24
commit 76d92d4cd7
3 changed files with 3 additions and 3 deletions

56
U2FDevice.cpp Normal file
View File

@@ -0,0 +1,56 @@
#include <iostream>
#include "Storage.hpp"
#include "Controller.hpp"
#include "LED.hpp"
#include <signal.h>
#include <unistd.h>
using namespace std;
void signalCallback(int signum);
volatile bool contProc = true;
int main()
{
try
{
disableACTTrigger(true);
enableACTLED(false);
}
catch (runtime_error &e)
{
cerr << e.what() << endl;
}
signal(SIGINT, signalCallback);
Storage::init();
Controller ch{ 0xF1D00000 };
while (contProc)
{
ch.handleTransaction();
usleep(10000);
}
Storage::save();
try
{
disableACTTrigger(false);
enableACTLED(true);
}
catch (runtime_error &e)
{
cerr << e.what() << endl;
}
return EXIT_SUCCESS;
}
void signalCallback([[maybe_unused]] int signum)
{
contProc = false;
clog << "\nCaught SIGINT signal" << endl;
}