This commit is contained in:
Jonas Zeunert
2018-06-15 00:02:03 +02:00
parent ec41e9e314
commit d027d32e2f
19 changed files with 79 additions and 20 deletions

View File

@@ -0,0 +1,42 @@
/*
* GPIOInterface.hpp
*
* Responsible for communicating with the actual GPIO hardware.
*
* Gets a JSON file with following style:
* TODO
*
* Created on: May 6, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#ifndef SRC_UTILITIES_GPIOINTERFACE_H_
#define SRC_UTILITIES_GPIOINTERFACE_H_
#include <fstream>
#include "config.h"
#include "../lib/wiringPi/wiringPi.h"
#include "../lib/json/json.hpp"
class GPIOInterface
{
public:
GPIOInterface();
virtual ~GPIOInterface();
static void write_pin(char address, char data)
{
digitalWrite(address, data);
}
static bool read_pin(char address)
{
return digitalRead(address);
}
};
#endif /* SRC_UTILITIES_GPIOINTERFACE_H_ */