mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Correctly display 9-port machines
This commit is contained in:
+11
-8
@@ -433,18 +433,21 @@ void send_status(void)
|
||||
bool_to_html(SFR_DATA_8 == 0x20);
|
||||
slen += strtox(outbuf + slen, ",\"adv\":\"");
|
||||
phy_read(i, PHY_MMD_AN, 0x20);
|
||||
bool_to_html(SFR_DATA_8 & 0x80); // 2500BaseN-Full
|
||||
uint16_t w = SFR_DATA_U16;
|
||||
bool_to_html(!!(w & 0x80)); // 2500BaseN-Full
|
||||
phy_read(i, PHY_MMD_CTRL, 0xa412);
|
||||
bool_to_html(SFR_DATA_16 & 0x02); // 1000Base-Full
|
||||
w = SFR_DATA_U16;
|
||||
bool_to_html(!!(w & 0x0200)); // 1000Base-Full
|
||||
phy_read(i, PHY_MMD_AN, 0x10);
|
||||
bool_to_html(SFR_DATA_16 & 0x01); // 100Base-Full
|
||||
uint8_t w = SFR_DATA_8;
|
||||
bool_to_html(w & 0x80); // 100Base-Half
|
||||
bool_to_html(w & 0x40); // 10Base-Full
|
||||
bool_to_html(w & 0x20); // 10Base-Half
|
||||
w = SFR_DATA_U16;
|
||||
bool_to_html(!!(w & 0x0100)); // 100Base-Full
|
||||
bool_to_html(!!(w & 0x80)); // 100Base-Half
|
||||
bool_to_html(!!(w & 0x40)); // 10Base-Full
|
||||
bool_to_html(!!(w & 0x20)); // 10Base-Half
|
||||
char_to_html('"');
|
||||
}
|
||||
|
||||
slen += strtox(outbuf + slen, "\",\"link\":");
|
||||
slen += strtox(outbuf + slen, ",\"link\":");
|
||||
|
||||
if (i < 8)
|
||||
reg_read_m(RTL837X_REG_LINKS);
|
||||
|
||||
Reference in New Issue
Block a user