dereviated gpiointerface

This commit is contained in:
Jonas Zeunert
2018-05-31 15:46:41 +02:00
parent 4c820110d5
commit 21565631be
7 changed files with 127 additions and 98 deletions

View File

@@ -1,48 +0,0 @@
/*
* 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 "../lib/json/json.hpp"
using namespace nlohmann;
class GPIOInterface
{
public:
GPIOInterface(std::string config_path);
~GPIOInterface();
void write_input_row(char data);
void write_input_col(char data);
bool read_input_data();
private:
static void write_pin(char address, bool data);
static bool read_input_pin(char address);
private:
json config;
char input_row_address;
char input_col_address;
char input_data_address;
};
#endif /* SRC_UTILITIES_GPIOINTERFACE_H_ */