32 lines
554 B
C++
32 lines
554 B
C++
|
|
/*
|
|||
|
|
* DiscreteInput.h
|
|||
|
|
*
|
|||
|
|
* Created on: 1 <EFBFBD><EFBFBD><EFBFBD>. 2016 <EFBFBD>.
|
|||
|
|
* Author: titov
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#ifndef SOURCE_DRIVER_DISCRETEINPUT_H_
|
|||
|
|
#define SOURCE_DRIVER_DISCRETEINPUT_H_
|
|||
|
|
|
|||
|
|
#include "../systemic/IStatus.hh"
|
|||
|
|
#include "../peripheral/IGpio.hh"
|
|||
|
|
|
|||
|
|
namespace driver { namespace detail {
|
|||
|
|
|
|||
|
|
class DiscreteInput : public systemic::IStatus {
|
|||
|
|
protected:
|
|||
|
|
const peripheral::IGpio & input;
|
|||
|
|
const bool level;
|
|||
|
|
public:
|
|||
|
|
DiscreteInput(const peripheral::IGpio &, bool level);
|
|||
|
|
operator bool() const;
|
|||
|
|
|
|||
|
|
~DiscreteInput() = default;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
}}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif /* SOURCE_DRIVER_DISCRETEINPUT_H_ */
|