Display.proto 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. syntax = "proto3";
  2. package sys.display;
  3. import "Common.proto";
  4. import "SPI.proto";
  5. import "nanopb.proto";
  6. import "I2CBus.proto";
  7. import "customoptions.proto";
  8. option (nanopb_fileopt).enum_to_string = true;
  9. message offsets {
  10. option (nanopb_msgopt).packed_struct = true;
  11. option (nanopb_msgopt).msgid = 10020;
  12. int32 height =1 [(nanopb).int_size = IS_16];
  13. int32 width =2 [(nanopb).int_size = IS_16];
  14. }
  15. enum drivers {
  16. UNSPECIFIED = 0;
  17. SSD1306 = 1;
  18. SSD1322 = 2;
  19. SSD1326 = 3;
  20. SSD1327 = 4;
  21. SH1106 = 5;
  22. SSD1675 = 6;
  23. ST7735 = 7;
  24. ST7789 = 8;
  25. ILI9341 = 9;
  26. ILI9341_24 = 10;
  27. SSD1351 = 11;
  28. }
  29. message common {
  30. option (nanopb_msgopt).packed_struct = true;
  31. option (nanopb_msgopt).msgid = 10023;
  32. int32 width = 1 [(nanopb).int_size = IS_16];
  33. int32 height = 2 [(nanopb).int_size = IS_16];
  34. bool HFlip = 3;
  35. bool VFlip = 4;
  36. drivers driver = 5;
  37. int32 bitDepth = 6 [(nanopb).int_size = IS_8]; // Defaults to Depth1 in your application logic
  38. int32 back = 7 [(nanopb).int_size=IS_16, (cust_field).v_int32=-1];
  39. int32 reset = 8 [(nanopb).int_size=IS_16, (cust_field).v_int32=-1];
  40. int32 ready = 9 [(nanopb).int_size=IS_16, (cust_field).v_int32=-1];
  41. offsets offsets = 10;
  42. bool rotate = 11;
  43. bool invert = 12;
  44. bool colow_swap = 13;
  45. }
  46. message config {
  47. option (nanopb_msgopt).packed_struct = true;
  48. option (nanopb_msgopt).msgid = 10024;
  49. dev.common.types type = 1;
  50. common common = 2;
  51. oneof dispType {
  52. sys.i2c.device i2c = 3;
  53. sys.spi.device spi = 4;
  54. }
  55. }