Files
squeezelite-esp32/protobuf/proto/Devices.proto
2025-03-18 17:38:34 -04:00

72 lines
1.8 KiB
Protocol Buffer

syntax = "proto3";
package sys.dev;
import "SPI.proto";
import "I2CBus.proto";
import "Expanders.proto";
import "DAC.proto";
import "Display.proto";
import "Buttons.proto";
import "Battery.proto";
import "Ethernet.proto";
import "nanopb.proto";
import "customoptions.proto";
option (nanopb_fileopt).enum_to_string = true;
message spdif {
option (nanopb_msgopt).packed_struct = true;
option (nanopb_msgopt).msgid = 10015;
int32 ws = 1 [(cust_field).v_int32=-1];
int32 data = 2 [(cust_field).v_int32=-1];
int32 clk = 3 [(cust_field).v_int32=-1];
}
enum strip_types {
LS_UNKNOWN = 0;
LS_WS2812 = 1;
//unsupported
LS_SK6812 = 2;
//unsupported
LS_APA106 = 3;
}
message led_strip {
option (nanopb_msgopt).packed_struct = true;
option (nanopb_msgopt).msgid = 10018;
int32 gpio = 1 [(cust_field).v_int32=-1];
int32 length = 2 [(nanopb).int_size = IS_16];
strip_types strip_type = 3;
}
enum ir_types {
IR_UNKNOWN = 0;
IR_RC5 = 1;
IR_NEC = 2;
}
message ir {
option (nanopb_msgopt).packed_struct = true;
ir_types type = 1;
int32 gpio = 2 [(cust_field).v_int32=-1];
}
message config {
option (nanopb_msgopt).packed_struct = true;
option (nanopb_msgopt).msgid = 10019;
spi.bus spi = 1;
i2c.bus i2c = 2;
dac.config dac = 3;
spdif spdif = 4;
sys.display.config display = 5;
repeated sys.exp.config gpio_exp = 6 [(nanopb).type = FT_CALLBACK, (nanopb).callback_datatype = "sys_exp_config*"];
led_strip led_strip = 7;
btns.rotary rotary = 8;
string root_button_profile = 9 [(nanopb).type = FT_POINTER];
repeated btns.profile buttons_profiles = 10 [(nanopb).type = FT_POINTER];
dev.eth.config eth = 11;
battery.config battery = 12;
ir ir = 13;
}