Skip to content

Commit 10a1689

Browse files
authored
Merge pull request #903 from meshtastic/serial_hal
Add SerialHal proto definitions
2 parents 249a808 + 59d806d commit 10a1689

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

meshtastic/serial_hal.proto

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
syntax = "proto3";
2+
3+
package meshtastic;
4+
5+
option csharp_namespace = "Meshtastic.Protobufs";
6+
option go_package = "github.com/meshtastic/go/generated";
7+
option java_outer_classname = "SerialHal";
8+
option java_package = "org.meshtastic.proto";
9+
option swift_prefix = "";
10+
11+
message SerialHalCommand {
12+
enum Type {
13+
UNSET = 0;
14+
PIN_MODE = 1;
15+
DIGITAL_WRITE = 2;
16+
DIGITAL_READ = 3;
17+
ATTACH_INTERRUPT = 4;
18+
DETACH_INTERRUPT = 5;
19+
SPI_TRANSFER = 6;
20+
NOOP = 7;
21+
}
22+
23+
uint32 transaction_id = 1;
24+
Type type = 2;
25+
uint32 pin = 3;
26+
uint32 value = 4;
27+
uint32 mode = 5;
28+
bytes data = 6;
29+
}
30+
31+
message SerialHalResponse {
32+
enum Result {
33+
OK = 0;
34+
ERROR = 1;
35+
BAD_REQUEST = 2;
36+
UNSUPPORTED = 3;
37+
}
38+
39+
uint32 transaction_id = 1;
40+
Result result = 2;
41+
uint32 value = 3;
42+
bytes data = 4;
43+
string error = 5;
44+
}

0 commit comments

Comments
 (0)