mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 21:47:04 +03:00
52 lines
1.1 KiB
Protocol Buffer
52 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package sys;
|
|
import "Common.proto";
|
|
import "GPIO.proto";
|
|
import "nanopb.proto";
|
|
import "customoptions.proto";
|
|
option (nanopb_fileopt).enum_to_string = true;
|
|
|
|
enum EthModelEnum {
|
|
UNSPECIFIED_ETHMODEL = 0;
|
|
LAN8720 = 1;
|
|
DM9051 = 2;
|
|
W5500 = 3;
|
|
}
|
|
enum EthType { // This enum is used to define the union type for Eth
|
|
UNSPECIFIED_ETH = 0; // for unspecified type
|
|
SPI = 1;
|
|
RMII = 2;
|
|
}
|
|
message EthCommon {
|
|
option (nanopb_msgopt).msgid = 10025;
|
|
EthModelEnum model = 1;
|
|
GPIO rst = 2;
|
|
}
|
|
|
|
// SPI Specific Ethernet definitions
|
|
message EthSPI {
|
|
option (nanopb_msgopt).msgid = 10026;
|
|
GPIO cs = 1; // CS pin
|
|
int32 speed = 2 [(nanopb).int_size = IS_16]; // SPI Bus speed
|
|
GPIO intr = 3;
|
|
int32 host = 4 [(nanopb).int_size = IS_8,(cust_field).v_int32 = 2 ]; // Defaults to 2 in your application logic
|
|
}
|
|
|
|
// RMII Specific Ethernet definitions
|
|
message EthRMII {
|
|
option (nanopb_msgopt).msgid = 10027;
|
|
GPIO mdc = 1;
|
|
GPIO mdio = 2;
|
|
}
|
|
|
|
// Ethernet module configuration
|
|
message Eth {
|
|
option (nanopb_msgopt).msgid = 10028;
|
|
DeviceTypeEnum type = 1;
|
|
EthCommon common = 2;
|
|
oneof ethType {
|
|
EthSPI spi = 3;
|
|
EthRMII rmii = 4;
|
|
}
|
|
} |