/*
 * InputPinController.h
 *
 *  Created on: May 31, 2018
 *      Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
 */

#ifndef SRC_UTILITIES_INPUTGPIOINTERFACE_H_
#define SRC_UTILITIES_INPUTGPIOINTERFACE_H_

#include "input/InputPinController.h"

#include <istream>
#include <map>

#include "PinController.h"

namespace flippR_driver
{
namespace input
{
namespace detail
{

class InputPinController : public input::InputPinController, public PinController
{
public:
  explicit InputPinController(std::map<std::string, uint8_t> pins);
  bool read_data(uint8_t pin) const override;

private:
  void init_pins() const;
  void write_row(uint8_t data) const;
  void write_col(uint8_t data) const;

private:
  const std::map<std::string, uint8_t> pins;

};

}
}
}
#endif