Expanders.proto 950 B

12345678910111213141516171819202122232425262728293031323334353637
  1. syntax = "proto3";
  2. package sys.exp;
  3. import "Common.proto";
  4. import "SPI.proto";
  5. import "GPIO.proto";
  6. import "I2CBus.proto";
  7. import "customoptions.proto";
  8. import "nanopb.proto";
  9. option (nanopb_fileopt).enum_to_string = true;
  10. enum models {
  11. UNSPECIFIED_EXP = 0;
  12. PCA9535 = 1;
  13. PCA85XX = 2;
  14. MCP23017 = 3;
  15. MCP23S17 = 4;
  16. }
  17. message config {
  18. option (nanopb_msgopt).packed_struct = true;
  19. option (nanopb_msgopt).msgid = 10033;
  20. models model = 1;
  21. int32 addr = 2 [(nanopb).int_size = IS_8];
  22. oneof ExpType {
  23. i2c.device i2c = 3;
  24. spi.device spi = 4;
  25. }
  26. int32 base = 5 [(nanopb).int_size=IS_16, (cust_field).v_int32=40]; // Defaults to 40
  27. int32 count = 6 [(nanopb).int_size=IS_16, (cust_field).v_int32=16]; // Defaults to 16
  28. int32 intr = 7 [(nanopb).int_size=IS_16, (cust_field).v_int32=-1];
  29. gpio.config ena = 8 [(nanopb).int_size=IS_16, (cust_field).v_int32=-1];
  30. }