-
Notifications
You must be signed in to change notification settings - Fork 185
/
Copy pathlpc55-pins.idol
45 lines (45 loc) · 1.26 KB
/
lpc55-pins.idol
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Interface(
name: "Pins",
ops: {
"iocon_configure_raw": (
args: {
"pin": (type: "Pin", recv: FromPrimitive("u32")),
"conf": "u32",
},
reply: Simple("()"),
idempotent: true,
),
"set_dir": (
args: {
"pin": (type: "Pin", recv: FromPrimitive("u32")),
"dir": (type: "Direction", recv: FromPrimitive("u32")),
},
reply: Simple("()"),
idempotent: true,
),
"set_val": (
args: {
"pin": (type: "Pin", recv: FromPrimitive("u32")),
"val": (type: "Value", recv: FromPrimitive("u8")),
},
reply: Simple("()"),
idempotent: true,
),
"read_val": (
args: {
"pin": (type: "Pin", recv: FromPrimitive("u32")),
},
reply: Simple((type: "Value", recv: FromPrimitive("u8"))),
idempotent: true,
),
"toggle": (
args: {
"pin": (type: "Pin", recv: FromPrimitive("u32")),
},
reply: Result(
ok: "()",
err: ServerDeath,
)
),
}
)