forked from rogerclarkmelbourne/STM32duino-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusb_descriptor_strings_util.html
More file actions
22 lines (19 loc) · 754 Bytes
/
Copy pathusb_descriptor_strings_util.html
File metadata and controls
22 lines (19 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<script>
function convertText(txt,idNum)
{
var txt2 ="#define ALT"+idNum+"_STR_LEN 0x"+(txt.length*2 + 2).toString(16).toUpperCase()+"<br/>\t#define ALT"+idNum+"_MSG_STR ";
for (var i=0;i<txt.length;i++)
{
txt2+="'"+txt[i]+"',0,";
}
return txt2.substring(0,txt2.length-1)+"<br/>";
}
var bootloaderName = "STM32duino bootloader v1.0 ";
document.write("<pre>USB Strings for config.h\n\n");
document.write("\t"+convertText(bootloaderName + " ERROR. Upload to RAM not supported.",0)+"<br/>");
document.write("\t"+convertText(bootloaderName + " Upload to Flash 0x8005000",1)+"<br/>");
document.write("\t"+convertText(bootloaderName + " Upload to Flash 0x8002000",2)+"<br/>");
document.write("</pre>");
</script>
</html>