refactored utility namespace
This commit is contained in:
47
FlippR-Driver/src/utility/GPIOInterface.h
Normal file
47
FlippR-Driver/src/utility/GPIOInterface.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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 <mutex>
|
||||
#include <fstream>
|
||||
namespace FlippR_Driver
|
||||
{
|
||||
namespace utility
|
||||
{
|
||||
|
||||
class GPIOInterface
|
||||
{
|
||||
public:
|
||||
GPIOInterface();
|
||||
|
||||
virtual ~GPIOInterface()
|
||||
{};
|
||||
|
||||
static void initialize_input_pin(char address);
|
||||
|
||||
static void initialize_output_pin(char address);
|
||||
|
||||
static void write_pin(char address, char data);
|
||||
|
||||
static bool read_pin(char address);
|
||||
|
||||
public:
|
||||
static std::once_flag GPIO_LIB_INITIALIZED;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user