mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 04:57:06 +03:00
61 lines
1.5 KiB
Protocol Buffer
61 lines
1.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package sys.dev.eth;
|
|
import "Common.proto";
|
|
import "nanopb.proto";
|
|
import "customoptions.proto";
|
|
|
|
option (nanopb_fileopt).enum_to_string = true;
|
|
|
|
enum models {
|
|
NONE = 0;
|
|
LAN8720 = 1;
|
|
DM9051 = 2;
|
|
W5500 = 3;
|
|
}
|
|
enum types { // This enum is used to define the union type for Eth
|
|
UNSPECIFIED = 0; // for unspecified type
|
|
SPI = 1;
|
|
RMII = 2;
|
|
}
|
|
message common {
|
|
option (nanopb_msgopt).packed_struct = true;
|
|
option (nanopb_msgopt).msgid = 10025;
|
|
models model = 1 [(cust_field).v_enum = "NONE"];
|
|
int32 rst = 2 [(cust_field).v_int32=-1];
|
|
uint32 ethtmout_s = 3 [(nanopb).int_size = IS_16, (cust_field).v_uint32 = 30];
|
|
|
|
}
|
|
|
|
// SPI Specific Ethernet definitions
|
|
message spi {
|
|
option (nanopb_msgopt).packed_struct = true;
|
|
option (nanopb_msgopt).msgid = 10026;
|
|
int32 cs = 1 [(cust_field).v_int32=-1]; // CS pin
|
|
uint32 speed = 2 ;
|
|
int32 intr = 3 [(cust_field).v_int32=-1];
|
|
dev.common.hosts host = 4 [(nanopb).int_size = IS_8,(cust_field).v_enum = "Host1" ]; // Defaults to 2 in your application logic
|
|
|
|
}
|
|
|
|
// RMII Specific Ethernet definitions
|
|
message rmii {
|
|
option (nanopb_msgopt).packed_struct = true;
|
|
option (nanopb_msgopt).msgid = 10027;
|
|
int32 mdc = 1 [(cust_field).v_int32=-1];
|
|
int32 mdio = 2 [(cust_field).v_int32=-1];
|
|
|
|
}
|
|
|
|
// Ethernet module configuration
|
|
message config {
|
|
option (nanopb_msgopt).packed_struct = true;
|
|
option (nanopb_msgopt).msgid = 10028;
|
|
dev.common.types type = 1 [(cust_field).v_enum = "UNKNOWN"];
|
|
common common = 2;
|
|
oneof ethType {
|
|
spi spi = 3;
|
|
rmii rmii = 4;
|
|
}
|
|
|
|
} |