blob: e3941f6c31ad115df5979ceb841a6f8e605924a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#pragma once
#include <array>
#include <rpc/server.h>
#include "Assembly.h"
class Gpio
{
public:
void apply(AssemblyContext ctx);
private:
static constexpr unsigned SIZE {24};
std::array<short, SIZE> mode_of;
std::array<short, SIZE> value_of;
void set_mode(const unsigned port, const short mode);
void write(const unsigned port, const short value);
short read(const unsigned port) const;
};
|