working on big refactor
This commit is contained in:
43
FlippR-Driver/src/PinController.h
Normal file
43
FlippR-Driver/src/PinController.h
Normal 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
|
||||
Reference in New Issue
Block a user