summaryrefslogtreecommitdiff
path: root/library/src/gpio.cpp
blob: e31a845f0768a6eea2b1c2f89d6c31c96be822e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "hwd.h"

#include "client.h"


namespace hwd
{
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<short>();
}

}  // namespace gpio
}  // namespace hwd