12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- syntax = "proto3";
- package sys.dac.control;
- import "nanopb.proto";
- option (nanopb_fileopt).enum_to_string = true;
- message set {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10009;
- repeated cmd commands = 1 [(nanopb).type = FT_POINTER]; //[(nanopb).max_count= 10];
- bool mclk_needed = 2;
-
- }
- enum type {
- INIT = 0;
- POWER_ON = 1;
- POWER_OFF = 2;
- SPEAKER_ON = 3;
- SPEAKER_OFF = 4;
- HEADSET_ON = 5;
- HEADSET_OFF = 6;
- }
- message cmd {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10010;
- type type = 1;
- repeated itm items = 2 [(nanopb).type = FT_POINTER]; //[(nanopb).max_count= 50];
-
- }
- message itm {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10011;
- oneof item_type {
- reg reg_action = 1;
- gpio gpio_action = 2;
- delay delay_action = 3;
- regs regs_action = 4;
- }
-
- }
- message reg {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10012;
- uint32 reg = 1[(nanopb).int_size = IS_8];
- uint32 val = 2 [(nanopb).int_size = IS_8];
- mode mode = 3;
-
- }
- message regs {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10060;
- uint32 reg = 1[(nanopb).int_size = IS_8];
- repeated uint32 vals = 2 [(nanopb).type = FT_POINTER,(nanopb).int_size = IS_8];
-
- }
- enum lvl {
- LV_UNDEFINED = 0;
- LV_0 = 1;
- LV_1 = 2;
- }
- message gpio {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10013;
- int32 gpio = 1 [(nanopb).int_size = IS_16];
- lvl level = 2;
-
- }
- message delay {
- option (nanopb_msgopt).packed_struct = true;
- option (nanopb_msgopt).msgid = 10014;
- int64 delay = 1; // Delay in milliseconds
- }
- enum mode {
- NOTHING = 0;
- OR = 1;
- AND = 2;
- }
|