mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2025-07-31 20:31:05 +00:00
update
This commit is contained in:
parent
163c8c1876
commit
5657871f02
23 changed files with 168 additions and 28 deletions
4
WEBFiles/protect2/chiprams.xml
Normal file
4
WEBFiles/protect2/chiprams.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<response>
|
||||
<ramaddr>~start~</ramaddr>
|
||||
<ramdata>~xml_ram~</ramdata>
|
||||
</response>
|
||||
70
WEBFiles/protect2/cookie.js
Normal file
70
WEBFiles/protect2/cookie.js
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
function getCookie(name) {
|
||||
var prefix = name + "=";
|
||||
var cookieStartIndex = document.cookie.indexOf(prefix);
|
||||
if (cookieStartIndex == -1)
|
||||
return null;
|
||||
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex
|
||||
+ prefix.length);
|
||||
if (cookieEndIndex == -1)
|
||||
cookieEndIndex = document.cookie.length;
|
||||
return unescape(document.cookie.substring(cookieStartIndex + prefix.length,
|
||||
cookieEndIndex));
|
||||
}
|
||||
function setCookie(name, value) {
|
||||
document.cookie = name + "=" + escape(value) + "; path=/";
|
||||
}
|
||||
function setCookieElem(name, defv) {
|
||||
var val = getCookie(name);
|
||||
if (val == null || val.charAt(0) != '0' || val.charAt(1) != 'x') {
|
||||
val = defv;
|
||||
setCookie(name, val);
|
||||
}
|
||||
document.getElementById(name).value = val;
|
||||
}
|
||||
function NewCookie(add) {
|
||||
var val = parseInt(document.getElementById('start').value, 16) & 0xFFFFFFF0;
|
||||
if (val == NaN)
|
||||
setCookieElem('start', '0x40000000');
|
||||
else {
|
||||
val += add;
|
||||
setCookie('start', '0x' + val.toString(16));
|
||||
var nval = val + 256;
|
||||
setCookie('stop', '0x' + nval.toString(16));
|
||||
document.getElementById('start').value = '0x' + val.toString(16);
|
||||
document.getElementById('pmem').contentWindow.location.reload();
|
||||
}
|
||||
}
|
||||
setCookieElem('start', '0x40000000');
|
||||
setCookieElem('set_ramaddr', '0x3FFF0000');
|
||||
setCookieElem('set_ramdata', '0x12345678');
|
||||
function UpTxt(xD, n, v) {
|
||||
var x = getXMLValue(xD, n, v);
|
||||
if (x == '?')
|
||||
document.getElementById("id_" + n).style.color = "#833";
|
||||
else
|
||||
document.getElementById("id_" + n).style.color = "#333";
|
||||
document.getElementById("id_" + n).innerHTML = x + v;
|
||||
}
|
||||
function UpdateValuesRam(xD) {
|
||||
if (xD) {
|
||||
UpTxt(xD, "ramaddr", "");
|
||||
UpTxt(xD, "ramdata", "");
|
||||
}
|
||||
}
|
||||
function SendRamVal(x) {
|
||||
var addr = parseInt(document.getElementById('set_ramaddr').value, 16);
|
||||
var val = parseInt(document.getElementById('set_ramdata').value, 16);
|
||||
if (addr != NaN && val != NaN) {
|
||||
document.getElementById('set_ramaddr').value = '0x' + addr.toString(16);
|
||||
setCookie('set_ramaddr','0x' + addr.toString(16));
|
||||
document.getElementById('set_ramdata').value = '0x' + val.toString(16);
|
||||
setCookie('set_ramdata','0x' + val.toString(16));
|
||||
if (x != 0)
|
||||
newAJAXCommand('chiprams.xml?start=0x' + addr.toString(16),
|
||||
UpdateValuesRam, 0);
|
||||
else
|
||||
newAJAXCommand('chiprams.xml?sys_ram0x' + addr.toString(16) + '=0x'
|
||||
+ val.toString(16) + '&start=0x' + addr.toString(16),
|
||||
UpdateValuesRam, 0);
|
||||
}
|
||||
}
|
||||
25
WEBFiles/protect2/debug.htm
Normal file
25
WEBFiles/protect2/debug.htm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>RTL871X Debug and Tests</title>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
</head><body>
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<h2 class="title">Debug and Tests</h2>
|
||||
<p class="center">
|
||||
Chart <a href="/heap.htm">'heap'</a>, <a href="/tst.htm">ST-AP RSSI</a><br><br>
|
||||
<a href='/timeout.htm?sys_restart=12345'>System Restart</a><br><br>
|
||||
Counter erase the last flash sector config: ~sys_rdec0x980FE000~<br><br>
|
||||
</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h2 class="title">System constants?</h2>
|
||||
<table class="form">
|
||||
</tr></form>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
~inc:footer.inc~
|
||||
</body>
|
||||
</html>
|
||||
33
WEBFiles/protect2/dsleep.htm
Normal file
33
WEBFiles/protect2/dsleep.htm
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>RTL871X</title>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<script src="/site.js"></script>
|
||||
</head>
|
||||
<body onload="allowAJAX=true;" onunload="allowAJAX=false;">
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<h2 class="title">Test DeepSleep</h2>
|
||||
<table class="form">
|
||||
</tr>
|
||||
<td class="label">DeepSleep Time(ms):</td>
|
||||
<td><input type="text" id="ds_time" size="12" maxlength="10" value="3000"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">DeepSleep Mode:</td>
|
||||
<td class="left"><input type="button" onclick="DeepSleep()" value="Go" class="button"></td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</div>
|
||||
~inc:footer.inc~
|
||||
<script type="text/javascript">
|
||||
function DeepSleep(){
|
||||
var dstim = parseInt(document.getElementById('ds_time').value,10);
|
||||
newAJAXCommand('/web.cgi?&sys_dsleep=0x' + dstim.toString(16), null, 0);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
1
WEBFiles/protect2/fullflash.bin
Normal file
1
WEBFiles/protect2/fullflash.bin
Normal file
|
|
@ -0,0 +1 @@
|
|||
~bin_flash_all~
|
||||
41
WEBFiles/protect2/hexdmpb.htm
Normal file
41
WEBFiles/protect2/hexdmpb.htm
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=windows-1251">
|
||||
<title>RTL871X HexDump Byte</title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
<script src="/site.js"></script>
|
||||
</head><body onload="allowAJAX=true;" onlnload="allowAJAX=false;">
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<h2 class="title">HexDump Bytes</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>RAM Start addr</td>
|
||||
<td><input type="text" id="start" size="12" maxlength="10" value="0x1FFF0000"></td>
|
||||
<td><input type="button" onClick="NewCookie(-256)" value="-0x100" class="button"></td>
|
||||
<td><input type="button" onClick="NewCookie(0)" value="Show" class="button"></td>
|
||||
<td><input type="button" onClick="NewCookie(+256)" value="+0x100" class="button"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<iframe id='pmem' name='pmem' src="/protect2/hexdmpb.txt" border="0" width="620" height="270"></iframe>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Write addr, value:</td>
|
||||
<td><input type="text" id="set_ramaddr" size="12" maxlength="10" value="0x1FFF0000"></td>
|
||||
<td><input type="text" id="set_ramdata" size="12" maxlength="10" value="0x12345678"></td>
|
||||
<td><input type="button" onClick="SendRamVal(0)" value="Write" class="button"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Read addr, value:</td>
|
||||
<td id="id_ramaddr">?</td>
|
||||
<td id="id_ramdata">?</td>
|
||||
<td><input type="button" onClick="SendRamVal(1)" value="Read" class="button"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Protected area: 0x9A000000..0xFFFFFFFF !<br>
|
||||
<a href='/protect2/hexdmpb.txt?start=0x98000000&stop=0x98100000'>HEX Dump Flash 1024k</a>
|
||||
</div>
|
||||
<script src="cookie.js"></script>
|
||||
</body></html>
|
||||
1
WEBFiles/protect2/hexdmpb.txt
Normal file
1
WEBFiles/protect2/hexdmpb.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
~hexdmpb~
|
||||
41
WEBFiles/protect2/hexdmpd.htm
Normal file
41
WEBFiles/protect2/hexdmpd.htm
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=windows-1251">
|
||||
<title>RTL871X HexDump DWord</title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
<script src="/site.js"></script>
|
||||
</head><body onload="allowAJAX=true;" onlnload="allowAJAX=false;">
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<h2 class="title">HexDump DWord</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>RAM Start addr   </td>
|
||||
<td><input type="text" id="start" size="12" maxlength="10" value="0x1FFF0000"></td>
|
||||
<td><input type=button onClick="NewCookie(-256)" value="-0x100" class="button"></td>
|
||||
<td><input type=button onClick="NewCookie(0)" value="Show" class="button"></td>
|
||||
<td><input type=button onClick="NewCookie(+256)" value="+0x100" class="button"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<iframe id='pmem' name='pmem' src="/protect2/hexdmpd.txt" border="0" width="620" height="270"></iframe>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Write addr, value:</td>
|
||||
<td><input type="text" id="set_ramaddr" size="12" maxlength="10" value="0x1FFF0000"></td>
|
||||
<td><input type="text" id="set_ramdata" size="12" maxlength="10" value="0x12345678"></td>
|
||||
<td><input type="button" onClick="SendRamVal(0)" value="Write" class="button"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Read addr, value:</td>
|
||||
<td id="id_ramaddr">?</td>
|
||||
<td id="id_ramdata">?</td>
|
||||
<td><input type="button" onClick="SendRamVal(1)" value="Read" class="button"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Protected area: 0x9A000000..0xFFFFFFFF !<br>
|
||||
<a href='/protect2/hexdmpd.txt?start=0x98000000&stop=0x98100000'>HEX Dump Flash 1024k</a>
|
||||
</div>
|
||||
<script src="cookie.js"></script>
|
||||
</body></html>
|
||||
1
WEBFiles/protect2/hexdmpd.txt
Normal file
1
WEBFiles/protect2/hexdmpd.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
~hexdmpd~
|
||||
1
WEBFiles/protect2/ram.bin
Normal file
1
WEBFiles/protect2/ram.bin
Normal file
|
|
@ -0,0 +1 @@
|
|||
~bin_ram~
|
||||
97
WEBFiles/protect2/setup.htm
Normal file
97
WEBFiles/protect2/setup.htm
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>RTL871X Setup</title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
<script src="/scripts.js"></script>
|
||||
<script src="/site.js"></script>
|
||||
</head><body>
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<h2 class="title">System Setup</h2>
|
||||
<form method="post" action="">
|
||||
<table class="form">
|
||||
<tr>
|
||||
<td class="label">WEB (HTTP) port:</td>
|
||||
<td><input title='4..65535, 0 - close' name='cfg_web_port' maxlength='5' value='~cfg_web_port~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">WEB recved timeout:</td>
|
||||
<td><input title='1...65535 sec, 0 - not limited' name='cfg_web_twrec' maxlength='5' value='~cfg_web_twrec~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">WEB close timeout:</td>
|
||||
<td><input title='1...65535 sec, 0 - not limited' name='cfg_web_twcls' maxlength='5' value='~cfg_web_twcls~'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">PowerSave Enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_sleep' value='0'>
|
||||
<input title='If On - LogUART input disable' type='checkbox' name='cfg_sleep' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">LogUART Printf() enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_debug' value='0'>
|
||||
<input title='rtl_printf enable. If Off - High speed upload (>1Mbytes/s).' type='checkbox' name='cfg_debug' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Web pcb close enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_web_twd' value='0'>
|
||||
<input title='(Proxy) Close web connection and deletes TIME_WAIT pcb' type='checkbox' name='cfg_web_twd' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Checking pin WiFi cfg reset:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_pinclr' value='0'>
|
||||
<input title='Checking reset configuration level on GPIO3 at startup (25 ms)' type='checkbox' name='cfg_pinclr' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">NetBIOS enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_netbios' value='0'>
|
||||
<input title='NetBIOS AP name = "a~wifi_ap_ssid~", Station = "s~wifi_ap_ssid~"' type='checkbox' name='cfg_netbios' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">SNTP enable:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_sntp' value='0'>
|
||||
<input title='SNTP: pool.ntp.org' type='checkbox' name='cfg_sntp' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Captive Portal AP:</td>
|
||||
<td>
|
||||
<input type="hidden" name='cfg_cdns' value='0'>
|
||||
<input type='checkbox' name='cfg_cdns' value='1'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="center">
|
||||
<input type='hidden' name='uart_save' value='2'>
|
||||
<input type='hidden' name='cfg_save' value='1'>
|
||||
<input type='submit' value='Set Config' class="button">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
~inc:footer.inc~
|
||||
<script type="text/javascript">
|
||||
var cfg = {
|
||||
cfg_sleep:"~cfg_sleep~",
|
||||
cfg_debug:"~cfg_debug~",
|
||||
cfg_web_twd:"~cfg_web_twd~",
|
||||
cfg_pinclr:"~cfg_pinclr~",
|
||||
cfg_netbios:"~cfg_netbios~",
|
||||
cfg_sntp:"~cfg_sntp~",
|
||||
cfg_cdns:"~cfg_cdns~",
|
||||
cfg_mdb_reop:"~cfg_mdb_reop~"
|
||||
}
|
||||
setFormValues(document.forms[0], cfg);
|
||||
</script>
|
||||
</body></html>
|
||||
91
WEBFiles/protect2/tstfuncs.htm
Normal file
91
WEBFiles/protect2/tstfuncs.htm
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>RTL871X Download bin</title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
<script src="/scripts.js"></script>
|
||||
</head><body>
|
||||
~inc:menu.inc~
|
||||
<div class="content">
|
||||
<h2 class="title">Download bin</h2>
|
||||
<form method="post"><table class="scan">
|
||||
<tr>
|
||||
<td>ROM-BIOS:</td>
|
||||
<td><a href='ram.bin?start=0x00000000&stop=0x00080000'>0x00000000..0x00080000</a></td>
|
||||
<td>512 kbytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SRAM:</td>
|
||||
<td><a href='ram.bin?start=0x10000000&stop=0x10070000'>0x10000000..0x10070000</a></td>
|
||||
<td>448 kbytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TCM-RAM:</td>
|
||||
<td><a href='ram.bin?start=0x1FFF0000&stop=0x20000000'>0x1FFF0000..0x20000000</a></td>
|
||||
<td>64 kbytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SDRAM:</td>
|
||||
<td><a href='ram.bin?start=0x30000000&stop=0x30200000'>0x30000000..0x30200000</a></td>
|
||||
<td>2048 kbytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>FLASH Bus:</td>
|
||||
<td><a href='ram.bin?start=0x98000000&stop=0x98100000'>0x98000000..0x98100000</a></td>
|
||||
<td>1024 kbytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>I/O SoC:</td>
|
||||
<td><a href='ram.bin?start=0x40000000&stop=0x40080000'>0x40000000..0x40080000</a></td>
|
||||
<td>.. kbytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ARM:</td>
|
||||
<td><a href='ram.bin?start=0xEF000000&stop=0xEFFFFFFF'>0xEF000000..0xEFFFFFFF</a></td>
|
||||
<td>.. kbytes</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="form">
|
||||
<tr>
|
||||
<td class="label">Start addr</td>
|
||||
<td><input type="text" id="rams" size=12 maxlength=10 value="0x3FF00000"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">End addr</td>
|
||||
<td><input type="text" id="rame" size=12 maxlength=10 value="0x40800000"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="center"><input type="button" onClick="NewCookie()" value="Download ram.bin" class="button"></p>
|
||||
</div>
|
||||
~inc:footer.inc~
|
||||
<script type="text/javascript">
|
||||
function getCookie(name){
|
||||
var prefix = name + "=";
|
||||
var cookieStartIndex = document.cookie.indexOf(prefix);
|
||||
if (cookieStartIndex == -1) return null;
|
||||
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
|
||||
if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
|
||||
return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
|
||||
}
|
||||
function setCookie(name, value){
|
||||
document.cookie = name + "=" + escape(value) + "; path=/";
|
||||
}
|
||||
function setCookieElem(name, defv){
|
||||
var value = getCookie(name);
|
||||
if(value == null) {
|
||||
value = defv;
|
||||
setCookie(name,value);
|
||||
}
|
||||
document.getElementById(name).value=value;
|
||||
}
|
||||
function NewCookie(){
|
||||
setCookie('rams',document.getElementById('rams').value);
|
||||
setCookie('raml',document.getElementById('rame').value);
|
||||
window.location.href='ram.bin?start='+document.getElementById('rams').value+'&stop='+document.getElementById('rame').value;
|
||||
}
|
||||
setCookieElem('rams','0x10000000');
|
||||
setCookieElem('rame','0x10070000');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue