summaryrefslogtreecommitdiff
path: root/library/src/memory.cpp
blob: c3c5b2ab071fd5b52719b6dd4a1d628bdf9b2248 (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
#include "hwd.h"

#include <cstddef>
#include <vector>

#include "client.h"


namespace hwd
{
namespace memory
{

std::vector<char> read(std::size_t len, std::size_t off)
{
	return get_client().call("memory/read", len, off).as<std::vector<char>>();
}

bool write(const std::vector<char> data, std::size_t off)
{
	return get_client().call("memory/write", data, off).as<bool>();
}

}  // namespace memory
}  // namespace hwd