HomeGPT v.1.0
HomeGPT revolutionizes home automation with advanced features such as facial recognition for secure access, mood-responsive lighting, RFID-enabled garage entry, and clap-activated door closures. This system elevates the living experience by seamlessly blending security, convenience, and ambiance-enhancing technology.
Loading...
Searching...
No Matches
gpio.h
Go to the documentation of this file.
1// Copyright (C) 2021 twyleg
2#pragma once
3
4#include <string>
5
6namespace spidevpp {
7
8class Gpio {
9
10public:
11
12 enum class Direction {
13 INPUT,
14 OUTPUT
15 };
16
17 enum class Value {
18 low = 0,
19 high = 1
20 };
21
22 Gpio(unsigned int pin, Direction direction, Value initialValue = Value::low);
23
24 void setValue(Value);
26
27private:
28
29 const unsigned int mPin;
30 const Direction mDirection;
31 const std::string mDirectionFilePath;
32 const std::string mValueFilePath;
33
34 Value mValue;
35
36};
37
38}
Definition: gpio.h:8
Direction
Definition: gpio.h:12
Value
Definition: gpio.h:17
Value getValue()
Definition: gpio.cc:63
void setValue(Value)
Definition: gpio.cc:56
Definition: gpio.cc:9