Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpio.proto - github.com/flipperdevices/flipperzero-protobuf.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 446ae141100b69e4df9b8eb5e39fa81e97cc9506 (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
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
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;
};

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;
}