summaryrefslogtreecommitdiff
path: root/library/src/library.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'library/src/library.cpp')
-rw-r--r--library/src/library.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/library/src/library.cpp b/library/src/library.cpp
index 73f40f9..d5c51c7 100644
--- a/library/src/library.cpp
+++ b/library/src/library.cpp
@@ -11,19 +11,24 @@ static rpc::client & get_client()
return c;
}
-void stop_server()
+namespace gpio
{
- get_client().call("stop_server");
+
+void set_mode(const unsigned port, const short mode)
+{
+ get_client().call("gpio/set_mode", port, mode);
}
-void set_value(const int value)
+void write(const unsigned port, const short value)
{
- get_client().call("set_value", value);
+ get_client().call("gpio/write", port, value);
}
-int get_value()
+short read(const unsigned port)
{
- return get_client().call("get_value").as<int>();
+ return get_client().call("gpio/read", port).as<short>();
}
+} // namespace gpio
+
} // namespace hwd