#include #include namespace hwd { static rpc::client & get_client() { static rpc::client c(hwd::internal::host(), hwd::internal::port()); return c; } namespace gpio { void set_mode(const unsigned port, const short mode) { get_client().call("gpio/set_mode", port, mode); } void write(const unsigned port, const short value) { get_client().call("gpio/write", port, value); } short read(const unsigned port) { return get_client().call("gpio/read", port).as(); } } // namespace gpio } // namespace hwd