working on big refactor

This commit is contained in:
Jonas Zeunert
2018-12-14 01:09:54 +01:00
parent f3100004b9
commit 2aee0f4f9d
67 changed files with 914 additions and 619 deletions

View File

@@ -0,0 +1,43 @@
/*
* PinController.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
*/
#ifndef SRC_UTILITIES_GPIOINTERFACE_H_
#define SRC_UTILITIES_GPIOINTERFACE_H_
#include <mutex>
#include <fstream>
namespace flippR_driver
{
class PinController
{
public:
PinController();
virtual ~PinController() = default;
protected:
static void initialize_input_pin(uint8_t address);
static void initialize_output_pin(uint8_t address);
static void write_pin(uint8_t address, bool value);
static bool read_pin(uint8_t address);
public:
static std::once_flag GPIO_LIB_INITIALIZED;
};
}
#endif