wled_json_api_library/structures/cfg/
cfg_eth.rs

1use serde;
2use serde::{Serialize, Deserialize};
3use serde_repr::{Deserialize_repr, Serialize_repr};
4use crate::structures::none_function;
5
6
7
8
9#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
10#[serde(rename_all = "camelCase")]
11pub struct Eth {
12    /// type of ethernet
13    #[serde(skip_serializing_if = "Option::is_none")]
14    #[serde(default = "none_function")]
15    pub relay: Option<EthType>,
16
17    /// pins used??? idk how this one works
18    #[serde(skip_serializing_if = "Option::is_none")]
19    #[serde(default = "none_function")]
20    pub pin: Option<Vec<u32>>,
21}
22
23
24
25/// Constants defined for Ethernet types
26#[derive(Serialize_repr, Deserialize_repr, PartialEq, Debug, Clone)]
27#[repr(u8)]
28pub enum EthType {
29    WledEthNone,
30    WledEthWt32Eth01,
31    WledEthEsp32Poe,
32    WledEthWesp32,
33    WledEthQuinled,
34    WledEthTwilightlord,
35    WledEthEsp32deux,
36    WledEthEsp32ethkitve,
37    WledEthQuinledOcta,
38    WledEthAbcwledv43eth,
39    WledEthSerg74,
40    /// Reserved to keep some semblance of backwards compatibility when new WLED versions come out with more ethernet types
41    RSVD1,
42    /// Reserved to keep some semblance of backwards compatibility when new WLED versions come out with more ethernet types
43    RSVD2,
44    /// Reserved to keep some semblance of backwards compatibility when new WLED versions come out with more ethernet types
45    RSVD3,
46    /// Reserved to keep some semblance of backwards compatibility when new WLED versions come out with more ethernet types
47    RSVD4,
48    /// Reserved to keep some semblance of backwards compatibility when new WLED versions come out with more ethernet types
49    RSVD5,
50    /// Reserved to keep some semblance of backwards compatibility when new WLED versions come out with more ethernet types
51    RSVD6,
52    /// Reserved to keep some semblance of backwards compatibility when new WLED versions come out with more ethernet types
53    RSVD7,
54    /// Reserved to keep some semblance of backwards compatibility when new WLED versions come out with more ethernet types
55    RSVD8,
56
57}