mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Web: Add SFP state/pin status
The state of the SFP module is being already send in status.json, but was not parsed via Web UI. When debuging SFP LOS/Signal detection it is usefull to see what module is reporting back. Extended the SFP mouse-over information with: - RX LOS as reported in 0x02 bit of register 238 - External TX Disabled from 0x80 bit of register 238 - TX fault from 0x04 of the same register - The last state of RX LOS pin (available also when there is no 0x40 option on the module) This should help identify missing/incorrect setup of TX disabled pin.
This commit is contained in:
+2
-1
@@ -655,7 +655,8 @@ void send_status(void)
|
||||
slen += strtox(outbuf + slen,"\",\"sfp_serial\":\"");
|
||||
for (register uint8_t s = 0; s < 16; s++)
|
||||
outbuf[slen++] = sfp_module_serial[machine.is_sfp[i]-1][s];
|
||||
char_to_html('"');
|
||||
slen += strtox(outbuf + slen,"\",\"sfp_los\":");
|
||||
bool_to_html(sfp_pins_last & (0x2 << (((machine.is_sfp[i]-1) << 2))));
|
||||
} else {
|
||||
bool_to_html(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user