refactor
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "../utilities/InputGPIOInterface.h"
|
#include "../utilities/InputGPIOInterface.h"
|
||||||
#include "InputEvent.h"
|
#include "InputEvent.hpp"
|
||||||
#include "InputEventNotifier.h"
|
#include "InputEventNotifier.h"
|
||||||
|
|
||||||
#define SLEEP_DURATION_NANO 900
|
#define SLEEP_DURATION_NANO 900
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
#ifndef INPUTEVENTHANDLER_H_
|
#ifndef INPUTEVENTHANDLER_H_
|
||||||
#define INPUTEVENTHANDLER_H_
|
#define INPUTEVENTHANDLER_H_
|
||||||
|
|
||||||
#include "InputEvent.h"
|
|
||||||
#include "Detector.h"
|
#include "Detector.h"
|
||||||
|
#include "InputEvent.hpp"
|
||||||
|
|
||||||
namespace Input
|
namespace Input
|
||||||
{
|
{
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
#include "../utilities/BlockingQueue.hpp"
|
#include "../utilities/BlockingQueue.hpp"
|
||||||
#include "InputEventHandler.h"
|
#include "InputEvent.hpp"
|
||||||
#include "InputEvent.h"
|
#include "InputEventHandler.hpp"
|
||||||
|
|
||||||
namespace Input
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include "InputEvent.h"
|
|
||||||
#include "Detector.h"
|
#include "Detector.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "InputEvent.hpp"
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -7,9 +7,6 @@
|
|||||||
#include "InputGPIOInterface.h"
|
#include "InputGPIOInterface.h"
|
||||||
|
|
||||||
|
|
||||||
class InputGPIOInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
bool InputGPIOInterface::read_input_data(char pin)
|
bool InputGPIOInterface::read_input_data(char pin)
|
||||||
{
|
{
|
||||||
// setting address to read
|
// setting address to read
|
||||||
@@ -33,4 +30,7 @@ void InputGPIOInterface::write_input_col(char data)
|
|||||||
write_pin(this->input_col_address, data & 0b100);
|
write_pin(this->input_col_address, data & 0b100);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
|
||||||
|
InputGPIOInterface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
class InputGPIOInterface : GPIOInterface
|
class InputGPIOInterface : GPIOInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool read_input_data();
|
InputGPIOInterface();
|
||||||
|
bool read_input_data(char pin);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void write_input_row(char data);
|
void write_input_row(char data);
|
||||||
|
|||||||
Reference in New Issue
Block a user