-
Notifications
You must be signed in to change notification settings - Fork 23
/
gpio.proto
73 lines (58 loc) · 930 Bytes
/
gpio.proto
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
syntax = "proto3";
package PB_Gpio;
option java_package = "com.flipperdevices.protobuf.gpio";
enum GpioPin {
PC0 = 0;
PC1 = 1;
PC3 = 2;
PB2 = 3;
PB3 = 4;
PA4 = 5;
PA6 = 6;
PA7 = 7;
};
enum GpioPinMode {
OUTPUT = 0;
INPUT = 1;
};
enum GpioInputPull {
NO = 0;
UP = 1;
DOWN = 2;
};
enum GpioOtgMode {
OFF = 0;
ON = 1;
};
message SetPinMode {
GpioPin pin = 1;
GpioPinMode mode = 2;
}
message SetInputPull {
GpioPin pin = 1;
GpioInputPull pull_mode = 2;
}
message GetPinMode {
GpioPin pin = 1;
}
message GetPinModeResponse {
GpioPinMode mode = 1;
}
message ReadPin {
GpioPin pin = 1;
}
message ReadPinResponse {
uint32 value = 2;
}
message WritePin {
GpioPin pin = 1;
uint32 value = 2;
}
message GetOtgMode {
};
message GetOtgModeResponse {
GpioOtgMode mode = 1;
};
message SetOtgMode {
GpioOtgMode mode = 1;
};