From ee7d309d716388b715b3e450415e1667365ca8a3 Mon Sep 17 00:00:00 2001 From: CMWU Date: Fri, 27 Sep 2024 11:04:38 +0800 Subject: [PATCH] [M2A23] Number of pins on QNF48 side should be 10 14 10 14. --- package.json | 2 +- src/NUC_M2A23_Content.js | 13 +++++++++++-- src/NUC_Pin_Configuration-terser.js | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 510dd5a..f4d6d81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nutool-pinconfigure", - "version": "1.33.0003", + "version": "1.33.0004", "description": "", "main": "main.js", "scripts": { diff --git a/src/NUC_M2A23_Content.js b/src/NUC_M2A23_Content.js index 604de0e..97881bb 100644 --- a/src/NUC_M2A23_Content.js +++ b/src/NUC_M2A23_Content.js @@ -14,7 +14,7 @@ NUTOOL_PIN.g_cfg_chips = [ ]; NUTOOL_PIN.g_cfg_pkgs = { - "QFN48": [ + "QFN48(PIN:D10R14U10L14)": [ 'PB.5', 'PB.4', 'PB.3', 'PB.2', 'PB.1', 'PB.0', 'PA.11', 'PA.10', 'PA.9', 'PA.8', 'PF.5', 'PF.4', 'PF.3', 'PF.2', 'PA.7', 'PA.6', 'PA.5', 'PA.4', 'PA.3', 'PA.2', 'PA.1', 'PA.0', 'PF.15', 'nRESET', 'PF.0', 'PF.1', 'PC.5', 'PC.4', 'PC.3', 'PC.2', @@ -337,6 +337,15 @@ NUTOOL_PIN.decidepackageNumber = function (given_partNumber_package) { NUTOOL_PIN.g_packageNumber = partNumber_package.substring(partNumber_package.indexOf('(') + 1); NUTOOL_PIN.g_packageNumber = NUTOOL_PIN.g_packageNumber.substring(0, NUTOOL_PIN.g_packageNumber.lastIndexOf(')')); - NUTOOL_PIN.g_packageNumberIndex = NUTOOL_PIN.g_packageNumber; + + switch (NUTOOL_PIN.g_packageNumber) { + case 'QFN48': + NUTOOL_PIN.g_packageNumberIndex = "QFN48(PIN:D10R14U10L14)"; + break; + default: + NUTOOL_PIN.g_packageNumberIndex = NUTOOL_PIN.g_packageNumber; + break; + } + partNumber = null; partNumber_package = null; }; \ No newline at end of file diff --git a/src/NUC_Pin_Configuration-terser.js b/src/NUC_Pin_Configuration-terser.js index f3b227f..8f56d73 100644 --- a/src/NUC_Pin_Configuration-terser.js +++ b/src/NUC_Pin_Configuration-terser.js @@ -1 +1 @@ -var NUTOOL_PIN={};!function(){const e="V1.33.0003";var n,t,r,l,o,s,a,d,c,f,g,_,u,N,O,p,h,x,P,T,M,I,C,U,b,L=!0,A=!1,S=!1,v=0,y=0,D=0,w=0,F=0,E=0,j=0,X=0,B="12px Arial",G=275,R=48,K=16,H=40,W=30,z=0,Y=1,V=10,Z=24,Q=25,q=3,J=3,ee=20,ie=7,ne=1,te=0,re=0,le=0,oe=0,se=0,ae=0,de=0,ce=0,fe=0,ge={getContext:null,removeContext:null,addEvent:null},_e=0,ue="",Ne="",Oe="Nuvoton",pe="NuMicro",he=" Nuvoton Technology Corp.",xe=null,Pe=20,Te=20,Me=130,Ie=5,Ce="#FAB92D",me="#41AF88",Ue="#FC517E",be="#9365C9",Le=100,ke=100,$e=[],Ae=[],Se=[],ve=[],ye=[],De=[],we=[],Fe=[],Ee=[],je=[],Xe=[],Be=[],Ge=[],Re=[],Ke=[],He=[],We=[],ze=[],Ye=[],Ve={},Ze=[],Qe=["CM1003","ISD9100","ISD9300","KM1M0DF","KM1M0GF","KM1M4BF","KM1M7AF","KM1M7BF","KM1M7CF","M029G","M030G","M031","M051","M0518","M0519","M0564","M071","M091","M0A21","M2003","M2351","M251","M261","M2A23","M2L31","M433","M451","M460","M466","M471","M479","M480","M55M1","M55M1H2ES","MA35D0","MA35D1","MA35H0","MINI51","MG51","ML51","MS51","MUG51","N76S003","N76E003","N9H30xxxIEC","N9H30xxxIIM","N9H31KxxIFC","NANO100","NDA102","NM1120","NM1200","NM1500","NUC029","NUC100","NUC200","NUC400","NUC505","NUC970","NUC980"],qe=["M466","N9H30xxxIIM"],Je=!1,ei=!1,ii=!1,ni=!0,ti=!0,ri=!1,li=!1,oi=[];function si(){var e,i;for(e=0,i=$e.length;ec&&(f=c,l.font="bold "+f+"px Calibri"),_=f/2+5,l.save(),l.translate(ce+de/4-_,fe+de/2-l.measureText(a).width/2),l.rotate(Math.PI/2),l.fillText(a,0,0),l.restore(),v>12){c=1;do{c+=1,l.font="bold "+c+"px Calibri"}while(l.measureText(NUTOOL_PIN.g_packageNumber).widthc&&(f=c,l.font="bold "+f+"px Calibri"),_=v<100?f/2+v/2:f/2+v/10,l.fillText(a,ce+de/2-l.measureText(a).width/2,fe+de/2+_),a=o.slicePriorToX(")").sliceAfterX("(")+"(TOP VIEW)",c=1;do{c+=1,l.font="bold "+c+"px Calibri"}while(l.measureText(a).widthc&&(f=c,l.font="bold "+f+"px Calibri"),_=f/2+v/8,l.fillText(a,ce+de/2-l.measureText(a).width/2,fe+de/2+_),c=1;do{c+=1,l.font="bold "+c+"px Calibri"}while(l.measureText(NUTOOL_PIN.g_packageNumber).widtht?1:-1;for(n=n.match(a),t=t.match(a),o=n.length>t.length?t.length:n.length;sl?1:-1;return n.length-t.length}function ci(){var e,i,n,t,a,d,c,f,g,_,u,N,O,p,h,x,T,M,I,C,m,U,b=[],k=[],A=[],v=[],y=[],D=[],w=[],F=[],E=$("#rootTree_Pin"),j=$("#moduleTree"),X=$("#ChipType_span"),B=$("#MCU_span");if((b=Qi(je)).sort(di),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode)for(var K=0;K0&&-1!==$.inArray(i,A))){if(c=k[i],g=!1,0===NUTOOL_PIN.g_cfg_shareBits.length&&i!==k.length-1)for(n=i+1,d=k.length;n"),(T=$("#supportedModules_span")).css("vertical-align","text-top"),T.css("font-size","16px"),T.css("font-weight","bold"),x.append(""),M=$("#searchInput_Pin"),E[0].appendChild(Zi("div","moduleTree","Loading...")),j=$("#moduleTree"),X.text(m),X.css("font-size","16px"),X.css("font-weight","bold"),B.text(U),B.css("font-size","16px"),B.css("font-weight","bold"),C=null,m=null,U=null),x[0].setAttribute("style","background-color: #FFFFFF; border-right: 16px solid #F2F2F2; float:left; width:"+(G-16)+"px; height: 22px;"),T.text(I),M[0].setAttribute("style","font-family:Times Arial; position:absolute; left:"+(T.width()+10)+"px; width:"+(G-16-T.width()-10)+"px; height: 16px;"),E.hide(),M.change((function(){xi(this.value)})),j[0].setAttribute("style","background-color: #FFFFFF; overflow-y: scroll; float:left; width:"+G+"px; height: "+(ae-se-6-$("#supportedModules").height())+"px; font-size:16px;"),-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?ii?j.hover((function(){$(this).css("background-color","#FAFAFA"),Ji(),$("#pin_side_0").show(),$("#NUC_PinConfiguration_Canvas_Lining").hide()}),(function(){$(this).css("background-color","#FFFFFF"),$("#pin_side_0").hide(),$("#NUC_PinConfiguration_Canvas_Lining").show()})):j.hover((function(){$(this).css("background-color","#FAFAFA"),Ji(),$("#pin_side_0").css("opacity","0.8"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","0")}),(function(){$(this).css("background-color","#FFFFFF"),$("#pin_side_0").css("opacity","0.1"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","1")})):j.hover((function(){$(this).css("background-color","#FAFAFA"),Ji()}),(function(){$(this).css("background-color","#FFFFFF")})),j.jstree({themes:{theme:"classic",icons:!1},json_data:{data:y,progressive_render:!0},search:{case_insensitive:!0},core:{animation:0,html_titles:!0},plugins:["themes","json_data","types","search","checkbox","ui"]}).bind("hover_node.jstree",(function(e,i){var n,t=i.rslt.obj.attr("id"),l=!1,o="",s=-1;r&&NUTOOL_PIN.g_cfg_gpiosDescriptions.length>0&&-1===t.indexOf("_dot")&&(-1!==t.indexOf("_Pin")&&(n=t.restorePinTreeNodeName(),s=parseInt(t.sliceAfterX("_Pin"),10),l=!0),l&&(o=an(n=n.restorePinTreeNodeName().restoreSpecialCharacters(),s),$i(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1])&&(o="("+NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1]+") "+o),"unknown"!==o&&et(t,o,"right"))),n=null,l=null,o=null,s=null})).bind("check_node.jstree",(function(e,i){var n,t,r,l=i.rslt.obj.attr("id"),o=l.restorePinTreeNodeName();try{r=i.inst._get_parent(i.rslt.obj).attr("id")}catch(e){}if(function(e){for(var i=!1,n=e.slicePriorToX("_Pin"),t=e.sliceAfterX("_Pin"),r=0;ra").css("color")&&"rgb(255, 0, 0)"!==$("#"+o+" >a").css("color")||-1!==$.inArray(o.sliceAfterX("Pin"),b)||(U.push(o),b.push(o.sliceAfterX("Pin")))):(p=!1,d=0,T.jstree("open_node",$("#"+o)),$("#"+o).removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),$("#"+o).find("li").each((function(e,i){a=$(i).attr("id"),m.push(a),(c=we[parseInt(a.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters())===a.restorePinTreeNodeName()?(p=!0,x=!0):$("#"+a).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),"red"!==$("#"+a+" >a").css("color")&&"rgb(255, 0, 0)"!==$("#"+a+" >a").css("color")||(d+=1),e+1===$("#"+o).find("li").length&&!1===p&&(h=!1,d===$("#"+o).find("li").length&&L.push(o),$("#"+o).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"))})));else if((c=we[parseInt(o.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters())===o.restorePinTreeNodeName()?(p=!0,x=!0):$("#"+o).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),"red"!==$("#"+o+" >a").css("color")&&"rgb(255, 0, 0)"!==$("#"+o+" >a").css("color")||(d+=1),t+1===$("#"+e).find("li").length&&!1===p){if(h=!1,d===$("#"+e).find("li").length)for(i=0,n=$("#"+e).find("li").length;i0)for(i=0,n=L.length;i0&&(He[l].length=0),T.jstree("uncheck_node",$("#"+e));else if(U.length>0){for(O="",i=0;i":"Traditional Chinese"===Ne?"第"+nn(c)+"腳位已被"+tn(we[parseInt(c,10)-1])+"使用。
":"Pin"+nn(c)+" has been asserted by "+tn(we[parseInt(c,10)-1])+".
";"Simplified Chinese"===Ne?(f="冲突发生",g="預期的"+l+"和别的模组冲突。请问你要调整旧的且改设置到现在的模组吗?",_="要",u="不要"):"Traditional Chinese"===Ne?(f="衝突發生",g="預期的"+l+"和別的模組衝突。請問你要調整舊的且改設置到現在的模組嗎?",_="要",u="不要"):(f="Conflict Occurred",g="The expected "+l+" conflicts with other modules. Would you like to adjust the old modules and configure to the current one?",_="Yes",u="No"),On(),N=$('

'+g+"
"+O+'

').dialog({modal:!1,resizable:!1,title:f,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#conflictDialog").dialog("destroy")},buttons:[{text:_,click:function(){for(C=Qi(Ge),Ke=[],i=0,n=C.length;ia").css("background-color","#B0C4DE"));if(void 0===r&&void 0!==He[c]&&He[c].length>0){for(ti=!0,e=0,t=He[c].length;ea").css("color","red"),$("#"+d+" >a").css("color","red")):(void 0===He[r]||void 0!==He[r]&&0===He[r].length)&&-1!==(a=$.inArray(l,We))&&($("#"+l+" >a").css("color","blue"),We.splice(a,1))):(j.jstree("open_node",$("#"+l)),$("#"+l).find("li").each((function(e,i){o=$(i).attr("id"),r=Ri(o.slicePriorToX("_")),s=De[parseInt(o.sliceAfterX("_Pin"),10)-1],-1===o.indexOf(s)&&!$i(s)||-1!==o.indexOf(s)&&!1===$("#"+o).hasClass("jstree-checked")?($("#"+o+" >a").css("color","red"),$("#"+l+" >a").css("color","red"),$("#"+d+" >a").css("color","red")):(void 0===He[r]||void 0!==He[r]&&0===He[r].length)&&-1!==(e=$.inArray(o,We))&&($("#"+o+" >a").css("color","blue"),We.splice(e,1))})),j.jstree("close_node",$("#"+l)))})),Ze.forEach((e=>{-1!=e.indexOf(d.slicePriorToX("_"))&&(document.querySelector(`#${e}`).style.background="DarkGray")})),d=null,c=null,r=null,l=null,o=null,s=null,a=null})).bind("select_node.jstree",(function(e,i){var n,t,r=i.rslt.obj.attr("id");j.jstree("open_node",$("#"+r)),$("#"+r).find("li").each((function(e,i){-1!==(n=$(i).attr("id")).indexOf("_Pin")?j.jstree("open_node",$("#"+n)):(j.jstree("open_node",$("#"+n)),$("#"+n).find("li").each((function(e,i){t=$(i).attr("id"),j.jstree("open_node",$("#"+t))})))})),r=null,n=null,t=null})).bind("dblclick.jstree",(function(e){})).bind("loaded.jstree",(function(){for(e=0,t=F.length;ea").css("background-color","#B0C4DE");ni?(ti=!0,function(){var e,i,n,t,r,o,a,d,c,f,g,_,u,N,O,p,h,x,P,T,M,I,C,m,U,b,L,k=[],A=0,S=[],v=[],y=s,D=1;if(k=Qi(Be),"NUC400"===l||"M451HD"===l||"M451LD"===l||"M4521"===l||"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l||"NUC505"===l||"NUC121AE"===l||"NUC123AE"===l||"NANO103"===l||0===l.indexOf("M47")||"M433"===l||"M480MD"===l||"M480LD"===l||"AX58200"===l||0===l.indexOf("M25")||"M261"===l||0===l.indexOf("M235")||0===l.indexOf("M029")||0===l.indexOf("M030")||0===l.indexOf("M031")||0===l.indexOf("M091")||"M0564"===l||"M05641"===l||0===l.indexOf("NUC126")||"M071QV"===l||"NUC029xGE"===l||"NUC029KGE"===l||"MINI57"===l||"NM1120"===l||"NDA102"===l||"MA35D0"===l||"MA35D1"===l||"MA35H0"===l||0===l.indexOf("M2003")||0===l.indexOf("N9H30")||0===l.indexOf("N9H31")||0===l.indexOf("NUC97")||0===l.indexOf("NUC98")||0===l.indexOf("M2A23")){for(e=0,r=k.length;e>>0))>>>0)>>>4*i>>>0)&&(N=d?i:i+8,u="P"+k[e].slice(k[e].indexOf("P")+1,k[e].indexOf("P")+2)+"."+N.toString(),-1!==(_=$.inArray(u,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex])))){for(x=ji(k[e],N),n=1,o=NUTOOL_PIN.g_cfg_gpios[x].f.length;n>>0))break}}else if("M0A21"===l||0===l.indexOf("M46")||0===l.indexOf("M2L31")||0===l.indexOf("M55M1")){for(e=0,r=k.length;e>>0))>>>0)>>>8*i>>>0)&&(N=i+4*m,u="P"+k[e].slice(k[e].indexOf("P")+1,k[e].indexOf("P")+2)+"."+N.toString(),-1!==(_=$.inArray(u,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex])))){for(x=ji(k[e],N),n=1,o=NUTOOL_PIN.g_cfg_gpios[x].f.length;n>>0))break}}else if(0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("KM1M7")||0===l.indexOf("KM1M4")||0===l.indexOf("KM1M0")||0===l.indexOf("CM1003")){for(e=0,r=k.length;e>>0))>>>0)>>>4*i>>>0)&&(N=i,u="P"+k[e].slice(k[e].indexOf("P")+1,k[e].indexOf("P")+2)+"."+N.toString(),-1!==(_=$.inArray(u,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex])))){for(x=ji(k[e],N),n=1,o=NUTOOL_PIN.g_cfg_gpios[x].f.length;n>>0))break}}else if("ISD9100"===l||"ISD9300"===l){for(e=0,r=k.length;e>>0))>>>0)>>>2*i>>>0)&&(N=i,u="P"+k[e].slice(k[e].indexOf("P")+1,k[e].indexOf("P")+2)+"."+N.toString(),-1!==(_=$.inArray(u,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex])))){for(x=ji(k[e],N),n=1,o=NUTOOL_PIN.g_cfg_gpios[x].f.length;n>>0))break}}else if("NUC200AE"===l||"NUC2201"===l||"M071R1S"===l||"NUC029xEE"===l||"NUC100AN_BN"===l||"NUC100CN"===l||"NUC100DN"===l){for(e=0,r=k.length;e>>0))>>>i>>>0)for(p=k[e]+"["+i+"]",n=0,o=NUTOOL_PIN.g_cfg_gpioMatrix.length;n>>0,C=I.slicePriorToX("["),f+=(((A=Be[C])&c)>>>m)*Math.pow(2,t-1),C=I.slicePriorToX(":"),-1===$.inArray(C,NUTOOL_PIN.g_cfg_shareBits)&&(Be[C]=A&~c);for(O="",x=ji(u,parseInt(u.sliceAfterX("."),10)),t=1,a=NUTOOL_PIN.g_cfg_gpios[x].f.length;t>>0))>>>i>>>0)for(p=k[e]+"["+i+"]",n=0,o=NUTOOL_PIN.g_cfg_gpioMatrix.length;n>>0,C=I.slicePriorToX("["),f+=(((A=Be[C])&c)>>>m)*Math.pow(2,t-1),Be[C]=A&~c;for(O="",x=ji(u,parseInt(u.sliceAfterX("."),10)),t=1,a=NUTOOL_PIN.g_cfg_gpios[x].f.length;t30){L=!1;break}if(!L)break;for(-1!==(h=O=(O=y.slice(b-D+1,b)+U).replaceSpecialCharacters()).indexOf("_")&&(h=h.slicePriorToX("_")),h=Ri(h),L=!0,b-=D,D=1;"n"!==y.charAt(b-D);)if(b-(D+=1)<0||D>30){L=!1;break}if(!L)break;g=y.slice(b-D+1).slicePriorToX(":"),g=parseInt(g,10),S[0]=g,ui(O+"_Pin"+(_+1),h,S),void 0===He[h]?(He[h]=[],He[h][0]=O+"_Pin"+g):He[h].push(O+"_Pin"+g),y=y.slice(y.indexOf(U)+1)}for(e=0,r=Fe.length;e",(v=t.indexOf(Number(T[r])))>-1&&t.splice(v,1);else m+="Simplified Chinese"===Ne?"第"+nn(T[r])+"脚位已被"+tn(we[T[r]-1])+"使用。
":"Traditional Chinese"===Ne?"第"+nn(T[r])+"腳位已被"+tn(we[T[r]-1])+"使用。
":"Pin"+nn(T[r])+" has been asserted by "+tn(we[T[r]-1])+".
",x=!0}x&&("Simplified Chinese"===Ne?(d="冲突发生",c="預期的"+n+"和别的模组冲突。请问你要调整旧的且改设置到现在的模组吗?",f="要",g="不要"):"Traditional Chinese"===Ne?(d="衝突發生",c="預期的"+n+"和別的模組衝突。請問你要調整舊的且改設置到現在的模組嗎?",f="要",g="不要"):(d="Conflict Occurred",c="The expected "+n+" conflicts with other modules. Would you like to adjust the old modules and configure to the current one?",f="Yes",g="No"),On(),_=$('

'+c+"
"+m+'

').dialog({modal:!1,resizable:!1,title:d,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#conflictDialog").dialog("destroy")},buttons:[{text:f,click:function(){for(I=Qi(Ge),Ke=[],r=0,o=I.length;r0)U=Ce;else if(0!==Ye.length)for(l=0,a=Ye.length;la").css("color")||"rgb(255, 0, 0)"===$("#"+_+" >a").css("color")||p)$("#"+_).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");else{for(p=!0,(O=[])[0]=parseInt(_.sliceAfterX("Pin"),10),""!==P&&(f=P.slice(P.lastIndexOf("/")+1).slicePriorToX(";"))!==O[0].toString()&&"removed"!==f&&"end"!==f&&(P+=we[parseInt(f,10)-1]+":"+f+"/end;"),P+=_.restorePinTreeNodeName()+":"+O[0],o=0,s=T.length;oa").css("color","blue")}}function C(e,i){if(_=$(i).attr("id"),c=parseInt(_.sliceAfterX("Pin"),10),-1===$.inArray(c,n)&&(h=_i(_,n,0,T)),h)return!1}for(r=0,l=n.length;r0){for(r=0,l=M.length;r0)$("#"+M[r]).find("li").each(I);else for(_=M[r].restorePinTreeNodeName(),o=0,s=Se.length;o0)$("#"+M[r]).find("li").each(C);else for(_=M[r].restorePinTreeNodeName(),o=0,s=Se.length;o0)ue+="Failed: duplicate name occurs. "+l,!L&&window.console&&window.console.log("Failed: duplicate name occurs. "+l);else{for(!L&&window.console&&window.console.log("Duplicate function test passed."),e=0,i=(s=Qi(Ge).sort()).length;e=10)return!1;if(i.push(f),n+=1,p=!1,h=!1,T=[],_=Ri(N.slicePriorToX("_")),u=N+"_Intermediate",$("#"+u).find("li").length>0)$("#"+u).find("li").each((function(e,i){O=$(i).attr("id"),"red"===$("#"+O+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+O+" >a").css("color")||O.sliceAfterX("_Pin")===f.toString()||p?O.sliceAfterX("_Pin")!==f.toString()&&(T.push(O),$("#"+O).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")):(p=!0,(x=[])[0]=parseInt(O.sliceAfterX("Pin"),10),""!==P&&(g=P.slice(P.lastIndexOf("/")+1).slicePriorToX(";"))!==x[0].toString()&&"removed"!==g&&"end"!==g&&(P+=we[parseInt(g,10)-1]+":"+g+"/end;"),P+=O.restorePinTreeNodeName()+":"+x[0]+"/"+f+";",ui(O,_,x),$("#"+O).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),$("#"+O+" >a").css("color","blue"))}));else for(r=0,l=Se.length;r0)$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").each((function(i,n){(O=$(n).attr("id"))===e||!$("#"+O).hasClass("jstree-checked")&&-1===$.inArray(O,t)||(""!==P&&(g=P.slice(P.lastIndexOf("/")+1).slicePriorToX(";"))!==x[0].toString()&&"removed"!==g&&"end"!==g&&(P+=we[parseInt(g,10)-1]+":"+g+"/end;"),P+=e.restorePinTreeNodeName()+":"+x[0]+"/"+O.sliceAfterX("Pin")+";"),O!==e&&$("#"+O).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")}));else for(o=0,s=Se.length;oa").css("color","blue"),0===$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").length){for(a=0,d=We.length;a0){for(r=0;r0)$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").each(M);else for(o=0,s=Se.length;oa").css("color","blue"),0===$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").length){for(a=0,d=We.length;aa").css("color")||"rgb(255, 0, 0)"===$("#"+o+" >a").css("color")||a||(r=o.restorePinTreeNodeName()+"_Intermediate",(c=[])[0]=parseInt(o.sliceAfterX("Pin"),10),ui(o,t,c),s=!0,a=!0),we[parseInt(o.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters()===o.restorePinTreeNodeName()?$("#"+o).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"):$("#"+o).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")}for(s=!1,a=!1,f=[],t=Ri(e.slicePriorToX("_")),$("#"+e).find("li").each((function(e,i){-1!==(l=$(i).attr("id")).indexOf("_Pin")&&-1===$.inArray(l.restorePinTreeNodeName()+"_Intermediate",f)?("red"===$("#"+l+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+l+" >a").css("color")||a||(-1===$.inArray(l,Se)?((c=[])[0]=parseInt(l.sliceAfterX("Pin"),10),ui(l,t,c),s=!0):(s=!1,r=l.restorePinTreeNodeName()+"_Intermediate",d.jstree("open_node",$("#"+r)),$("#"+r).find("li").each((function(e,i){if(o=$(i).attr("id"),we[parseInt(o.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters()===o.restorePinTreeNodeName())return s=!0,!1})),s||((c=[])[0]=parseInt(l.sliceAfterX("Pin"),10),ui(l,t,c)),s=!0,a=!0)),we[parseInt(l.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters()===l.restorePinTreeNodeName()?$("#"+l).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"):$("#"+l).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")):-1!==l.indexOf("_Intermediate")&&f.push(l)})),i=0,n=f.length;i6&&(i=i.slice(0,6)+".."),s.fillText(i,a-s.measureText(i).width/2,d+parseInt(s.font,10)/2)):e=y&&e=y+D&&e=y+D+w&&ea").css("color")||"rgb(255, 0, 0)"===$("#"+$(i).attr("id")+" >a").css("color"))return $("#"+f[t]+" >a").css("color","red"),!1}function u(e,i){if("red"===$("#"+$(i).attr("id")+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+$(i).attr("id")+" >a").css("color"))return $("#"+g[t]+" >a").css("color","red"),!1}if(n)for(;""!==c;)-1!==c.indexOf("/")?(s=c.slicePriorToX("/")+"_Pin"+i,a=c.slicePriorToX("/")+"_Intermediate"):(s=c+"_Pin"+i,a=c+"_Intermediate"),s=s.replaceSpecialCharacters(),a=a.replaceSpecialCharacters(),e=e.replaceSpecialCharacters(),s.restorePinTreeNodeName()!==e.restorePinTreeNodeName()?"red"===$("#"+s+" >a").css("color")&&"rgb(255, 0, 0)"===$("#"+s+" >a").css("color")||($("#"+s+" >a").css("color","red"),$("#"+a+" >a").css("color","red"),-1!==s.indexOf("_")&&$("#"+Ri(s.slicePriorToX("_"))+"_Root >a").css("color","red")):"black"===$("#"+s+" >a").css("color")&&"rgb(0, 0, 0)"===$("#"+s+" >a").css("color")||($("#"+s+" >a").css("color","black"),$("#"+a+" >a").css("color","black"),-1===$.inArray(a,f)&&f.push(a),-1!==s.indexOf("_")&&(d=Ri(s.slicePriorToX("_"))+"_Root",0===$("#"+d).find("li").length&&"red"===$("#"+d+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+d+" >a").css("color")||($("#"+d+" >a").css("color","black"),-1===$.inArray(d,g)&&g.push(d)))),c=-1!==c.indexOf("/")?c.sliceAfterX("/"):"";else for(;""!==c;){if(-1!==c.indexOf("/")?(s=c.slicePriorToX("/")+"_Pin"+i,a=c.slicePriorToX("/")+"_Intermediate"):(s=c+"_Pin"+i,a=c+"_Intermediate"),s=s.replaceSpecialCharacters(),a=a.replaceSpecialCharacters(),s.restorePinTreeNodeName()===we[i-1].replaceSpecialCharacters()||""===we[i-1]){if(("black"!==$("#"+s+" >a").css("color")||"rgb(0, 0, 0)"!==$("#"+s+" >a").css("color"))&&($("#"+s+" >a").css("color","black"),$("#"+a+" >a").css("color","black"),-1===$.inArray(a,f)&&f.push(a),-1!==s.indexOf("_")&&(d=Ri(s.slicePriorToX("_"))+"_Root","red"===$("#"+d+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+d+" >a").css("color"))))if($("#"+d+" >a").css("color","black"),0!==$("#"+d).find("li").length)-1===$.inArray(d,g)&&g.push(d);else for(d=d.restorePinTreeNodeName(),t=0,l=je[d].length;ta").css("color","red");break}}else"red"===$("#"+s+" >a").css("color")&&"rgb(255, 0, 0)"===$("#"+s+" >a").css("color")||($("#"+s+" >a").css("color","red"),$("#"+a+" >a").css("color","red"),-1!==s.indexOf("_")&&$("#"+Ri(s.slicePriorToX("_"))+"_Root >a").css("color","red"));c=-1!==c.indexOf("/")?c.sliceAfterX("/"):""}for(t=0,l=f.length;t15||0===e.toLowerCase().indexOf("pin:")&&4===e.length)return c.jstree("close_all"),c.jstree("clear_search"),void(""!==e?(Ui(),e.length<2?Mi("最小输入字元为两个。请更换至更合适的搜寻。","最小輸入字元為兩個。請更換至更合適的搜尋。","The minimum inputting characters are two. Please change to a proper search."):Mi("预期的搜寻将花费很多时间。请更换至更合适的搜寻。","預期的搜尋將花費很多時間。請更換至更合適的搜尋。","The expected search will take much time. Please change to a proper search."),f.val("")):f.val(""));try{if(-1!==e.toLowerCase().indexOf("pin:")){if(-1!==(e=e.slice(e.toLowerCase().indexOf("pin:")+4)).indexOf(")")&&(e=e.slicePriorToX(")")),parseInt(e,10)>v)return;for(a=ve[parseInt(e,10)-1],N=[],i=0,n=a.length;i";if(""!==e&&void 0!==e){for(0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(a="GPIO_MD->"),Fe=[];-1!==e.indexOf("GPIOpin:");)t=(i=e.slice(e.indexOf("GPIOpin:"))).slice(i.indexOf("GPIOpin:")+8,i.indexOf("\r\n")),$i(o=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][parseInt(t,10)])&&(void 0===Fe?Fe[0]=parseInt(t,10):Fe.push(parseInt(t,10))),e=i.slice(1);for(Ve={};-1!==e.indexOf("UserDefined:");)o=(t=(n=e.slice(e.indexOf("UserDefined:"))).slice(n.indexOf("UserDefined:")+12,n.indexOf("\r\n"))).sliceAfterX("=>"),t=t.slicePriorToX("=>"),Ve[t]=o,e=n.slice(1);for(e=s;-1!==e.indexOf(a);)l=(r=e.sliceAfterX(a)).slice(r.indexOf(" = ")+3,r.indexOf("\r\n")),isNaN(parseInt(l.slice(2),16))?Mi("寄存器的值"+r.slicePriorToX("\r")+"存在一些错误,请更正它并重载配置档。","暫存器的值"+r.slicePriorToX("\r")+"存在一些錯誤,請更正它並重載配置檔。","The register value of "+r.slicePriorToX("\r")+" in the config file is incorrect.Please correct it and re-load the config file again."):Be[r.slicePriorToX(" = ")]=parseInt(l.slice(2),16),e=r.slice(1);for(e=s;-1!==e.indexOf("ALT_MFP");)l=(r=e.slice(e.indexOf("ALT_MFP"))).slice(r.indexOf(" = ")+3,r.indexOf("\r\n")),isNaN(parseInt(l.slice(2),16))?Mi("寄存器的值"+r.slicePriorToX("\r")+"存在一些错误,请更正它并重载配置档。","暫存器的值"+r.slicePriorToX("\r")+"存在一些錯誤,請更正它並重載配置檔。","The register value of "+r.slicePriorToX("\r")+" in the config file is incorrect.Please correct it and re-load the config file again."):Be[r.slicePriorToX(" = ")]=parseInt(l.slice(2),16),e=r.slice(1)}i=null,t=null,r=null,l=null,s=null,o=null}(s)):(Mi("从配置档读出的封装名称 "+r+" 不正确","從配置檔讀出的封裝名稱 "+r+" 不正確。","The package name "+r+" read from the config file is incorrect."),""!==_&&""!==g&&Nn(_,g,"js"),o="undefined"==typeof NUTOOL_PER?void 0===NUTOOL_PIN.g_partNumber_package_default||""===NUTOOL_PIN.g_partNumber_package_default?"NUC472VI8AE(LQFP100)":NUTOOL_PIN.g_partNumber_package_default:"M251EB2AE(TSSOP28)");NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&tt();return e=null,i=null,a=null,N=[],O=[],n=null,r=null,t=null,g=null,_=null,d=null,null,u=null,bMismatchedRedundant=null,c=null,f}()||(e=!1),NUTOOL_PIN.decidepackageNumber(),Ci(),e}function Ci(){return 33===(v=parseInt(NUTOOL_PIN.g_packageNumber.slice(NUTOOL_PIN.g_packageNumber.indexOf(NUTOOL_PIN.g_packageNumber.match(/\d/))),10))&&(v=32),-1!==NUTOOL_PIN.g_packageNumberIndex.toLowerCase().indexOf("pin:")?(y=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("D","R"),10),D=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("R","U"),10),w=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("U","L"),10),F=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("L",")"),10)):(y=v/4,D=v/4,w=v/4,F=v/4),E=Math.max(y,D,w,F),this}function mi(){return C=30,z=2,n=.95,I="\f",ge.getContext=function(e){return e.getContext("2d")},ge.removeContext=function(e){e.remove()},ge.addEvent=function(e,i,n){e.addEventListener(i,n,!1)},$("html").addClass("ie10+"),"undefined"==typeof NUTOOL_PER&&(Nn("","/tabulator/promise-polyfill.js","js"),Nn("","/tabulator/js/tabulator.js","js"),Nn("","/tabulator/css/tabulator.css","css")),!1}function Ui(){var e=localStorage.getItem("UIlanguage");Ne=void 0===e||null==e?"English":e,e=null}function bi(){var e=localStorage.getItem("DisplayTooltip");r=void 0===e||null==e||"No"!==e,e=null}function Li(){$(document).keypress((function(e){e.which}))}function ki(e){return!isNaN(parseFloat(e))&&isFinite(e)}function $i(e){return!(void 0===e||"P"!==e.slice(0,1)||"."!==e.slice(2,3)||!ki(e.sliceAfterX(".")))||(!(!NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode||void 0===e||"B"!==e.slice(0,1)||"P"!==e.slice(1,2)||!ki(e.sliceAfterX(".")))||("N9H30xxxIIM"===l||"N9H31KxxIFC"===l)&&void 0!==e&&-1!=e.indexOf("ADC"))}function Ai(e){return!!(NUTOOL_PIN.g_cfg_wppin&&NUTOOL_PIN.g_cfg_wppin[NUTOOL_PIN.g_packageNumberIndex]&&NUTOOL_PIN.g_cfg_wppin[NUTOOL_PIN.g_packageNumberIndex].includes(e))}function Si(e){return!!(NUTOOL_PIN.g_cfg_WPPin.length>0&&NUTOOL_PIN.g_cfg_WPPin.includes(e))}function vi(){var e,i,n,t,r,l,s,a,d,c,f,g,_,u,N,O=0,p=0,h=0,x=0;if(0===$("#NUC_PinConfiguration_Canvas").length&&$("#panel")[0].appendChild(Zi("canvas","NUC_PinConfiguration_Canvas")),s=$("#NUC_PinConfiguration_Canvas")[0],(a=ge.getContext(s)).font=B,N=a.measureText("012345678901234567890123456789").width,z=ii?0:2,Z=20,-1!==o.indexOf("SOP")){for(e=0,t=v/2;e=0;n-=1)f+=NUTOOL_PIN.g_cfg_gpios[i].f[n].slicePriorToX(":"),0!==n&&(f+="/");break}for(""===f&&(f=d),ve[e]=f,_="",c=(d=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e+v/2])+":0",i=0,r=NUTOOL_PIN.g_cfg_gpios.length;iO&&(O=a.measureText(f).width),a.measureText(_).width>h&&(h=a.measureText(_).width))}de=v/2*(K+z)-z+2*Z,Je?(O=0;n-=1)f+=NUTOOL_PIN.g_cfg_gpios[i].f[n].slicePriorToX(":"),0!==n&&(f+="/");break}""===f&&(f=d),ve[e]=f}de=Math.sqrt(v)*(2*W+z)-z+2*Z,ce=N+H+Q,fe=N+H+Q}else{for(e=0,t=y;e=0;n-=1)g+=NUTOOL_PIN.g_cfg_gpios[i].f[n].slicePriorToX(":"),0!==n&&(g+="/");break}""===g&&(g=d),ve[e]=g,Je&&a.measureText(g).width>p&&(p=a.measureText(g).width)}for(e=0,t=D;eh&&(h=a.measureText(_).width)}for(e=0,t=w;ex&&(x=a.measureText(u).width)}for(e=0,t=F;e=0;n-=1)f+=NUTOOL_PIN.g_cfg_gpios[i].f[n].slicePriorToX(":"),0!==n&&(f+="/");break}""===f&&(f=d),ve[e+y+D+w]=f,Je&&a.measureText(f).width>O&&(O=a.measureText(f).width)}de=E*(K+z)-z+2*Z,Je?(O>>0,t=(Ge[d="G"+n+"_MFPL"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0):(g=15<<4*(a-8)>>>0,t=(Ge[c="G"+n+"_MFPH"]&~g)>>>0,i=i<<4*(a-8)>>>0,Ge[c]=(t|i)>>>0);else if("M0A21"===l||0===l.indexOf("M46")||0===l.indexOf("M2L31")||0===l.indexOf("M55M1"))n=e.slice(0,2),g=255<<8*((a=parseInt(e.slice(3),10))-4*(s=Math.floor(a/4)))>>>0,t=(Ge[d="G"+n+"_MFP"+s]&~g)>>>0,i=i<<8*(a-4*s)>>>0,Ge[d]=(t|i)>>>0;else if("MINI57"===l||"NM1120"===l)n=e.slice(0,2),g=15<<4*(a=parseInt(e.slice(3),10))>>>0,t=(Ge[d="G"+n+"_MFP"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0;else if("NANO100AN"===l||"NANO100BN"===l||"NANO112"===l)n=e.slice(0,2),(a=parseInt(e.slice(3),10))<8&&(f=!0),f?(g=15<<4*a>>>0,t=(Ge[d=n+"_L_MFP"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0):(g=15<<4*(a-8)>>>0,t=(Ge[c=n+"_H_MFP"]&~g)>>>0,i=i<<4*(a-8)>>>0,Ge[c]=(t|i)>>>0);else if(0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003"))n=e.slice(0,2),g=15<<4*(a=parseInt(e.slice(3),10))>>>0,t=(Ge[d=n+"MF76543210"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0;else if(0===l.indexOf("KM1M7")||0===l.indexOf("KM1M4")||0===l.indexOf("KM1M0"))n=e.slice(0,2),g=15<<4*(a=parseInt(e.slice(3),10))>>>0,t=(Ge[d="IO"+n+"MD"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0;else if("ISD9100"===l||"ISD9300"===l)n=e.slice(0,2),g=3<<2*(a=parseInt(e.slice(3),10))>>>0,t=(Ge[d="G"+n+"_MFP"]&~g)>>>0,i=i<<2*a>>>0,Ge[d]=(t|i)>>>0;else if("MINI55"===l||"NM1200"===l){for(_=0,r=NUTOOL_PIN.g_cfg_gpioMatrix.length;_>>0,N=0,i&1<>>0),t=(Ge[n]&~g)>>>0,Ge[n]=(t|N)>>>0;break}"P3.2"===e&&1===i&&(Ge.PIN_SEL=0)}else for(_=0,r=NUTOOL_PIN.g_cfg_gpioMatrix.length;_>>0,N=0,i&1<>>0),t=(Ge[n]&~g)>>>0,Ge[n]=(t|N)>>>0;break}n=null,g=null,t=null,_=null,u=null,r=null,o=null,s=null,N=null,O=null,a=null,d=null,c=null,f=null}function ji(e,i){var n,t,r,o=-1;return NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(t=parseInt(e.sliceAfterX("BP").slicePriorToX("."))+65,r=String.fromCharCode(t),e=e.replace(/BP[0-9]{1,}\./,"P"+r+".")),e=e.replace("GP","P"),"M0519"===l||"M051DN_DE"===l||"M051BN"===l||"M051AN"===l||"M058S"===l||"MINI51AN"===l||"MINI51DE"===l||"MINI55"===l||"MINI58"===l||"NUC029AE"===l||"NUC029TAE"===l||"NUC029AN"===l||"NM1200"===l||"NM1500"===l?n=8*parseInt(e.slice(1,2),16)+parseInt(e.slice(3),10):0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003")?n=8*parseInt(e.slice(1,2),16)+i:0===l.indexOf("KM1M7")||0===l.indexOf("KM1M4")||0===l.indexOf("KM1M0")?(o=e.indexOf("P"),n=8*parseInt(e.slice(o+1,o+2),16)+i):n="MINI57"===l||"NM1120"===l||"M0A21"===l?8*(e.slice(1,2).charCodeAt(0)-"A".charCodeAt(0))+i:16*(e.slice(1,2).charCodeAt(0)-"A".charCodeAt(0))+i,n}function Xi(e){var i,n,t,r,o,s,a,d,c,f,g,_,u,N,O,p,h,x,P,T=[],M=$("#moduleTree");if(s=a=parseInt(e.toLowerCase().slice(e.indexOf("0x")+2),16),"NUC400"===l||"M451HD"===l||"M451LD"===l||"M4521"===l||"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l||"NUC505"===l||"NUC121AE"===l||"NUC123AE"===l||"NANO103"===l||0===l.indexOf("M47")||"M433"===l||"M480MD"===l||"M480LD"===l||"AX58200"===l||0===l.indexOf("M25")||"M261"===l||0===l.indexOf("M235")||0===l.indexOf("M029")||0===l.indexOf("M030")||0===l.indexOf("M031")||0===l.indexOf("M091")||"M0564"===l||"M05641"===l||0===l.indexOf("NUC126")||"M071QV"===l||"NUC029xGE"===l||"NUC029KGE"===l||"MINI57"===l||"NM1120"===l||"NDA102"===l||"MA35D0"===l||"MA35D1"===l||"MA35H0"===l||0===l.indexOf("M2003")||0===l.indexOf("N9H30")||0===l.indexOf("N9H31")||0===l.indexOf("NUC97")||0===l.indexOf("NUC98")||0===l.indexOf("M2A23"))for(P=-1===e.indexOf("MFPH")&&-1===e.indexOf("_H_MFP"),i=0;i<8;i+=1){if(c=(a&(d=15<<4*i>>>0))>>>4*i>>>0)if(f=P?i:i+8,g="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+f.toString(),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(code=g.charCodeAt(1)-65,g=g.replace(/P[A-Z]\./,"BP"+code+".")),-1!==(u=$.inArray(g,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))){for(O="",N=ji(e,f),n=1,r=NUTOOL_PIN.g_cfg_gpios[N].f.length;n>>0))>>>8*i>>>0)if(f=i+4*x,g="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+f.toString(),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(code=g.charCodeAt(1)-65,g=g.replace(/P[A-Z]\./,"BP"+code+".")),-1!==(u=$.inArray(g,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))){for(O="",N=ji(e,f),n=1,r=NUTOOL_PIN.g_cfg_gpios[N].f.length;n>>0))>>>4*i>>>0)if(f=i,g="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+f.toString(),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(code=g.charCodeAt(1)-65,g=g.replace(/P[A-Z]\./,"BP"+code+".")),-1!==(u=$.inArray(g,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))){for(O="",N=ji(e,f),n=1,r=NUTOOL_PIN.g_cfg_gpios[N].f.length;n>>0))>>>2*i>>>0)if(f=i,g="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+f.toString(),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(code=g.charCodeAt(1)-65,g=g.replace(/P[A-Z]\./,"BP"+code+".")),-1!==(u=$.inArray(g,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))){for(N=ji(e,f),O="",n=1,r=NUTOOL_PIN.g_cfg_gpios[N].f.length;n>>0))>>>i>>>0){for(p=e.slice(e.indexOf("P"),e.indexOf(":"))+"["+i+"]",n=0,r=NUTOOL_PIN.g_cfg_gpioMatrix.length;n>>0,h.slicePriorToX("["),c+=((a&d)>>>x)*Math.pow(2,t-1),a&=~d;for(N=8*parseInt(g.slice(1,2),16)+parseInt(g.slice(3),10),O="",t=1,o=NUTOOL_PIN.g_cfg_gpios[N].f.length;t>>0);continue}_=Ri(_=O),O=O.replaceSpecialCharacters(),-1!==_.indexOf("_")&&(_=_.slicePriorToX("_")),T[0]=u+1,M.jstree("check_node",$("#"+O+"_Pin"+(u+1))),$("#"+O+"_Pin"+(u+1)).hasClass("jstree-checked")||(M.jstree("open_node",$("#"+_+"_Root")),M.jstree("open_node",$("#"+O+"_Intermediate")),M.jstree("check_node",$("#"+O+"_Pin"+(u+1))));break}}-1===u&&(s&=~d)}if(0===a)break}return e=e.slice(0,e.indexOf("0x")+2)+zi(s),null,i=null,n=null,null,null,r=null,s=null,a=null,d=null,c=null,f=null,g=null,_=null,T=[],u=null,N=null,O=null,M=null,p=null,h=null,null,x=null,e}function Bi(e){var i,n,t,r,o,s,a,d,c,f,g,_,u,N,O,p=parseInt(e.toLowerCase().slice(e.indexOf("0x")+2),16),h=[];if("NUC400"===l||"M451HD"===l||"M451LD"===l||"M4521"===l||"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l||"NUC505"===l||"NUC121AE"===l||"NUC123AE"===l||"NANO103"===l||0===l.indexOf("M47")||"M433"===l||"M480MD"===l||"M480LD"===l||"AX58200"===l||0===l.indexOf("M25")||"M261"===l||0===l.indexOf("M235")||0===l.indexOf("M029")||0===l.indexOf("M030")||0===l.indexOf("M031")||0===l.indexOf("M091")||"M0564"===l||"M05641"===l||0===l.indexOf("NUC126")||"M071QV"===l||"NUC029xGE"===l||"NUC029KGE"===l||"MINI57"===l||"NM1120"===l||"NDA102"===l||"MA35D0"===l||"MA35D1"===l||"MA35H0"===l||0===l.indexOf("M2003")||0===l.indexOf("N9H30")||0===l.indexOf("N9H31")||0===l.indexOf("NUC97")||0===l.indexOf("NUC98")||0===l.indexOf("M2A23"))for(O=-1===e.indexOf("MFPH")&&-1===e.indexOf("_H_MFP"),n=0;n<8;n+=1)if((p&15<<4*n>>>0)>>>4*n>>>0,c=O?n:n+8,f="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+c.toString(),-1!==(u=$.inArray(f,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))&&""!==we[u]&&(g=(g=we[u]+"_Pin"+(u+1)).replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(_=Ri(g.slicePriorToX("_")),h[0]=u+1,Oi(g,_,h),$("#"+g).addClass("jstree-unchecked"),void 0!==He[_]))){for(i=0,o=He[_].length;i>>0)>>>8*n>>>0,c=n+4*d,f="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+c.toString(),-1!==(u=$.inArray(f,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))&&""!==we[u]&&(g=(g=we[u]+"_Pin"+(u+1)).replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(_=Ri(g.slicePriorToX("_")),h[0]=u+1,Oi(g,_,h),$("#"+g).addClass("jstree-unchecked"),void 0!==He[_]))){for(i=0,o=He[_].length;i>>0)>>>4*n>>>0,c=n,f="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+c.toString(),-1!==(u=$.inArray(f,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))&&""!==we[u]&&(g=(g=we[u]+"_Pin"+(u+1)).replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(_=Ri(g.slicePriorToX("_")),h[0]=u+1,Oi(g,_,h),$("#"+g).addClass("jstree-unchecked"),void 0!==He[_]))){for(i=0,o=He[_].length;i>>0)>>>2*n>>>0,c=n,f="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+c.toString(),-1!==(u=$.inArray(f,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))&&""!==we[u]&&(g=(g=we[u]+"_Pin"+(u+1)).replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(_=Ri(g.slicePriorToX("_")),h[0]=u+1,Oi(g,_,h),$("#"+g).addClass("jstree-unchecked"),void 0!==He[_]))){for(i=0,o=He[_].length;i>>0)>>>n>>>0)for(N=e.slice(e.indexOf("P"),e.indexOf(":"))+"["+n+"]",t=0,s=NUTOOL_PIN.g_cfg_gpioMatrix.length;t";if("undefined"!=typeof NUTOOL_PER&&Ki(),"h"!==NUTOOL_PIN.g_pinFunctionString&&"dtsi"!==NUTOOL_PIN.g_pinFunctionString||a.sliceAfterX(".")===NUTOOL_PIN.g_pinFunctionString||(a=a.slicePriorToX(".")+"."+NUTOOL_PIN.g_pinFunctionString+'"\r\n'),d="",0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(w=""),k=Qi(Ge),"KM1M7CF"!==l&&k.sort(),0!==NUTOOL_PIN.g_cfg_gpiosDefines.length){if(-1===a.indexOf(".dtsi"))for(e=0,c=k.length;e0)for(i=y[k[e]].length-1;i>=0;i-=1)d+=" "+y[k[e]][i]+";\r\n",f=f+" "+y[k[e]][i]+";"}else if(0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003")){for(e=0,c=k.length;e0)for(i=0,g=y[k[e]].length;iIOPnMD = 0x"+zi(Ge[k[e]]).toUpperCase()+"UL;\r\n";for(d+="\r\n","undefined"==typeof NUTOOL_PER&&(d+=" /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\r\n"),f="",e=0,c=k.length;e0)for(d+=" "+w+"GPIO_MD(0x"+k[e][3]+")->IOPnMD = ",f=f+" "+w+"GPIO_MD(0x"+k[e][3]+")->IOPnMD = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+"GPIO_MD(0x"+k[e][3]+")->IOPnMD = 0x00000000;\r\n"}else if(0===l.indexOf("KM1M4BF")){for(e=0,c=k.length;eIOPnMD = 0x"+zi(Ge[k[e]]).toUpperCase()+"UL;\r\n":d+=" //"+w+"DBG->SELSWD = 0x"+zi(Ge[k[e]]).toUpperCase().slice(-2)+"UL;\r\n";for(d+="\r\n","undefined"==typeof NUTOOL_PER&&(d+=" /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\r\n"),f="",e=0,c=k.length;e0)for(d+=" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = ",f=f+" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = 0x00000000;\r\n";else 0==zi(Ge[k[e]])?d+=" "+w+"DBG->SELSWD = DEBUG_INTERFACE_DISABLE;\r\n":d+=" "+w+"DBG->SELSWD = DEBUG_INTERFACE_ENABLE;\r\n"}else if(0===l.indexOf("KM1M7CF")){for(e=0,c=k.length;eIOPnMD = 0x"+zi(Ge[k[e]]).toUpperCase()+"UL;\r\n":d+=" //"+w+k[e].slicePriorToX("_")+"->FPS"+k[e][3]+"n_SEL = 0x"+zi(Ge[k[e]]).toUpperCase()+"UL;\r\n";for(d+="\r\n","undefined"==typeof NUTOOL_PER&&(d+=" /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\r\n"),f="",e=0,c=k.length;e0)for(d+=" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = ",f=f+" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = 0x00000000;\r\n";else if(y[k[e]].length>0)for(d+=" "+w+k[e].slicePriorToX("_")+"->FPS"+k[e][3]+"n_SEL = ",f=f+" "+w+k[e].slicePriorToX("_")+"->FPS"+k[e][3]+"n_SEL = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+k[e].slicePriorToX("_")+"->FPS"+k[e][3]+"n_SEL = 0x00000000;\r\n"}else if(0===l.indexOf("M55M1"))for(d+="\r\n",f="",e=0,c=we.length;e;\r\n};\r\n\r\n";for(d+="&pinctrl {\r\n",e=0,c=k.length;eU&&(U=y[k[e]][i].length);for(U+=1,C=k[e].toLowerCase(),d+=" "+C+" {\r\n pinctrl_"+C+": "+C+"grp {\r\n nuvoton,pins =\r\n",f+=" "+C+" {\r\n pinctrl_"+C+": "+C+"grp {\r\n nuvoton,pins =\r\n",i=0,g=y[k[e]].length;i0)for(d+=" "+w+k[e]+" = ",f=f+" "+w+k[e]+" = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+k[e]+" = 0x00000000;\r\n"}}else{for(e=0,c=k.length;e\{\}\[\]\\\/]/gi,"_").toUpperCase()).charAt(0))&&(U="_"+U),T+="#define "+U+" "+x.replace(/[.]/g,"").replace(/\s/g,"_").replace(/[`~!@#$%^&*()|+\-=?;:'",<>\{\}\[\]\\\/]/gi,"_")+"\r\n");"/* User-defined pins */\r\n"===T&&(T=""),L||("STADC"===C&&""===f&&(f="We do not Have the Define for STADC;"),$("#NUC_PinConfiguration_Canvas")[0].setAttribute("innerHTML",f))}function Wi(){var e,i,n,t,r,o,s,f,_,u,N,O,p,h,x,P,M,I,C,m,U,b,L,k=[],$=[],A=[],S="",y=[],D=[],w="SYS->",F=localStorage.getItem("ProjectName");for(O=function(e,i,n){return L=!1,(-1!==e.indexOf("_"+i)||-1!==e.indexOf(i+":")||0===e.indexOf(i+"_")||-1!==e.indexOf(","+i+"_")||-1!==e.lastIndexOf(i)&&e.lastIndexOf(i)+i.length===e.length||"GPIO"===i&&-1!==e.indexOf("_MFP_G"+n)||0===e.indexOf(i)&&-1!==e.indexOf("_FPS"))&&(L=!0),"GPIO"===i&&-1===e.indexOf("SYS_G"+n)&&-1===e.indexOf("SYS_MFP_"+n)&&-1===e.indexOf("SYS_"+n)&&-1===e.indexOf("MD_"+n)&&-1===e.indexOf("GPIO_"+n)&&(L=!1),L},p=function(e){return 0===e.indexOf("SYS_MFP")?e.substring(0,11)+"_Msk":0===e.indexOf("SYS_GP")&&-1!==e.indexOf("_MFP_")?-1===e.indexOf("_MFPL_")&&-1===e.indexOf("_MFPH_")?e.substring(0,15)+"_Msk":e.slicePriorToX("MFP_")+"MFP_Msk":-1===e.indexOf("SYS_GP")&&e.indexOf("_MFP_")!==e.lastIndexOf("_MFP_")?e.substring(0,e.lastIndexOf("_MFP_")+5)+"Msk":0===e.indexOf("GPIO_IO")?e.substring(0,e.lastIndexOf("MD_")+3)+"Msk":0===e.indexOf("GPIO_P")?"GPIO_MD_IOPnMD_Pn"+e.substring(7,e.lastIndexOf("GPIO_P")+8)+"MD_Msk":0===e.indexOf("GPIO_FPS")?"":e.slicePriorToX("MFP_")+"MFP_Msk"},0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(w=""),"undefined"!=typeof NUTOOL_PER&&Ki(),"h"!==NUTOOL_PIN.g_pinFunctionString&&"dtsi"!==NUTOOL_PIN.g_pinFunctionString||a.sliceAfterX(".")===NUTOOL_PIN.g_pinFunctionString||(a=a.slicePriorToX(".")+"."+NUTOOL_PIN.g_pinFunctionString+'"\r\n'),(k=Qi(Ge)).sort(),e=0,r=k.length;e0&&O(D[k[e]].join(),S,A[n])){var E;for(U=!1,b=!0,i=D[k[e]].length-1;i>=0;i-=1){var j=D[k[e]][i].slicePriorToX("MFP_").sliceAfterX("_MFP").sliceAfterX("_");if(O(D[k[e]][i],S,A[n])){I=D[k[e]][i].slicePriorToX(":"),U&&(m+="(); // Pin: "+E+"\r\n",g+="();
");var X=j.slice(0,2)+"."+j.slice(2);E=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].indexOf(X)+1,m+=" SET_"+I+"_"+j,g+=" SET_"+I+"_"+j,U=!0}}m+="(); // Pin: "+E+"\r\n",g+="();
"}for(m+="\r\n return;\r\n}\r\n\r\n",b?d+=m:g+=A[n]+" did not generate modularized code!!
",m="void "+F+"_deinit_"+A[n].toLowerCase()+"(void)\r\n{\r\n",b=!1,e=0,r=k.length;e0&&O(D[k[e]].join(),S,A[n])){for(U=!1,b=!0,i=D[k[e]].length-1;i>=0;i-=1){if(O(D[k[e]][i],S,A[n]))U&&(m+="();\r\n"),m+=" SET_GPIO_"+(j=D[k[e]][i].slicePriorToX("MFP_").sliceAfterX("_MFP").sliceAfterX("_")),g+=" SET_GPIO_"+j,U=!0}m+="();\r\n"}m+="\r\n return;\r\n}\r\n\r\n",b&&(d+=m)}else for(n=0,s=A.length;n0&&O(D[k[e]].join(),S,A[n])){for(U=!1,b=!0,m+=" "+w+k[e]+" &= ~(",g+=" "+w+k[e]+" &= ~(",i=D[k[e]].length-1;i>=0;i-=1)O(D[k[e]][i],S,A[n])&&(U&&(m+=" | ",g+=" | "),m+=p(I=D[k[e]][i].sliceAfterX(":")),g+=p(I),U=!0);for(m+=");\r\n",g+=");
",U=!1,m+=" "+w+k[e]+" |= (",g+=" "+w+k[e]+" |= (",i=D[k[e]].length-1;i>=0;i-=1)O(D[k[e]][i],S,A[n])&&(U&&(m+=" | ",g+=" | "),m+=I=D[k[e]][i].sliceAfterX(":"),g+=I,U=!0);m+=");\r\n",g+=");
"}for(m+="\r\n return;\r\n}\r\n\r\n",b?d+=m:g+=A[n]+" did not generate modularized code!!
",m="void "+F+"_deinit_"+A[n].toLowerCase()+"(void)\r\n{\r\n",b=!1,e=0,r=k.length;e0&&O(D[k[e]].join(),S,A[n])){for(U=!1,b=!0,m+=" "+w+k[e]+" &= ~(",i=D[k[e]].length-1;i>=0;i-=1)O(D[k[e]][i],S,A[n])&&(U&&(m+=" | "),m+=p(I=D[k[e]][i].sliceAfterX(":")),U=!0);m+=");\r\n"}m+="\r\n return;\r\n}\r\n\r\n",b&&(d+=m)}for("undefined"==typeof NUTOOL_PER?d+="void "+F+"_init(void)\r\n{\r\n":d+="void Pin_Init(void)\r\n{\r\n",e=0,r=k.length;e\{\}\[\]\\\/]/gi,"_").toUpperCase()).charAt(0))&&(I="_"+I),T+="#define "+I+" "+_.replace(/[.]/g,"").replace(/\s/g,"_").replace(/[`~!@#$%^&*()|+\-=?;:'",<>\{\}\[\]\\\/]/gi,"_")+"\r\n");"/* User-defined pins */\r\n"===T&&(T=""),k=null,$=null,A=null,y=null,D=null,gpio_MFPsDefine=null}function zi(e,i){var n=Number(e).toString(16);for(i=null==i?i=8:i;n.lengthae/3?ae/3:18*Qi(Ge).length+20,0===_.length&&($("#rootTree_Pin")[0].appendChild(Zi("div","mfpTree","Loading...")),_=$("#mfpTree"),$("#ChipType").hover((function(){$(this).css("background-color","#FAFAFA"),Ji()}),(function(){$(this).css("background-color","#FFFFFF")})),$("#MCU").hover((function(){$(this).css("background-color","#FAFAFA"),Ji()}),(function(){$(this).css("background-color","#FFFFFF")}))),_[0].setAttribute("style","background-color: #FFFFFF; float:left; overflow-y: scroll; width:"+G+"px; height: "+se+"px; border-bottom: 5px solid #F2F2F2;"),-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?ii?_.hover((function(){$(this).css("background-color","#FAFAFA"),Ji(),$("#pin_side_0").show(),$("#NUC_PinConfiguration_Canvas_Lining").hide()}),(function(){$(this).css("background-color","#FFFFFF"),$("#pin_side_0").hide(),$("#NUC_PinConfiguration_Canvas_Lining").show()})):_.hover((function(){$(this).css("background-color","#FAFAFA"),Ji(),$("#pin_side_0").css("opacity","0.8"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","0")}),(function(){$(this).css("background-color","#FFFFFF"),$("#pin_side_0").css("opacity","0.1"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","1")})):_.hover((function(){$(this).css("background-color","#FAFAFA"),Ji()}),(function(){$(this).css("background-color","#FFFFFF")})),_.jstree({json_data:{data:g},themes:{theme:"default",icons:!1},core:{animation:0},plugins:["themes","json_data","ui","crrm"]}).bind("hover_node.jstree",(function(e,i){var n=i.rslt.obj.attr("id").slicePriorToX(":"),t="";r&&NUTOOL_PIN.g_cfg_regDescriptions.hasOwnProperty(n)&&(-1===NUTOOL_PIN.g_cfg_regDescriptions[n].indexOf("nonexistent")&&(t="Simplified Chinese"===Ne||"Traditional Chinese"===Ne?"位址: ":"Address: "),et(n,t+=NUTOOL_PIN.g_cfg_regDescriptions[n],"right"))})).bind("dblclick.jstree",(function(e){var i=$(e.target).closest("li")[0].id;"mfp_tree"!==i&&void 0===Ge.ALT_MFP&&"MINI55"!==l&&"NM1200"!==l&&_.jstree("rename",$("#"+i))})).bind("rename.jstree",(function(e,i){var n,t,r=i.rslt.obj.attr("id"),o=i.rslt.old_name,s=i.rslt.new_name;n=s,t=!1,"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().indexOf("p")&&4===n.toLowerCase().lastIndexOf("_mfp")&&8===n.toLowerCase().lastIndexOf(":0x")&&(t=!0):"NM1500"===l||"M0519"===l||"M051DN_DE"===l||"M051BN"===l||"M051AN"===l||"M058S"===l||"MINI51AN"===l||"MINI51DE"===l||"MINI55"===l||"MINI58"===l||"NUC029AE"===l||"NUC029TAE"===l||"NUC029AN"===l||"NM1200"===l?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().indexOf("p")&&2===n.toLowerCase().lastIndexOf("_mfp")&&6===n.toLowerCase().lastIndexOf(":0x")&&(t=!0):0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003")?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().lastIndexOf("p")&&2===n.toLowerCase().lastIndexOf("mf")&&12===n.toLowerCase().lastIndexOf(":0x")&&(t=!0):0===l.indexOf("KM1M7CF")?(8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().lastIndexOf("iop")&&4===n.toLowerCase().lastIndexOf("md")||0===n.toLowerCase().lastIndexOf("fps")&&6===n.toLowerCase().lastIndexOf("_sel"))&&(t=!0):0===l.indexOf("KM1M7AF")||0===l.indexOf("KM1M7BF")||0===l.indexOf("KM1M4BF")||0===l.indexOf("KM1M0F")?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().lastIndexOf("iop")&&4===n.toLowerCase().lastIndexOf("md")&&6===n.toLowerCase().lastIndexOf(":0x")&&(t=!0):8!==n.slice(n.toLowerCase().indexOf("0x")+2).length||0!==n.toLowerCase().lastIndexOf("gp")||3!==n.toLowerCase().lastIndexOf("_mfp")||7!==n.toLowerCase().lastIndexOf(":0x")&&8!==n.toLowerCase().lastIndexOf(":0x")||(t=!0),t?(Bi(o),s=Xi(s),Vi()):_.jstree("rename_node",$("#"+r),o)})).bind("destroy.jstree",(function(){e=null,i=null,n=null,t=null,c=[],f=[],s=null,g=null,a=null,_=null,u=null,d=null})),_.css("font-size","16px"),_.css("font-family",'Monaco, Consolas, "Lucida Console", monospace;')}function Vi(){var e,i,n,t,r,l=[],o=0;for(e=0,n=(l=Qi(Ge)).length;e=0;n-=1)if(c=NUTOOL_PIN.g_cfg_gpios[t].f[n],parseInt(c.slice(c.indexOf(":")+1),10)=0;r-=1)0===l.indexOf("MA35D0")||0===l.indexOf("MA35H0")?0===NUTOOL_PIN.g_cfg_gpios[t].f[r].toUpperCase().indexOf(f+"_")&&NUTOOL_PIN.g_cfg_gpios[t].f.splice(r,1):0===NUTOOL_PIN.g_cfg_gpios[t].f[r].toUpperCase().indexOf(f)&&NUTOOL_PIN.g_cfg_gpios[t].f.splice(r,1);else if("PARTIAL"===u[e])for(t=0,d=NUTOOL_PIN.g_cfg_gpios.length;t=0;r-=1)NUTOOL_PIN.g_cfg_gpios[t].f[r].slicePriorToX(":").toUpperCase()===f&&NUTOOL_PIN.g_cfg_gpios[t].f.splice(r,1);else for(c=u[e]+":0",t=0,d=NUTOOL_PIN.g_cfg_gpios.length;t=0;r-=1)0===NUTOOL_PIN.g_cfg_gpios[t].f[r].toUpperCase().indexOf(f)&&NUTOOL_PIN.g_cfg_gpios[t].f.splice(r,1);break}for(e=(N=Qi(NUTOOL_PIN.g_cfg_regDescriptions)).length-1;e>=0;e-=1)void 0===Ge[N[e]]&&delete NUTOOL_PIN.g_cfg_regDescriptions[N[e]];for(je=[],e=0;e=y&&r=y+D&&r=y+D+w&&r4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,Y+V,r.y[e]-r.y[0]+V+4*K/5);break;case 1:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,Y+V,r.y[e]-r.y[r.oneSidePinNumber-1]+V+4*K/5)}else if(-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA"))for(e=0;e6&&(i=i.slice(0,6)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,r.x[e]-r.ctx.measureText(i).width/2,r.y[e]+parseInt(r.ctx.font,10)/2));else switch(r.whichSide){case 0:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",n=r.x[e]-r.x[0]+V,t=Y+V+H,r.ctx.save(),r.ctx.translate(n,t),r.ctx.rotate(-Math.PI/2),r.ctx.fillText(i,Y,4*K/5),r.ctx.restore();break;case 1:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,Y+V,r.y[e]-r.y[r.oneSidePinNumber-1]+V+4*K/5);break;case 2:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",n=r.x[e]-r.x[r.oneSidePinNumber-1]+V,t=V+H,r.ctx.save(),r.ctx.translate(n,t),r.ctx.rotate(-Math.PI/2),r.ctx.textAlign="end",r.ctx.fillText(i,H,4*K/5),r.ctx.restore();break;case 3:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,Y+V,r.y[e]-r.y[0]+V+4*K/5)}i=null,n=null,t=null},restore:function(){ge.removeContext($("#"+r.inner)),r=null},getMousePos:function(e,i){var n=e.getBoundingClientRect();return{x:i.clientX-n.left,y:i.clientY-n.top}},decideWhichPin:function(){var e,i,n;if(-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA"))for(e=r.mousePosition.x-ce*Le/100,i=r.mousePosition.y-fe*Le/100,n=0;n=(r.x[n]-r.r)*Le/100&&e<=(r.x[n]+r.r)*Le/100&&i>=(r.y[n]-r.r)*Le/100&&i<=(r.y[n]+r.r)*Le/100){r.currentPinIndex=n;break}r.currentPinIndex=-1}else for(n=0;n=e&&r.mousePosition.x<=e+r.w*Le/100&&r.mousePosition.y>=r.y[n]*Le/100&&r.mousePosition.y<=(r.y[n]+r.h)*Le/100){r.currentPinIndex=n;break}r.currentPinIndex=-1}-1!==r.currentPinIndex?r.mouseEnter():r.mouseLeave()},mouseEnter:function(){var e,i,n,s,a,d,c,f,g,_,u,N;for(e=0,i=$e.length;e6&&(N=u.slice(0,6)+".."),r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(N,r.x[n]-r.ctx.measureText(N).width/2,r.y[n]+parseInt(r.ctx.font,10)/2);else switch(r.whichSide){case 0:ii&&r.ctx.strokeRect(r.x[n]-r.x[0]+V,Y+V,r.w,r.h),r.ctx.fillRect(r.x[n]-r.x[0]+V,Y+V,r.w,r.h),r.ctx.font=B,r.ctx.fillStyle="black",s=r.x[n]-r.x[0]+V,a=Y+V+H,r.ctx.save(),r.ctx.translate(s,a),r.ctx.rotate(-Math.PI/2),r.ctx.fillText(r.savedPinName[n],Y,4*K/5),r.ctx.restore();break;case 1:ii&&r.ctx.strokeRect(Y+V,r.y[n]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[n]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[n],Y+V,r.y[n]-r.y[r.oneSidePinNumber-1]+V+4*K/5);break;case 2:ii&&r.ctx.strokeRect(r.x[n]-r.x[r.oneSidePinNumber-1]+V,V,r.w,r.h),r.ctx.fillRect(r.x[n]-r.x[r.oneSidePinNumber-1]+V,V,r.w,r.h),r.ctx.font=B,r.ctx.fillStyle="black",s=r.x[n]-r.x[r.oneSidePinNumber-1]+V,a=V+H,r.ctx.save(),r.ctx.translate(s,a),r.ctx.rotate(-Math.PI/2),r.ctx.textAlign="end",r.ctx.fillText(r.savedPinName[n],H,4*K/5),r.ctx.restore();break;case 3:ii&&r.ctx.strokeRect(Y+V,r.y[n]-r.y[0]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[n]-r.y[0]+V,r.w,r.h),r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[n],Y+V,r.y[n]-r.y[0]+4*K/5+V)}(!$i(u)||Si(u)||Ai(u))&&(Ai(u)?d=function(e){return NUTOOL_PIN.g_cfg_wppin_comment&&NUTOOL_PIN.g_cfg_wppin_comment[e]&&""!==String(NUTOOL_PIN.g_cfg_wppin_comment[e])?NUTOOL_PIN.g_cfg_wppin_comment[e]:e}(u):$i(u)?Si(u)&&(0===l.indexOf("KM1M4BF0")?d="When NDMOD pin input is L level, SWDCLK would be selected. Configurable only when NDMOD pin input is H level.":0===l.indexOf("KM1M4BF5")?d="When SELSWD.SWDEN = 1, SWDCLK would be selected. Configurable only when SELSWD.SWDEN = 0.":0===l.indexOf("KM1M0D0F")?"P0.0"===u?d="When NDMOD pin input is L level, DBG_SWDD would be selected. Configurable only when NDMOD pin input is H level.":"P0.1"===u&&(d="When NDMOD pin input is L level, DBG_SWDCLK would be selected. Configurable only when NDMOD pin input is H level."):0===l.indexOf("KM1M0D1F")?"P0.1"===u?d="When NDMOD pin input is L level, DBG_SWDD would be selected. Configurable only when NDMOD pin input is H level.":"P0.2"===u&&(d="When NDMOD pin input is L level, DBG_SWDCLK would be selected. Configurable only when NDMOD pin input is H level."):0===l.indexOf("KM1M0GF")&&("P1.0"===u?d="When NDMOD pin input is L level, DBG_SWDD would be selected. Configurable only when NDMOD pin input is H level.":"P1.1"===u&&(d="When NDMOD pin input is L level, DBG_SWDCLK would be selected. Configurable only when NDMOD pin input is H level."))):d=u,"unknown"!==d&&(t.stage=$("#panel")[0].appendChild(Zi("canvas",r.inner+"_tooltip_pin")),-1===d.indexOf("/")||-1===d.indexOf("XT1_IN")&&-1===d.indexOf("XT1_OUT")&&-1===d.indexOf("XTAL1")&&-1===d.indexOf("XTAL2")||(-1!==d.indexOf("XTAL1")?d+=" (XTAL1":-1!==d.indexOf("XTAL2")?d+=" (XTAL2":-1!==d.indexOf("XT1_IN")?d+=" (XT1_IN":d+=" (XT1_OUT",d+="Simplified Chinese"===Ne?"由User Configuration决定。)":"Traditional Chinese"===Ne?"由User Configuration決定。)":" is decided by User Configuration.)"),ii?(t.w=r.ctx.measureText(d).width,t.h=K,g="12px Arial",_=t.h-4,-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?(c=(ce+r.x[r.currentPinIndex])*Le/100,f=(fe+r.y[r.currentPinIndex]+10)*Le/100):(c=(r.x[r.currentPinIndex]+r.w)*Le/100,f=r.y[r.currentPinIndex]*Le/100)):(Le<100?(t.w=r.ctx.measureText(d).width/Le*100,t.h=K/Le*100,g=12/Le*100+"px Times Arial",_=t.h-5/Le*100,c=r.x[r.currentPinIndex]+r.w,f=r.y[r.currentPinIndex]):(t.w=r.ctx.measureText(d).width,t.h=K,g="12px Arial",_=t.h-4,c=r.x[r.currentPinIndex]+r.w,f=r.y[r.currentPinIndex]),-1===o.indexOf("WLCSP")&&-1===o.indexOf("BGA")||(c+=ce,f+=fe+10)),t.stage.setAttribute("style","z-index:2; position:absolute; left:"+c+"px; top:"+f+"px;"),t.stage.setAttribute("width",t.w+3*ie),t.stage.setAttribute("height",t.h),t.ctx=ge.getContext(t.stage),t.ctx.font=g,t.ctx.strokeStyle="#000000",t.ctx.lineWidth=2,t.ctx.strokeRect(0,0,t.w+3*ie,t.h),t.ctx.fillStyle="#FFF6C0",t.ctx.fillRect(ne,ne,t.w+3*ie-2*ne,t.h-2*ne),t.ctx.fillStyle="#000000",t.ctx.fillText(d,ie,_),d=null))}},mouseLeave:function(){var e,t=r.lastPinIndex;if(-1!==r.lastPinIndex){if(r.ctx.strokeStyle="#000000",r.ctx.fillStyle=r.savedPinPadColor[t],-1!==o.indexOf("SOP"))switch(r.whichSide){case 0:ii&&r.ctx.strokeRect(Y+V,r.y[t]-r.y[0]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[t]-r.y[0]+V,r.w,r.h),r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[t],Y+V,r.y[t]-r.y[0]+4*K/5+V);break;case 1:ii&&r.ctx.strokeRect(Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[t],Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V+4*K/5)}else if(-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA"))-1===(e=""!==we[t]?tn(we[t]):r.savedPinName[t]).toLowerCase().indexOf("toolnotshow")&&(r.ctx.beginPath(),r.ctx.arc(r.x[t],r.y[t],r.r,0,2*Math.PI,!0),r.ctx.fill(),e.length>6&&(e=e.slice(0,6)+".."),r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(e,r.x[t]-r.ctx.measureText(e).width/2,r.y[t]+parseInt(r.ctx.font,10)/2));else switch(r.whichSide){case 0:ii&&r.ctx.strokeRect(r.x[t]-r.x[0]+V,Y+V,r.w,r.h),r.ctx.fillRect(r.x[t]-r.x[0]+V,Y+V,r.w,r.h),r.ctx.fillStyle="black",i=r.x[t]-r.x[0]+V,n=Y+V+H,r.ctx.save(),r.ctx.translate(i,n),r.ctx.rotate(-Math.PI/2),r.ctx.fillText(r.savedPinName[t],Y,4*K/5),r.ctx.restore();break;case 1:ii&&r.ctx.strokeRect(Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[t],Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V+4*K/5);break;case 2:ii&&r.ctx.strokeRect(r.x[t]-r.x[r.oneSidePinNumber-1]+V,V,r.w,r.h),r.ctx.fillRect(r.x[t]-r.x[r.oneSidePinNumber-1]+V,V,r.w,r.h),r.ctx.fillStyle="black",i=r.x[t]-r.x[r.oneSidePinNumber-1]+V,n=V+H,r.ctx.save(),r.ctx.translate(i,n),r.ctx.rotate(-Math.PI/2),r.ctx.textAlign="end",r.ctx.fillText(r.savedPinName[t],H,4*K/5),r.ctx.restore();break;case 3:ii&&r.ctx.strokeRect(Y+V,r.y[t]-r.y[0]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[t]-r.y[0]+V,r.w,r.h),r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[t],Y+V,r.y[t]-r.y[0]+4*K/5+V)}r.lastPinIndex=-1,ge.removeContext($("#"+r.inner+"_tooltip_pin")),t=null}},pinClickHandler:function(){var i,n,t,s,a,d,c,f,g=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][r.pin[r.currentPinIndex]-1],_=[],u=0,N=ge.getContext($("#NUC_PinConfiguration_Canvas")[0]),O=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].indexOf(g)+1;if(-1!==r.currentPinIndex&&dt(O))ct();else if(-1!==r.currentPinIndex)if(ln(),"N9H30xxxIIM"!==l&&"N9H31KxxIFC"!==l||-1==g.indexOf("ADC")){if($i(g)){for(parseInt(g.sliceAfterX("."),10),s=ji(g+=":0",parseInt(g.sliceAfterX("."),10)),-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?(a=r.x[r.currentPinIndex]+ce,d=r.y[r.currentPinIndex]+fe+10):(a=r.x[r.currentPinIndex],d=r.y[r.currentPinIndex]),i=0,n=NUTOOL_PIN.g_cfg_gpios[s].f.length;iu&&(u=N.measureText(_[i]).width);for(_.push("Reset"),ze=[],i=0,n=_.length;i100?d+i*ee:d+i*ee/Le*100,f="#6495ED",i!==n-1&&_[i]===we[r.pin[r.currentPinIndex]-1]&&(f=($.inArray(r.pin[r.currentPinIndex],Ye),Ce)),-1!==l.indexOf("KM1M7CF")){p=Math.floor(i/10);ze[i]=on().init(r.pin[r.currentPinIndex],i.toString(),_[i],u,a+r.w+u*p/Le*100+3*ie*p,t-10*p*ee/Le*100,f,!0)}else ze[i]=on().init(r.pin[r.currentPinIndex],i.toString(),_[i],u,a+r.w,t,f,!0);c=(c=i.toString()).replaceSpecialCharacters(),$("#Pin_MultiFunction_Selection_"+c).hover(ze[i].mouseEnter,ze[i].mouseLeave),ze[i].draw()}}}else{switch(parseInt(g.sliceAfterX("."),10),s=ji(g+=":0",parseInt(g.sliceAfterX("."),10)),a=r.x[r.currentPinIndex],d=r.y[r.currentPinIndex],u=60,g.slicePriorToX(":")){case"ADC3":_.push("VSENSE");break;case"ADC4":_.push("YM");break;case"ADC5":_.push("YP");break;case"ADC6":_.push("XM");break;case"ADC7":_.push("XP")}for(_.push("Reset"),ze=[],i=0,n=_.length;i100?d+i*ee:d+i*ee/Le*100,f="#6495ED",i!==n-1&&_[i]===we[r.pin[r.currentPinIndex]-1]&&(f=($.inArray(r.pin[r.currentPinIndex],Ye),Ce)),-1!==l.indexOf("KM1M7CF")){var p=Math.floor(i/10);ze[i]=on().init(r.pin[r.currentPinIndex],i.toString(),_[i],u,a+r.w+u*p/Le*100+3*ie*p,t-10*p*ee/Le*100,f,!0)}else ze[i]=on().init(r.pin[r.currentPinIndex],i.toString(),_[i],u,a+r.w,t,f,!0);c=(c=i.toString()).replaceSpecialCharacters(),$("#Pin_MultiFunction_Selection_"+c).hover(ze[i].mouseEnter,ze[i].mouseLeave),ze[i].draw()}}g=null,_=[],u=null,N=null,t=null,s=null,e=null,a=null,d=null,c=null,f=null}};return r}function ln(){var e,i;for(e=0,i=ze.length;e0&&"Reset"!==i.label&&("MA35D0"===l||"MA35D1"===l||"MA35H0"===l||!$i(i.label))&&"unknown"!==(s=an(i.label,i.pin))){for(e.stage=$("#panel")[0].appendChild(Zi("canvas",i.inner+"_tooltip")),a=s.split("
"),e.w=0,n=0,t=a.length;ne.w&&(e.w=i.ctx.measureText(a[n]).width);for(-1!==o.indexOf("SOP")||-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?i.pin>v/2?e.stage.setAttribute("style","z-index:2; position:absolute; left:"+(i.positionX-e.w-3*ie-ne)+"px; top:"+i.positionY+"px;"):e.stage.setAttribute("style","z-index:2; position:absolute; left:"+(i.positionX+i.w+3*ie+ne)+"px; top:"+i.positionY+"px;"):i.pin>y/2&&i.pin<=y+D+w/2?e.stage.setAttribute("style","z-index:2; position:absolute; left:"+(i.positionX-e.w-3*ie-ne)+"px; top:"+i.positionY+"px;"):e.stage.setAttribute("style","z-index:2; position:absolute; left:"+(i.positionX+i.w+3*ie+ne)+"px; top:"+i.positionY+"px;"),e.stage.setAttribute("width",e.w+3*ie),e.stage.setAttribute("height",i.h*a.length),L||e.stage.setAttribute("innerText",s),e.ctx=ge.getContext(e.stage),e.ctx.font=i.ctx.font,e.ctx.strokeStyle="#000000",e.ctx.lineWidth=2,e.ctx.strokeRect(0,0,e.w+3*ie,i.h*a.length),e.ctx.fillStyle="#FFF6C0",e.ctx.fillRect(ne,ne,e.w+3*ie-2*ne,i.h*a.length-2*ne),e.ctx.fillStyle="#000000",n=0,t=a.length;n

'+r+'

').dialog({modal:!1,resizable:!1,title:t,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#noticeForMultipleSelectionsDialog").dialog("destroy")},buttons:[{text:l,click:function(){e(),$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy")}},{text:o,click:function(){ln(),$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy")}}]}));t=null,r=null,l=null,o=null}((function(){sn(r,i.pin,i.label)}),i.label,nn(a))):sn(Ri(t.slicePriorToX("_")),i.pin,i.label),s=null,a=null}t=null}};return i}function sn(e,i,n){var t,r,l,o,s=$("#moduleTree"),a=we[i-1]+"_Pin"+i,d=[];if(a=a.replaceSpecialCharacters(),s.jstree("uncheck_node",$("#"+a)),!$("#"+a).hasClass("jstree-unchecked")){if(l=Ri(a.slicePriorToX("_")),(o=[])[0]=i,Oi(a,l,o),void 0!==He[l]){for(t=0,r=He[l].length;tNote:"),s=!1,-1!==r.indexOf("@")&&(l=l.slice(l.indexOf("@")+1,l.indexOf(":")),s=!0),!(0!==r.indexOf(e+":")&&0!==r.indexOf(e+"@")||s&&l!==NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][i-1])){o=!0;break}return n=null,t=null,r=o?r.slice(r.indexOf(":")+1):"unknown"}function dn(){je=[],ye=[],Ge=[],Re=[],De=[],we=[],ve=[],Ye=[],void 0!==Ri.specialModuleNames&&delete Ri.specialModuleNames,si(),ln(),$("#panel").unbind("mouseenter mouseleave"),ge.removeContext($("#NUC_PinConfiguration_Canvas")),ge.removeContext($("#NUC_PinConfiguration_Canvas_Lining")),$("#mfpTree").jstree("destroy"),$("#supportedModules").jstree("destroy"),$("#moduleTree").jstree("destroy"),$("#mfpTree").remove(),$("#supportedModules").remove(),$("#moduleTree").remove(),$("div").remove(".tooltip")}function cn(){var e,i,n=$("#MCUselect"),r={},s=[],a=!1;for(n.children().length>0&&n.children().remove(),e=0,i=NUTOOL_PIN.g_cfg_chips.length;e=0;r-=1)d[r]&&null!==d[r].getAttribute(a)&&(d[r].getAttribute(a)===e||d[r].getAttribute(a)===c)&&d[r].parentNode.removeChild(d[r]);for(d[0].parentNode.appendChild(l),"undefined"!=typeof NUTOOL_PER&&"js"===n&&(e="PinConfigure/"+e,i="PinConfigure/"+i),"PeripheralConfigure/"!==i&&(o=un(i,n),"function"==typeof t&&(o.onload=function(){t()})),!L&&window.console&&window.console.log("In replacejscssfile, oldfilename:"+e+" / newfilename:"+i),r=d.length;r>=0;r-=1)d[r]&&null!==d[r].getAttribute(a)&&(d[r].getAttribute(a)===e||d[r].getAttribute(a)===i)&&d[r].parentNode.removeChild(d[r]);d[0].parentNode.appendChild(o)}function On(){$("#conflictDialog").dialog("isOpen")&&$("#conflictDialog").dialog("destroy"),$("#adjustedModulesDialog").dialog("isOpen")&&$("#adjustedModulesDialog").dialog("destroy"),$("#warningForSavingDialog").dialog("isOpen")&&$("#warningForSavingDialog").dialog("destroy"),$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy"),$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy"),$("#generateCodeDialog").dialog("isOpen")&&$("#generateCodeDialog").dialog("destroy"),$("#printReportDialog").dialog("isOpen")&&$("#printReportDialog").dialog("destroy"),$("#runAnotherToolDialog").dialog("isOpen")&&$("#runAnotherToolDialog").dialog("destroy"),$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy"),$("#languageDialog").dialog("isOpen")&&$("#languageDialog").dialog("destroy")}function pn(){var e,i,n,t,r,l,o=ge.getContext($("#NUC_PinConfiguration_Canvas")[0]),s=0;"Simplified Chinese"===Ne?(n="被用户配置",t="悬停工具提示",r="滑鼠焦点",l="非可配置的","双击用户定义",o.font="12px 新細明體"):"Traditional Chinese"===Ne?(n="被使用者配置",t="懸停工具提示",r="滑鼠焦點",l="非可配置的","雙擊用戶定義",o.font="12px 新細明體"):(n="Configured by User",t="Tooltip on Hover",r="Focused by Mouse",l="Not Configurable","Dblclicked for UserDefined",o.font=B),o.strokeStyle="black",e=ce-Pe-H-Me,i=fe-Te-(s+=1)*(K+Ie),o.strokeRect(e,i,H,K),o.fillStyle=Ce,o.fillRect(e,i,H,K),o.fillStyle="black",o.fillText(n,e+H+3,i+4*K/5),e=ce-Pe-H-Me,i=fe-Te-(s+=1)*(K+Ie),o.strokeRect(e,i,H,K),o.fillStyle=me,o.fillRect(e,i,H,K),o.fillStyle="black",o.fillText(t,e+H+3,i+4*K/5),e=ce-Pe-H-Me,i=fe-Te-(s+=1)*(K+Ie),o.strokeRect(e,i,H,K),o.fillStyle=Ue,o.fillRect(e,i,H,K),o.fillStyle="black",o.fillText(r,e+H+3,i+4*K/5),e=ce-Pe-H-Me,i=fe-Te-(s+=1)*(K+Ie),o.strokeRect(e,i,H,K),o.fillStyle=be,o.fillRect(e,i,H,K),o.fillStyle="black",o.fillText(l,e+H+3,i+4*K/5)}function hn(e,i,n){var t,r,o,s,a,d;for(i=i.restorePinTreeNodeName().restoreSpecialCharacters(),d=(a=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e])+":0",t=0,o=NUTOOL_PIN.g_cfg_gpios.length;t>>0:0}}break}break}-1!==l.indexOf("KM1M4BF5")&&(0!=we.filter((function(e){return/DBG_SWDD/.test(e)})).length||0!=we.filter((function(e){return/DBG_SWDCLK/.test(e)})).length?Ge.SELSWD=1:Ge.SELSWD=0),t=null,r=null,o=null,s=null,a=null,d=null}function xn(){vi(),"none"===$("#mfpTree").css("display")?$("#moduleTree").height(ae-$("#supportedModules").height()):($("#mfpTree").height(se),$("#moduleTree").height(ae-$("#ChipType").height()-$("#MCU").height()-se-6-$("#supportedModules").height())),ai(),function(){var e,i,n,t,r=[];for(e=0,i=(r=Qi(we)).length;eae/3?ae/3:18*Qi(Ge).length+20,$("#panel").width(le-G-8),$("#panel").height(window.innerHeight-R-8-45),"none"===$("#mfpTree").css("display")?$("#moduleTree").height(ae-$("#supportedModules").height()-45):($("#mfpTree").height(se),$("#moduleTree").height(ae-$("#ChipType").height()-$("#MCU").height()-se-6-$("#supportedModules").height()-45)),Le=100,Pn(),recordedDialogSize=null}function Mn(){for(var e,i,n,t,r,l,o,s=[],a=0;ye.length>0&&a<1e3;)for(a+=1,e=parseInt(ye[0].slicePriorToX(":"),10),i=ve[e-1],r=-1,l=0,o=De[e-1];r!==l;)r=i.indexOf(o),l=i.lastIndexOf(o),n=Ri((t=(t=i.slice(r).slicePriorToX("/")+"_Pin"+e).replaceSpecialCharacters()).slicePriorToX("_")),s[0]=e,Oi(t,n,s),$("#"+t).removeClass("jstree-checked"),$("#"+t).addClass("jstree-unchecked"),$("#"+n+"_Root").removeClass("jstree-undetermined"),$("#"+n+"_Root").removeClass("jstree-checked"),$("#"+n+"_Root").addClass("jstree-unchecked"),i=i.slice(r+1);Vi(),$("#moduleTree").find("li").each((function(e,i){$("#"+$(i).attr("id")+" >a").css("color","black")})),$("#moduleTree").jstree("close_all"),ye=[],s=[],He=[],We=[],e=null,i=null,n=null,t=null,r=null,l=null,o=null,a=null}function In(e){var i,n,t,r,l,o,s,a,d,c,f,g,_,u,N,O,p,h,x,P,T,M,I,C,m,U=[],b="",L=[],k=!0;if(0!==NUTOOL_PIN.g_cfg_shareBits.length){for(void 0===(d=localStorage.getItem("UIlanguage"))||null==d?(M=" or ",I=" should be ",C=".",m="(configure it again)"):"Simplified Chinese"===d?(M="或",I="应为",C="。",m="(再次配置它)"):"Traditional Chinese"===d?(M="或",I="應為",C="。",m="(再次配置它)"):(M=" or ",I=" should be ",C=".",m="(configure it again)"),i=0,l=NUTOOL_PIN.g_cfg_shareBits.length;i>>0,P=x.slicePriorToX("["),f+=((Ge[P]&c)>>>T)*Math.pow(2,t-1);for(N=we[_],g=0,p=ji(u,parseInt(u.sliceAfterX("."),10)),t=1,s=NUTOOL_PIN.g_cfg_gpios[p].f.length;t>>0,P=x.slicePriorToX("["),Ge[P]&c))for(c=1<>>0,r=1,a=NUTOOL_PIN.g_cfg_gpios[p].f.length;r"}}}k||e("shareBit",b)}return void 0!==Xe.USB&&-1!==(h=we.join()).indexOf("USB_D+")&&-1!==h.indexOf("USB_D-")&&-1===h.indexOf("USB_OTG_ID")&&(k=!1,e("USB_OTG_ID",b)),k}function Cn(e,i){var n,t,r,l=localStorage.getItem("UIlanguage");if("shareBit"===e)void 0===l||null==l?(n="Shared Bits Error",t="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.

"+i+"
Unless they are all fixed, the operations of saving configuration, generating code and printing report will not be permitted.",r="Confirm"):"Simplified Chinese"===l?(n="共享位元错误",t="一些寄存器位元可能被复数个多功能给设置。这些位元称之为共享位元。下面共享位元与多功能组成的对应关系会是不正确的。

"+i+"
除非它们都被修正,否则存档丶产生程式码及印出报告这些操作将不被允许。",r="确定"):"Traditional Chinese"===l?(n="共享位元錯誤",t="一些暫存器位元可能被複數個多功能給設置。這些位元稱之為共享位元。下面共享位元與多功能組成的對應關係會是不正確的。

"+i+"
除非它們都被修正,否則存檔、產生程式碼及印出報告這些操作將不被允許。",r="確定"):(n="Shared Bits Error",t="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.

"+i+"
Unless they are all fixed, the operations of saving configuration, generating code and printing report will not be permitted.",r="Confirm");else{if("USB_OTG_ID"!==e)return;void 0===l||null==l?(n="Incorrect USB Settings",t="USB_OTG_ID must be configured when enabling USB.",r="Confirm"):"Simplified Chinese"===l?(n="不正确的USB设置",t="当USB开启时,USB_OTG_ID必须被设置。",r="确定"):"Traditional Chinese"===l?(n="不正確的USB設置",t="當USB開啟時,USB_OTG_ID必須被設置。",r="確定"):(n="Incorrect USB Settings",t="USB_OTG_ID must be configured when enabling USB.",r="Confirm")}On(),$('

'+t+'

').dialog({modal:!1,resizable:!1,title:n,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#showPinErrorDialog").dialog("destroy")},buttons:[{text:r,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy")}}]}),n=null,t=null,r=null,l=null}function mn(e,i){var n,t,r,l,o=localStorage.getItem("UIlanguage");if("shareBit"===e)void 0===o||null==o?(n="Shared Bit Error",t="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.

"+i+"
If you still want to close the application, please press Close. But all the configuration will be restored to the default.If you want to fix them, please press Fix.",r="Close",l="Fix"):"Simplified Chinese"===o?(n="共享位元错误",t="一些寄存器位元可能被复数个多功能给设置。这些位元称之为共享位元。下面共享位元与多功能组成的对应关系会是不正确的。

"+i+"
若你仍想要关掉应用程式,请按'关闭'。但所有设置将会回复到初始值。若你想要修正他们,请按'修正'。",r="关闭",l="修正"):"Traditional Chinese"===o?(n="共享位元錯誤",t="一些暫存器位元可能被複數個多功能給設置。這些位元稱之為共享位元。下面共享位元與多功能組成的對應關係會是不正確的。

"+i+"
若你仍想要關掉應用程式,請按'關閉'。但所有設置將會回復到初始值。若你想要修正他們,請按'修正'。",r="關閉",l="修正"):(n="Shared Bit Error",t="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.

"+i+"
If you still want to close the application, please press Close. But all the configuration will be restored to the default.If you want to fix them, please press Fix.",r="Close",l="Fix");else{if("USB_OTG_ID"!==e)return;void 0===o||null==o?(n="Incorrect USB Settings",t="USB_OTG_ID must be configured when enabling USB.",r="Close",l="Fix"):"Simplified Chinese"===o?(n="不正确的USB设置",t="当USB开启时,USB_OTG_ID必须被设置。",r="关闭",l="修正"):"Traditional Chinese"===o?(n="不正確的USB設置",t="當USB開啟時,USB_OTG_ID必須被設置。",r="關閉",l="修正"):(n="Incorrect USB Settings",t="USB_OTG_ID must be configured when enabling USB.",r="Close",l="Fix")}On(),$('

'+t+'

').dialog({modal:!1,resizable:!1,title:n,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#showPinErrorDialog").dialog("destroy")},buttons:[{text:r,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy"),Mn(),Di(),window.external.closeFromJS()}},{text:l,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy")}}]}),n=null,t=null,r=null,o=null}function Un(e){var i,n,t,r,l,o,s=!0,a=[];if($("#rootTree_Pin").is(":visible")){for(i=0,n=(a=Qi(Ge)).length;iWould you like to save it?",l="Yes",o="No"),On(),$('

'+r+'

').dialog({modal:!0,draggable:!1,resizable:!1,title:t,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#warningForSavingDialog").dialog("destroy")},buttons:[{text:l,click:function(){if(In(Cn))try{external.saveConfigFromJS("NUC_BROWSE_PROJECT_PATH")}catch(e){}e(),$("#warningForSavingDialog").dialog("isOpen")&&$("#warningForSavingDialog").dialog("destroy")}},{text:o,click:function(){e(),wn(),$("#warningForSavingDialog").dialog("isOpen")&&$("#warningForSavingDialog").dialog("destroy")}}]}),t=null,r=null,l=null,o=null),s=null,a=[]}}function bn(e){var i,n,t,r,l,o,s,a,d="",c=localStorage.getItem("UIlanguage");for(void 0===c||null==c?(i="Adjustment of the Conflict",n="Some modules have been adjusted. The others unable to adjust have been removed. Here is the list:
",t=" Pin",r="",l="from",s="Undo",a="Confirm"):"Simplified Chinese"===c?(i="冲突的调整",n="一些模组已被调整,其它无法调整的已被移除。列表如下:
",t="第",r="脚位",l="从",o="已移除",s="复原",a="确定"):"Traditional Chinese"===c?(i="衝突的調整",n="一些模組已被調整,其它無法調整的已被移除。列表如下:
",t="第",r="腳位",l="從",o="已移除",s="復原",a="確定"):(i="Adjustment of the Conflict",n="Some modules have been adjusted. The others unable to adjust have been removed. Here is the list:
",t=" Pin",r="",l="from",o=" has been removed",s="Undo",a="Confirm");-1!==e.indexOf(";");)d=e.sliceAfterX("/").slicePriorToX(";"),-1!==e.slicePriorToX(";").indexOf("removed")?(d="",e.slicePriorToX(":")!==we[parseInt(e.sliceAfterX(":").slicePriorToX("/"),10)-1]&&(n+=""+tn(e.slicePriorToX(":"))+":"+t+nn(e.sliceAfterX(":").slicePriorToX("/"))+r+o+"
",n+=tn(we[parseInt(e.sliceAfterX(":").slicePriorToX("/"),10)-1])+":"+t+nn(e.sliceAfterX(":").slicePriorToX("/"))+r+"
")):-1!==e.slicePriorToX(";").indexOf("end")?(d="",n+=tn(e.slicePriorToX(":"))+":"+t+nn(e.sliceAfterX(":").slicePriorToX("/"))+r+"
"):n+=tn(e.slicePriorToX(":"))+":"+t+nn(e.sliceAfterX(":").slicePriorToX("/"))+r+"("+l+t+nn(e.sliceAfterX("/").slicePriorToX(";"))+r+")
",e=e.sliceAfterX(";");""!==d&&(n+=tn(we[parseInt(d,10)-1])+":"+t+nn(d)+r+"
"),On(),$('

'+n+'

').dialog({modal:!1,resizable:!1,title:i,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#adjustedModulesDialog").dialog("destroy")},buttons:[{text:s,click:function(){!function(){var e,i,n=Qi(Ge);for(ni=!0,Be=[],e=0,i=n.length;e '+t+' '+e+' '+r+' '+((p=new Date).getMonth()+1+"/"+p.getDate()+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())+" ",h=o.slicePriorToX("("),O+='
'+s+'
'+a+' '+l+'
'+d+' '+h+'
'+c+' '+NUTOOL_PIN.g_packageNumber+"
",O+="






",O+="
",null!==i&&(-1!==i.indexOf("checkbox_byChipView")&&(O=function(e,i){var n,t,r,l,s,a,d,c,f,g,_,u,N,O,p,h,x,P,T,M=0;if($("#panel")[0].appendChild(Zi("canvas","NUC_ChipView_Canvas")),(r=$("#NUC_ChipView_Canvas")[0]).setAttribute("style","z-index:1; position:absolute; left:0px; top:0px; border: 1px solid white;"),l=30,a=(s=200)+H+Q+de+H+de/4,d=s+H+de+H+s,r.setAttribute("width",a),r.setAttribute("height",d),(c=ge.getContext(r)).scale(.85,.85),f=s+H+Q,g=s+H,-1!==o.indexOf("SOP")){f-=l,c.strokeRect(f,g,de/2,de),c.fillStyle="white",c.fillRect(f,g,de/2,de),c.beginPath(),c.arc(f+10,g+10,5,0,2*Math.PI,!0),c.stroke(),P=1;do{P+=1,c.font=P+"px Arial Black"}while(c.measureText(Oe).widthP&&(T=P,c.font="bold "+T+"px Calibri"),M=T/2+5,c.save(),c.translate(f+de/4-M,g+de/2-c.measureText(_).width/2),c.rotate(Math.PI/2),c.fillText(_,0,0),c.restore(),P=1;do{P+=1,c.font="bold "+P+"px Calibri"}while(c.measureText(NUTOOL_PIN.g_packageNumber).width4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N,O+4*K/5,H,K),N=f+de/2,O=g+de-Z-K-n*(K+z)+4*K/5,p=c.measureText((n+1+v/2).toString()),c.strokeText((n+1+v/2).toString(),N-p.width-q,O),""!==we[n+v/2]&&(x=tn(we[n+v/2]),N=f+de/2+H+J,c.fillText(x,N,O)),N=f+de/2,O=g+de-Z-K-n*(K+z),c.strokeRect(N,O,H,K),c.fillStyle=$e[1].savedPinPadColor[n],c.fillRect(N,O,H,K),!$i(h=(h=ve[n+v/2]).slicePriorToX("/"))&&h.length>4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N,O+4*K/5)}else if(-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")){for(f-=l,c.lineWidth=2,c.strokeRect(f,g,de,de),c.fillStyle="white",c.fillRect(f,g,de,de),c.beginPath(),c.arc(f+10,g+de-10,5,0,2*Math.PI,!0),c.stroke(),c.font=B,c.fillStyle="black",n=0,t=X;n6&&(h=h.slice(0,6)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N-c.measureText(h).width/2,O+parseInt(c.font,10)/2)}else{f-=l,c.strokeRect(f,g,de,de),c.fillStyle="white",c.fillRect(f,g,de,de),c.beginPath(),c.arc(f+10,g+de-10,5,0,2*Math.PI,!0),c.stroke(),P=1;do{P+=1,c.font=P+"px Arial Black"}while(c.measureText(Oe).widthP&&(T=P,c.font="bold "+T+"px Calibri"),M=T/2+10,c.fillText(_,f+de/2-c.measureText(_).width/2,g+de/2+M),P=1;do{P+=1,c.font="bold "+P+"px Calibri"}while(c.measureText(NUTOOL_PIN.g_packageNumber).width4&&(h=h.slice(0,4)+".."),O+=H,c.font=B,c.fillStyle="black",c.save(),c.translate(N,O),c.rotate(-Math.PI/2),c.fillText(h,Y,4*K/5),c.restore();for(u=Math.floor((E-D)/2),n=0,t=D;n4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N,O+4*K/5);for(u=Math.floor((E-w)/2),n=0,t=w;n4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",O+=H,c.save(),c.translate(N,O),c.rotate(-Math.PI/2),c.textAlign="end",c.fillText(h,H,4*K/5),c.restore();for(u=Math.floor((E-F)/2),n=0,t=F;n4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N,O+4*K/5,H,K)}ii||(e+="

"+i+"

",e+='',e+="
",null);return $("#NUC_ChipView_Canvas").remove(),f+=l,n=null,t=null,r=null,l=null,f=null,g=null,s=null,a=null,d=null,c=null,null,_=null,u=null,N=null,O=null,h=null,null,P=null,T=null,M=null,e}(O,f)),-1!==i.indexOf("checkbox_byRegister")&&(O=function(e,i){var n,t,r=[];for(e+='",(r=Qi(Ge)).sort(),n=0,t=r.length;n";return e+="
'+i+"
'+r[n]+' 0x'+zi(Ge[r[n]]).toUpperCase()+"
",n=null,t=null,e}(O,N)),-1!==i.indexOf("checkbox_byPin")&&(O=function(e,i){var n,t=e,r=!0;for(e+='",n=1;n<=v;n+=1)""!==we[n-1]&&(e+='",r=!1);e+="
'+i+"
Pin'+nn(n)+' '+tn(we[n-1])+"
",r&&(e=t);return t=null,r=null,e}(O,g)),-1!==i.indexOf("checkbox_byModule")&&(O=function(e,i){var n,t,r,l,o,s,a,d=e,c=!0,f=[],g=[];for(n=1;n<=v;n+=1)""!==we[n-1]&&(s=n,-1!==(a=o=we[n-1]).indexOf("_")&&(a=a.slicePriorToX("_")),void 0===f[a=Ri(a)]?(f[a]=[],f[a][0]=tn(o)+"(Pin:"+nn(s)+")"):f[a].push(tn(o)+"(Pin:"+nn(s)+")"),c=!1);for(g=Qi(f),e+='",n=0,r=g.length;n";e+="
'+i+"
'+g[n]+' '+f[g[n]][t]+"
",c&&(e=d);return n=null,t=null,r=null,l=null,f=[],g=[],d=null,c=null,o=null,s=null,a=null,e}(O,_)),-1!==i.indexOf("checkbox_byGPIO")&&(O=function(e,i){var n,t,r,l,o,s,a,d,c=e,f=!0,g=[],_=[];for(n=1;n<=v;n+=1)""!==we[n-1]&&(s=n,o=tn(we[n-1]),void 0===g[a=Ri(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1])]?(g[a]=[],g[a][0]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1]+": "+o+"(Pin:"+nn(s)+")"):g[a].push(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1]+": "+o+"(Pin:"+nn(s)+")"),f=!1);for(_=Qi(g).sort(di),e+='",n=0,r=_.length;n";e+="
'+i+"
'+(d=g[_[n]][t]).slicePriorToX(":")+' '+d.sliceAfterX(": ")+"
",f&&(e=c);return n=null,t=null,r=null,l=null,g=[],_=[],c=null,f=null,o=null,s=null,a=null,d=null,e}(O,u))),O+="",O+="",(x=window.open("dummy.htm","",P)).document.open(),x.document.write(O),x.document.close(),x.moveTo(0,0),x.focus(),x.print(),n=null,t=null,r=null,s=null,a=null,d=null,c=null,f=null,g=null,_=null,u=null,N=null,p=null,O=null,h=null,x=null,P=null}function kn(e){for($("#ChipTypeSelect").val(e),l=e,t=null,i=0,max=NUTOOL_PIN.g_cfg_chips.length;i";for(0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(r="GPIO_MD->"),d="",(t=Qi(Ge)).sort(),e=0,i=t.length;e"+Ve[n]+"\r\n");M="LockedPins="+JSON.stringify(Ze)+"\r\n",e=null,i=null,t=[],n=null}function Dn(){var e,i,n,t,r,l,o,s,a,d,c=[];for(N="Pin,Current Multi Function,Group\r\n",e=0,i=1;e\{\}\[\]\\\/]/gi,"_"):NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e],s=null==NUTOOL_PIN.g_cfg_OrCAD[NUTOOL_PIN.g_packageNumberIndex]?"":NUTOOL_PIN.g_cfg_OrCAD[NUTOOL_PIN.g_packageNumberIndex][e],-1===l.indexOf("NC_ToolNotShow")&&(N+=nn(e+1)+","+l+","+s+"\r\n",$i(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e])&&""!==we[e]&&((d={}).id=i,d.pin=nn(e+1),d.pinName=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e],d.pinNumber=e+1,d.description=we[e],void 0!==Ve[we[e]]&&""!==Ve[we[e]].trim()?d.userDefined=Ve[we[e]]:d.userDefined="",i+=1,c.push(d)));for(N+="\r\nPin,Description,Group\r\n",e=0;e","|"],o=!0;for(n=0,t=l.length;n").insertAfter($("#generateCodeDialogMainPart_div")),m=Dn(),_=m.length>10?"282px":"100%",m.length>0?(C=new Tabulator("#reviewReportTable",{height:_,data:m,layout:"fitColumns",columns:[{title:h,field:"pin",headerFilter:!0},{title:x,field:"pinName",headerFilter:!0},{title:P,field:"description",headerFilter:!0},{title:T,field:"userDefined",headerFilter:!0,editor:!0,validator:["regex:^[a-zA-Z0-9 _]+$","maxLength:30"],tooltip:M}],cellEdited:function(e){En(e._cell.row.data.pinNumber,e._cell.row.data.description,e._cell.value)},langs:{Simplified:{headerFilters:{default:"过滤"}},Traditional:{headerFilters:{default:"過濾..."}},English:{headerFilters:{default:"filter..."}}}}),-1!==Ne.indexOf("Simplified")?C.setLocale("Simplified"):-1!==Ne.indexOf("Traditional")?C.setLocale("Traditional"):C.setLocale("English")):0===m.length&&(C=new Tabulator("#reviewReportTable",{height:_,placeholder:I}))},!1!==In(Cn)){if(void 0===U||null==U?(t="Generate Code",r="User Defined Functions",o="Project Name","Please input a folder path for storing the generated code:",s="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",O="Or you can choose a folder from recent projects","Browse",d="Modularize Code",f="Review Report",u="Confirm"):(null==localStorage.getItem("CheckCriteriaPin")&&"No",null==localStorage.getItem("CheckCriteriaModule")&&"No",null==localStorage.getItem("CheckCriteriaGPIO")&&"No",null!=(b=localStorage.getItem("CheckModularizeCode"))&&"No"!==b||(b="No",N=""),null==(L=localStorage.getItem("ProjectName"))&&(L=""),null==localStorage.getItem("ProjectLocation")&&"",null==(k=localStorage.getItem("ProjectLocationHistory"))&&(k=""),"Simplified Chinese"===U?(t="产生程式码",r="用户定义功能",o="工程名称","请输入文件夹路径,用于存放生成的代码:",s="请注意,本软件不能取代技术参考手册或规格书。用户必须参考最新文档以确保正确性。",O="或是您可以从最近的工程中选择一个","浏览",d="模组化代码",f="检阅报告",u="确定"):"Traditional Chinese"===U?(t="產生程式碼",r="用戶定義功能",o="專案名稱","請輸入資料夾路徑,用於存放生成的程式碼:",s="請注意,本軟件不能取代技術參考手冊或規格書。用戶必須參考最新文檔以確保正確性。",O="或是您可以從最近的專案中選擇一個","瀏覽",d="模組化程式碼",f="檢閱報告",u="確定"):(t="Generate Code",r="User Defined Functions",o="Project Name","Please input a folder path for storing the generated code:",s="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",O="Or you can choose a folder from recent projects","Browse",d="Modularize Code",f="Review Report",u="Confirm")),""===L.trim()&&(L="MyProject"),""!==k.trim()){for('
"}0===l.indexOf("M55M1")||-1===["CM1003","ML51","ML5156","ML56","MG51","MG51_32K","MG51_64K","MS51_8K","MS51_8KDB","MS51_16K","MS51_32K","MUG51","N76S003","N76E003"].indexOf(l)&&0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:")?c="checkbox":(d="",c="hidden",N=""),On(),void 0===e?(a='


",a+='
',$('
'+a+"
").dialog({modal:!1,resizable:!1,title:t,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#generateCodeDialog").dialog("destroy")},create:function(e,i){var n=$(this).dialog("widget").find(".ui-dialog-buttonpane");$("html").hasClass("ie10+")?$("
"+d+""+f+"
").prependTo(n):$("
").prependTo(n)},buttons:[{id:"generateCodeDialog_buttonOk",text:u,click:function(){localStorage.setItem("ProjectName",$("#inputText_projectName").val()),$("#checkbox_ModularizeCode").is(":checked")?localStorage.setItem("CheckModularizeCode","Yes"):localStorage.setItem("CheckModularizeCode","No"),$("#generateCodeDialog_buttonOk").button("disable"),""===$("#inputText_projectName").val().trim()&&$("#inputText_projectName").val("MyProject");try{Xn()}catch(e){}$("#generateCodeDialog").dialog("isOpen")?$("#generateCodeDialog").dialog("destroy"):$("#generateCodeDialog_buttonOk").button("enable")}}]})):0===e.indexOf("userDefined")&&(a='
',$('
'+a+"
").dialog({modal:!1,resizable:!1,title:r,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#generateCodeDialog").dialog("destroy")},buttons:[{id:"generateCodeDialog_buttonOk",text:u,click:function(){-1!==e.indexOf("runAnotherTool")?Wn():$("#generateCodeDialog").dialog("isOpen")&&$("#generateCodeDialog").dialog("destroy")}}]}),g()),$("#generateCodeDialogInput").keypress((function(e){if(22===e.which)$("#generateCodeDialogInput").val(window.clipboardData.getData("Text"))})),$("#generateCodeDialogBrowseFolder").click((function(){""===$("#inputText_projectName").val().trim()&&$("#inputText_projectName").val("MyProject");try{Xn()}catch(e){}""!==NUTOOL_PIN.g_pinFunctionString&&-1!==NUTOOL_PIN.g_pinFunctionString.indexOf(":")&&$("#generateCodeDialogInput").val(NUTOOL_PIN.g_pinFunctionString),$("#generateCodeDialog").focus()})),$("#generateCodeDialogSelect").change((function(){"default"!==$("#generateCodeDialogSelect").val()&&($("#generateCodeDialogInput").val($("#generateCodeDialogSelect").val()),$("#generateCodeDialogSelect").val($("#generateCodeDialogSelect option:first-child").val()))})),$("#checkbox_ReviewReport").change((function(){$("#checkbox_ReviewReport").is(":checked")?(g(),$("#generateCodeDialogMainPart_div").hide(),$("#generateCodeDialog_buttonOk").button("disable")):($("#reviewReportTable").remove(),$("#generateCodeDialogMainPart_div").show(),$("#generateCodeDialog_buttonOk").button("enable"))}))}}function Xn(){if("Yes"==localStorage.getItem("CheckCriteriaPin")&&Bn(),"Yes"==localStorage.getItem("CheckCriteriaModule")&&Gn(),"Yes"==localStorage.getItem("CheckCriteriaGPIO")&&Rn(),Ki(),-1==a.indexOf(".h")){Hi();var i=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.c\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\n *\r\n/********************\r\nMCU:${o}\r\n`+(null==O?"":`Pin Configuration:\r\n${O}`)+(null==p?"":`Module Configuration:\r\n${p}`)+(null==h?"":`GPIO Configuration:\r\n${h}`)+"********************/\r\n\r\n"+`${a}\r\n`+`${d}`+`/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,n=new Blob([i],{type:"text/plain;charset=utf-8"});saveAs(n,`${$("#inputText_projectName").val()}.dts`)}if($("#checkbox_ModularizeCode").is(":checked")){Wi();var t=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.c\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\n\r\n/********************\r\nMCU:${o}\r\n`+(null==O?"":`Pin Configuration:\r\n${O}`)+(null==p?"":`Module Configuration:\r\n${p}`)+(null==h?"":`GPIO Configuration:\r\n${h}`)+"********************/\r\n\r\n"+`${a}`+(null==T?"":`\r\n${T}`)+`${d}`+`\r\n\r\n/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,r=new Blob([t],{type:"text/plain;charset=utf-8"});saveAs(r,`${$("#inputText_projectName").val()}.c`);var l=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.h\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\n\r\n#ifndef __${$("#inputText_projectName").val().toUpperCase()}_H__\r\n#define __${$("#inputText_projectName").val().toUpperCase()}_H__\r\n\r\n#ifdef __cplusplus\r\nextern "C"\r\n{\r\n#endif\r\n${c}#ifdef __cplusplus\r\n}\r\n#endif\r\n#endif /*__${$("#inputText_projectName").val().toUpperCase()}_H__*/\r\n\r\n/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,s=new Blob([l],{type:"text/plain;charset=utf-8"});saveAs(s,`${$("#inputText_projectName").val()}.h`)}else{Hi();t=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.c\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\n\r\n/********************\r\nMCU:${o}\r\n`+(null==O?"":`Pin Configuration:\r\n${O}`)+(null==p?"":`Module Configuration:\r\n${p}`)+(null==h?"":`GPIO Configuration:\r\n${h}`)+"********************/\r\n\r\n"+`${a}`+(null==T?"":`\r\n${T}`)+"/*\r\n * @brief This function provides the configured MFP registers\r\n * @param None\r\n * @return None\r\n */\r\nvoid SYS_Init(void)\r\n{\r\n"+`${d}\r\n return;\r\n}\r\n\r\n`+`/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,r=new Blob([t],{type:"text/plain;charset=utf-8"});saveAs(r,`${$("#inputText_projectName").val()}.c`)}yn();var f=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.ncfg\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} config file\r\n *\r\n * @note Please do not modify this file.\r\n * Otherwise, it may not be loaded successfully.\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\nMCU:${o}\r\n${_}${u}${T}${d}${M}/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,g=new Blob([f],{type:"text/plain;charset=utf-8"});saveAs(g,`${$("#inputText_projectName").val()}.ncfg`)}function Bn(e){var i;for(O="",i=1;i<=v;i+=1)""!==we[i-1]&&(O+=void 0!==e&&"primitiveDescription"===e?"Pin"+nn(i)+":"+we[i-1]+"\r\n":"Pin"+nn(i)+":"+tn(we[i-1])+"\r\n");i=null}function Gn(){var e,i,n,t,r,l,o,s=[],a=[];for(e=1;e<=v;e+=1)""!==we[e-1]&&(l=e,-1!==(o=r=we[e-1]).indexOf("_")&&(o=o.slicePriorToX("_")),void 0===s[o=Ri(o)]?(s[o]=[],s[o][0]=tn(r)+"(Pin:"+nn(l)+")"):s[o].push(tn(r)+"(Pin:"+nn(l)+")"));for(p="",e=0,n=(a=Qi(s)).length;e

'+n+'

'+a+'



'):$('

'+n+'


'+a+'



')).dialog({modal:!0,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#printReportDialog").dialog("destroy")},buttons:[{text:d,click:function(){$("#checkbox_byChipView").is(":checked")&&(c="checkbox_byChipView/"),$("#checkbox_byRegister").is(":checked")&&(c+="checkbox_byRegister/"),$("#checkbox_byPin").is(":checked")&&(c+="checkbox_byPin/"),$("#checkbox_byModule").is(":checked")&&(c+="checkbox_byModule/"),$("#checkbox_byGPIO").is(":checked")&&(c+="checkbox_byGPIO/"),Ln($("#inputText_projectName").val(),c),$("#printReportDialog").dialog("isOpen")&&$("#printReportDialog").dialog("destroy")}}]}),null,e=null,null,null,n=null,t=null,l=null,o=null,s=null,d=null,null,f=null,c=null)}function Hn(){if(In(Cn))try{Dn();var i=`/****************************************************************************\r\n * @file ${o}.csv\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} pin descriptions file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\nMCU:${o}\r\n${N}/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,n=new Blob([i],{type:"text/plain;charset=utf-8"});saveAs(n,`${o}.csv`)}catch(e){console.log("saveConfig failed, meg:"+e)}}function Wn(){var i,n,t,r,l,s,a,d,c="NuCAD";!1!==In(Cn)&&(d=localStorage.getItem("UIlanguage"),$("#rootTree_Pin").is(":visible")&&(void 0!==NUTOOL_PIN.g_anotherNameForNuCAD&&""!==NUTOOL_PIN.g_anotherNameForNuCAD&&(c=NUTOOL_PIN.g_anotherNameForNuCAD),void 0===d||null==d?(i="Run "+c,n="Select a tool to run.",t="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",s="Use NC pin to present a unconfigured pin",r="User Defined Functions",a="Confirm","Leave"):"Simplified Chinese"===d?(i="执行"+c,n="选择一个工具来执行。",t="请注意,本软件不能取代技术参考手册或规格书。用户必须参考最新文档以确保正确性。",s="使用NC脚位来显示未配置的脚位",r="用户定义功能",a="确定","离开"):"Traditional Chinese"===d?(i="執行"+c,n="選擇一個工具來執行。",t="請注意,本軟件不能取代技術參考手冊或規格書。用戶必須參考最新文檔以確保正確性。",s="使用NC腳位來顯示未配置的腳位",r="用戶定義功能",a="確定","離開"):(i="Run "+c,n="Select a tool to run.",t="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",s="Use NC pins to present unconfigured pins",r="User Defined Functions",a="Confirm","Leave"),On(),l='

'+n+'



"+t+"

",l+='
',$(l).dialog({modal:!1,draggable:!0,resizable:!1,title:i,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#runAnotherToolDialog").dialog("destroy")},create:function(e,i){var n=$(this).dialog("widget").find(".ui-dialog-buttonpane");$("html").hasClass("ie10+")&&$("
").prependTo(n)},buttons:[{id:"runAnotherToolDialog_buttonOk",text:a,click:function(){$("input").each((function(){if("RunAnotherTool"===this.name&&!0===this.checked){var i=!1;$("#checkbox_useNCpin").is(":checked")&&(i=!0),Dn();var n="NuCAD";-1!=NUTOOL_PIN.g_anotherNameForNuCAD.indexOf("CAD")&&(n=NUTOOL_PIN.g_anotherNameForNuCAD);var t=`/****************************************************************************\r\n * @file ${n}.csv\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\nMCU:${o}\r\n${N}`+(i?"UseNCPin\r\n":"")+`/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,r=new Blob([t],{type:"text/plain;charset=utf-8"});saveAs(r,`${n}.csv`),window.electronAPI.send("runNuCAD")}})),$("#runAnotherToolDialog").dialog("isOpen")&&$("#runAnotherToolDialog").dialog("destroy")}}]}),$("#checkbox_ReviewReport").change((function(){$("#checkbox_ReviewReport").is(":checked")&&jn("userDefined_runAnotherTool")}))))}function zn(){ei?xe.readyState?xe.send("q"):Mi("连线尚未稳定,请稍后再试。","連線尚未穩定,請稍後再試。","The connection is not stable. Please try it later."):((xe=new WebSocket("ws://127.0.0.1:5555","openocd-nuvoton-protocol")).onopen=function(){ei=!0,xe.readyState?xe.send("q"):Mi("连线尚未稳定,请稍后再试。","連線尚未穩定,請稍後再試。","The connection is not stable. Please try it later.")},xe.onerror=function(){!1===ei?Mi("请检查NuEclipse是否进入了调试模式。如果没有,PinConfig将无法连接到目标芯片。","請檢查NuEclipse是否進入了調試模式。如果沒有,PinConfig將無法連接到目標晶片。","Please check that NuEclipse has entered the debug mode. If not, PinConfig will not be able to connect to a target chip."):Mi("NuEclipse退出了调试模式。","NuEclipse退出了調試模式。","NuEclipse leaved the debug mode."),ei=!1,xe=null},xe.onmessage=function(e){0===e.data.indexOf("q")?(!function(e){var i;"UNKNOWN"!==(e=e.slice(1)).toUpperCase()&&((i=wi(e))!==l?(oldfilename="NUC_"+l+"_Content.js",newfilename="NUC_"+i+"_Content.js",Nn(oldfilename,newfilename,"js",kn(i))):$n())}(e.data),xe.send(function(){var e,i,n,t="m";for(e=0,i=(n=Qi(NUTOOL_PIN.g_cfg_regDescriptions)).length;e=C+5&&(Le=10*Math.floor(Le/10)-5,Pn())}function Qn(){Un((function(){Mn()})),wn()}function qn(){var e,i,n,t,l,o,s,a,d,c,f,g,_,u,N,O="",p="",h="",x="",P="",T="checked=true",M="checked=true",I="checked=true",C="",m="",U="";N=localStorage.getItem("DisplayTooltip"),u=localStorage.getItem("UIlanguage"),$("#rootTree_Pin").is(":visible")&&(void 0===u||null==u?(e="Settings",i="1. Select one of the following languages displayed in UI.",n="2. Display a tooltip.",t="3. Select the criteria by which the configured information is being cataloged.",l="English",o="Simplified Chinese",s="Traditional Chinese",a="Yes",d="No",O="checked",c="Pin",f="Module",g="GPIO",_="Confirm","Leave"):(null!=(C=localStorage.getItem("CheckCriteriaPin"))&&"No"!=C||(T=""),null!=(m=localStorage.getItem("CheckCriteriaModule"))&&"No"!=m||(M=""),null!=(U=localStorage.getItem("CheckCriteriaGPIO"))&&"No"!=U||(I=""),"Simplified Chinese"===u?(e="设定",i="1. 从下面选取一个语言显示在操作介面上。",n="2. 显示提示框。",t="3. 选择用来分类配置资讯的标准。",l="英文",o="简体中文",s="繁体中文",a="要",d="不要",p="checked",c="脚位",f="模組",g="多工泛用脚位",_="确定","离开"):"Traditional Chinese"===u?(e="設定",i="1. 從下面選取一個語言顯示在操作介面上。",n="2. 顯示提示框。",t="3. 選擇用來分類配置資訊的標準。",l="英文",o="简體中文",s="繁體中文",a="要",d="不要",h="checked",c="腳位",f="模組",g="多工泛用腳位",_="確定","離開"):(e="Settings",i="1. Select one of the following languages displayed in UI.",n="2. Display a tooltip.",t="3. Select the criteria by which the configured information is being cataloged.",l="English",o="Simplified Chinese",s="Traditional Chinese",a="Yes",d="No",O="checked",c="Pin",f="Module",g="GPIO",_="Confirm","Leave")),null==N||"No"==N?P="checked":x="checked",On(),$('

'+i+'




"+n+'



"+t+'



').dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#languageDialog").dialog("destroy")},buttons:[{text:_,click:function(){$("input").each((function(){"UIlanguage"===this.name&&!0===this.checked?(localStorage.setItem("UIlanguage",$(this).val()),Jn()):"DisplayTooltip"===this.name&&!0===this.checked&&(localStorage.setItem("DisplayTooltip",$(this).val()),r="No"!==$(this).val())})),$("#checkbox_byPin").is(":checked")?localStorage.setItem("CheckCriteriaPin","Yes"):localStorage.setItem("CheckCriteriaPin","No"),$("#checkbox_byModule").is(":checked")?localStorage.setItem("CheckCriteriaModule","Yes"):localStorage.setItem("CheckCriteriaModule","No"),$("#checkbox_byGPIO").is(":checked")?localStorage.setItem("CheckCriteriaGPIO","Yes"):localStorage.setItem("CheckCriteriaGPIO","No"),ft(),$("#languageDialog").dialog("isOpen")&&$("#languageDialog").dialog("destroy")}}]}))}function Jn(){var e,i,n,t,r,l,o,s,a;Ui(),"Simplified Chinese"===Ne?(e="芯片系列:",i="型号:",n="MFP寄存器",t="支援模组",r="搜寻..",et("ID_BUTTON_SHOW_REGISTERS","开关选择区域和MFP寄存器树状图"),et("ID_BUTTON_LOAD","读取配置档"),et("ID_BUTTON_SAVE","存放配置档"),et("ID_BUTTON_GENERATE_CODE","产生程式码"),et("ID_BUTTON_CONNECT_TO_TARGET","连线到目标芯片"),et("ID_BUTTON_PRINT_REPORT","印出报告"),et("ID_BUTTON_GENERATE_PIN_DESCRIPTIONS","产生脚位描述报告"),et("ID_BUTTON_RUN_NUCAD","执行NuCAD"),et("ID_BUTTON_SHOW_PIN_DESCRIPTIONS","开关管脚描述"),et("ID_BUTTON_ZOOM_IN","放大"),et("ID_BUTTON_BEST_FIT","最适大小"),et("ID_BUTTON_ZOOM_OUT","缩小"),et("ID_BUTTON_LOCK_PIN","锁定/解锁所有脚位"),et("ID_BUTTON_SHOW_LOCKED_PINS","锁定脚位列表"),et("ID_BUTTON_DISABLE","取消所有已选模组"),et("ID_BUTTON_LANGUAGE","设定"),et("ID_BUTTON_INSTRUCTION","阅读用户手册")):"Traditional Chinese"===Ne?(e="晶片系列:",i="型號:",n="MFP暫存器",t="支援模組",r="搜尋..",et("ID_BUTTON_SHOW_REGISTERS","開關選擇區域和MFP暫存器樹狀圖"),et("ID_BUTTON_LOAD","讀取配置檔"),et("ID_BUTTON_SAVE","存放配置檔"),et("ID_BUTTON_GENERATE_CODE","產生程式碼"),et("ID_BUTTON_CONNECT_TO_TARGET","連線到目標晶片"),et("ID_BUTTON_PRINT_REPORT","印出報告"),et("ID_BUTTON_GENERATE_PIN_DESCRIPTIONS","產生腳位描述報告"),et("ID_BUTTON_RUN_NUCAD","執行NuCAD"),et("ID_BUTTON_SHOW_PIN_DESCRIPTIONS","開關腳位描述"),et("ID_BUTTON_ZOOM_IN","放大"),et("ID_BUTTON_BEST_FIT","最適大小"),et("ID_BUTTON_ZOOM_OUT","縮小"),et("ID_BUTTON_LOCK_PIN","鎖定/解鎖所有腳位"),et("ID_BUTTON_SHOW_LOCKED_PINS","鎖定腳位列表"),et("ID_BUTTON_DISABLE","取消所有已選模組"),et("ID_BUTTON_LANGUAGE","設定"),et("ID_BUTTON_INSTRUCTION","閱讀用戶手冊")):(e="Chip Series:",i="Part No.:",t="Supported Modules",r="Search..",n="MFP Registers",et("ID_BUTTON_SHOW_REGISTERS","Switch Select Field and MFP-Registers TreeView"),et("ID_BUTTON_LOAD","Load Configuration"),et("ID_BUTTON_SAVE","Save Configuration"),et("ID_BUTTON_GENERATE_CODE","Generate Code"),et("ID_BUTTON_CONNECT_TO_TARGET","Connect to Target Chip"),et("ID_BUTTON_PRINT_REPORT","Print Report"),et("ID_BUTTON_GENERATE_PIN_DESCRIPTIONS","Generate Report of Pin Description"),et("ID_BUTTON_RUN_NUCAD","Run NuCAD"),et("ID_BUTTON_SHOW_PIN_DESCRIPTIONS","Switch Pin Description"),et("ID_BUTTON_ZOOM_IN","Zoom In"),et("ID_BUTTON_BEST_FIT","Best Fit"),et("ID_BUTTON_ZOOM_OUT","Zoom Out"),et("ID_BUTTON_LOCK_PIN","Lock/Unlock All the Pins"),et("ID_BUTTON_SHOW_LOCKED_PINS","Show Locked Pins List"),et("ID_BUTTON_DISABLE","Disable All Checked Modules"),et("ID_BUTTON_LANGUAGE","Settings"),et("ID_BUTTON_INSTRUCTION","Read User Manual")),$("#ChipType_span").text(e),$("#MCU_span").text(i),$("#mfpTree").jstree("rename_node",$("#mfp_tree"),n),$("#supportedModules_span").text(t),$("#searchInput_Pin")[0].setAttribute("style","font-family:Times Arial; position:absolute; left:"+($("#supportedModules_span").width()+10)+"px; width:"+(G-16-$("#supportedModules_span").width()-10)+"px; height: 16px;"),$("#searchInput_Pin").val(r),$("#searchInput_Pin").change((function(){xi(this.value)})),a=5,$("html").hasClass("ie10+")||(a=4),l=ge.getContext($("#NUC_PinConfiguration_Canvas")[0]),o=ce-Pe-H-Me-3,s=fe-Te-a*(K+Ie),l.fillStyle="#FFFFFF",l.fillRect(o,s,Pe+H+Me,Te+4*(K+Ie)),l=null,o=null,s=null,pn(),e=null,i=null,n=null,t=null,r=null}function et(e,i,n){null!=n&&null!=n||(n="top"),null!=document.querySelector(`#${e}`)&&null!=document.querySelector(`#${e}`)&&document.querySelector(`#${e}`)._tippy&&document.querySelector(`#${e}`)._tippy.destroy(),tippy(`#${e}`,{content:`${i}`,placement:`${n}`})}function it(){var e="NuCAD";void 0!==NUTOOL_PIN.g_anotherNameForNuCAD&&""!==NUTOOL_PIN.g_anotherNameForNuCAD&&(e=NUTOOL_PIN.g_anotherNameForNuCAD),Mi("您的电脑不能执行"+e+"因为它不在Content资料夹里面。","您的電腦不能執行"+e+"因為它不在Content資料夾裡面。","Your PC is incapable of executing "+e+" because it does not exist in the Content folder.")}function nt(e,i,n){var t,r,o,s,a,d,c,f,g,_,u,N,O=-1,p=!1;for(t=0,o=NUTOOL_PIN.g_cfg_gpios.length;t0&&(void 0===NUTOOL_PIN.g_cfg_gpioMatrix||0===NUTOOL_PIN.g_cfg_gpioMatrix.length)){for(p=!1,4,15,-1!==e.indexOf(".")&&(f=e.slice(0,e.indexOf(".")),g=e.slice(e.indexOf(".")+1)),"M451HD"===l||"M451LD"===l||"M4521"===l||"NUC121AE"===l||"M0564"===l||"M05641"===l||0===l.indexOf("NUC126")||"M071QV"===l||"NUC029xGE"===l||"NUC029KGE"===l||"NUC400"===l||0===l.indexOf("M46")||0===l.indexOf("M47")||"M433"===l||"M480MD"===l||"M480LD"===l||"AX58200"===l||0===l.indexOf("M25")||"NDA102"===l||"M261"===l||0===l.indexOf("M235")||0===l.indexOf("M029")||0===l.indexOf("M030")||0===l.indexOf("M031")||0===l.indexOf("M091")||"NANO103"===l||"NUC505"===l||"NUC123AE"===l||"MA35D0"===l||"MA35D1"===l||"MA35H0"===l||0===l.indexOf("M2003")||0===l.indexOf("N9H30")||0===l.indexOf("N9H31")||0===l.indexOf("NUC97")||0===l.indexOf("NUC98")||0===l.indexOf("M2A23")?f=parseInt(g)<8?"G"+f+"_MFPL":"G"+f+"_MFPH":"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l?parseInt(g)<8?f+="_L_MFP":f+="_H_MFP":"NM1500"===l||"M0519"===l||"M051DN_DE"===l||"M051BN"===l||"M051AN"===l||"M058S"===l||"MINI51AN"===l||"MINI51DE"===l||"MINI55"===l||"MINI58"===l||"NUC029AE"===l||"NUC029TAE"===l||"NUC029AN"===l||"NM1200"===l?f+="_MFP":0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003")?f+="MF76543210":f=0===l.indexOf("KM1M7")||0===l.indexOf("KM1M4")||0===l.indexOf("KM1M0")?"IO"+f+"MD":"G"+f+"_MFP",r=0,s=n.length;r>>0))>>>0>>>_>>>0===O){p=!0;break}}else if(O>0&&NUTOOL_PIN.g_cfg_gpioMatrix.length>0){for(t=0,o=NUTOOL_PIN.g_cfg_gpioMatrix.length;t=0;){for(f=NUTOOL_PIN.g_cfg_gpioMatrix[t].f[c+1],u=1<<(_=parseInt(f.slice(f.indexOf("[")+1,f.indexOf("]")),10))>>>0,g=f.slice(0,f.indexOf("[")),p=!1,r=0,s=n.length;r2))break;if(!((O-=Math.pow(2,c))>0))break;c=Math.floor(Math.log(O)/Math.log(2))}break}}else 0===O&&(p=!0);return p}function tt(){var e;for(i=0,max=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].length;i-1!=i.indexOf(e)))[0].slicePriorToX("-")}function at(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function dt(e){for(var i=0;i

'+i+"").dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#lockedWarningDialog").dialog("destroy")},buttons:[{text:n,click:function(){$("#lockedWarningDialog").dialog("isOpen")&&$("#lockedWarningDialog").dialog("destroy")}}]})}function ft(){var e;at()||localStorage.getItem("CheckPrivacyBannerDismiss")||(e="Simplified Chinese"===Ne?"本网站使用cookie作为与网站交互时识别流览器之用,浏览本网站即表示您同意本网站对cookie的使用":"Traditional Chinese"===Ne?"本網站使用cookie作為與網站互動時識別瀏覽器之用,瀏覽本網站即表示您同意本網站對cookie的使用":"This website uses cookies to ensure you get the best experience on our website.",$("#ID_PRIVACY_BANNER_TEXT").text(e),$("#ID_PRIVACY_BANNER_BUTTON").on("click",(function(){$("#ID_PRIVACY_BANNER_DIV").hide(),localStorage.setItem("CheckPrivacyBannerDismiss",!0)})),$("#ID_PRIVACY_BANNER_DIV").show())}window.onload=function(){rt(),$("#ID_BUTTON_SHOW_REGISTERS").on("click",(function(){An()})),$("#ID_BUTTON_LOAD").on("click",(function(){$("#rootTree_Pin").is(":visible")&&Un((function(){$("#loadConfiguration").trigger("click")}))})),$("#loadConfiguration").on("change",lt),$("#ID_BUTTON_SAVE").on("click",(function(){vn()})),$("#ID_BUTTON_GENERATE_CODE").on("click",(function(){jn()})),$("#ID_BUTTON_CONNECT_TO_TARGET").on("click",(function(){at()?window.electronAPI.send("connect"):async function(){var e;null!=b&&(await navigator.usb.getDevices().then((i=>{i.forEach((i=>{e=i}))})).catch((i=>{console.log(i),e=void 0})),null==e&&(e=await navigator.usb.requestDevice({filters:[{vendorId:1046}]}).catch((i=>{console.log(i),e=void 0}))),null!=e&&b.postMessage({action:"connect"}))}()})),$("#ID_BUTTON_PRINT_REPORT").on("click",(function(){Kn()})),$("#ID_BUTTON_GENERATE_PIN_DESCRIPTIONS").on("click",(function(){Hn()})),$("#ID_BUTTON_RUN_NUCAD").on("click",(function(){Wn()})),$("#ID_BUTTON_SHOW_PIN_DESCRIPTIONS").on("click",(function(){Fn()})),$("#ID_BUTTON_ZOOM_IN").on("click",(function(){Yn()})),$("#ID_BUTTON_BEST_FIT").on("click",(function(){Vn()})),$("#ID_BUTTON_ZOOM_OUT").on("click",(function(){Zn()})),$("#ID_BUTTON_LOCK_PIN").on("click",(function(){!function(){var e=[];for(i=0,max=ye.length;i{var i=e.slicePriorToX(":"),n=e.sliceAfterX(":"),t=n+"_Root";$("#moduleTree").jstree("open_node",$("#"+t)),$("#"+t).find("li").each((function(e,t){var r=$(t).attr("id");-1!=r.indexOf(i)&&-1!=r.indexOf(n)&&-1==Ze.indexOf(r)&&(Ze.push(r),document.querySelector(`#${r}`).style.background="orange")}))}))):($("#ID_IMAGE_LOCK_PIN").attr("src","./src/res/unlock.png"),Ze.forEach((e=>{var i=e.sliceAfterX(":")+"_Root";$("#moduleTree").jstree("open_node",$("#"+i)),document.querySelector(`#${e}`).style.background="transparent"})),Ze=[])}()})),$("#ID_BUTTON_SHOW_LOCKED_PINS").on("click",(function(){var e,i,n,t;n="",t=localStorage.getItem("UIlanguage"),On(),Ze.sort(),Ze.forEach((e=>{var i=e.sliceAfterX("Pin");n=n+e.slicePriorToX("_Pin")+"(Pin: "+i+")
"})),void 0===t||null==t?(e="Locked Pins",i="Confirm"):"Simplified Chinese"===t?(e="已鎖定的腳位",i="确定"):"Traditional Chinese"===t?(e="已锁定的脚位",i="確定"):(e="Locked Pins",i="Confirm"),$('

'+n+"

").dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#lockedPinsDialog").dialog("destroy")},buttons:[{text:i,click:function(){$("#lockedPinsDialog").dialog("isOpen")&&$("#lockedPinsDialog").dialog("destroy")}}]})})),$("#ID_BUTTON_DISABLE").on("click",(function(){Qn()})),$("#ID_BUTTON_LANGUAGE").on("click",(function(){qn()})),$("#ID_BUTTON_INSTRUCTION").on("click",(function(){window.open("https://www.nuvoton.com/resource-download.jsp?tp_GUID=UG1320220401093634")})),setTimeout(Jn,100),$.ajax({url:"./src/PartNumID.cpp",async:!1}).responseText.split(/\r\n|\n/).filter((function(e){return new RegExp(".*[^/]{.*0x.*[PROJ].*}").test(e)})).forEach((function(e){if(-1==e.indexOf("not release")){let i=e.substring(e.indexOf('"')+1,e.lastIndexOf('"')),n=e.substring(e.indexOf("0x"),e.lastIndexOf("PROJ")-2),t=e.substring(e.indexOf("PROJ"),e.lastIndexOf("}"));oi.push(i+"-"+n+"-"+t)}})),ft(),at()?(window.electronAPI.onConnected(((e,i)=>{console.log("electronAPI: onConnected"),ri=!0,window.electronAPI.send("getPIDValue")})),window.electronAPI.onReturnPIDValue(((e,n)=>{if(console.log("electronAPI: onReturnPIDValue"),U=st(n),console.log("connected device: "+U),-1!=o.toUpperCase().indexOf(U.toUpperCase())){var t=[],r=[];for(r=Qi(NUTOOL_PIN.g_cfg_regDescriptions),i=0;i{console.log("electronAPI: onReturnRegisterValue"),ot(i,n)})),window.electronAPI.onDisconnect(((e,i)=>{console.log("electronAPI: onDisconnect"),ri=!1})),window.electronAPI.onWarning(((e,i)=>{console.warn(i)})),window.electronAPI.onRunNuCADError(((e,i)=>{it()}))):window.Worker&&((b=new Worker("./src/worker/webusb.worker-bundle.js")).onmessage=async function(e){let n=e.data.action,t=e.data;if("connected"==n)console.log("worker: connected"),ri=!0,b.postMessage({action:"getPIDValue"});else if("returnPIDValue"==n)if(console.log("worker: returnPIDValue"),U=st(t.value),console.log("connected device: "+U),-1!=o.toUpperCase().indexOf(U.toUpperCase())){var r=[],l=[];for(l=Qi(NUTOOL_PIN.g_cfg_regDescriptions),i=0;i',$(n).dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#connectToTargetDialog").dialog("destroy")},buttons:[{text:t,click:function(){$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy")}}]}),e=null,null,null,i=null,n=null,t=null,null,r=null):ei?zn():$("#rootTree_Pin").is(":visible")&&(void 0===r||null==r?(e="Connect to Target Chip",i="When connecting to a target chip, what you have configured is going to be gone. To continue, click the Confirm button.",t="Confirm","Leave"):"Simplified Chinese"===r?(e="连线到目标芯片",i="当连接到目标芯片时,您配置的内容将会消失。 若要继续,请点击确定按钮。",t="确定","离开"):"Traditional Chinese"===r?(e="連線到目標晶片",i="當連接到目標晶片時,您配置的內容將會消失。 若要繼續,請點擊確定按鈕。",t="確定","離開"):(e="Connect to Target Chip",i="When connecting to a target chip, what you have configured is going to be gone. To continue, click the Confirm button.",t="Confirm","Leave"),On(),n='

'+i+'

',$(n).dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#connectToTargetDialog").dialog("destroy")},buttons:[{text:t,click:function(){zn(),$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy")}}]}),e=null,null,null,i=null,n=null,t=null,null,r=null)},printReport:Kn,generatePinDescriptions:Hn,runAnotherTool:Wn,get_pin_descriptions:Dn,showPinDescriptions:Fn,zoomIn:Yn,bestFit:Vn,zoomOut:Zn,uncheckAllNodes:Qn,uncheckAllNodes_core:Mn,settings:qn,changeUIlanguage:Jn,executePDFfail:function(){Mi("您的电脑不能执行PDF档。请安装必要的软件来支援它。","您的電腦不能執行PDF檔。請安裝必要的軟件來支援它。","Your PC is incapable of executing the PDF files. Please install a necessary software to support it")},executeNuCADfail:it,get_gpio_MFPsNames:yn,recordConfig:wn,g_readConfigFilePath:"",g_readConfigFileContentText:"",g_pinFunctionString:"",g_bFunctionalTesting:!1,g_bModuleTreeLoaded:!1,g_horizontalIndexArray:["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","T","U","V","W","Y"],g_toolbarRemovedIndices:"4",g_chipType_default:"",g_partNumber_package_default:"",g_chipSilkScreenPrint_default:"",g_briefName_default:"",g_copyrightCompanyName_default:"",g_anotherNameForNuCAD:"",g_bSwitchSpeech8bitCPUMode:!1}}(); \ No newline at end of file +var NUTOOL_PIN={};!function(){const e="V1.33.0004";var n,t,r,l,o,s,a,d,c,f,g,_,u,N,O,p,h,x,P,T,M,I,C,U,b,L=!0,A=!1,S=!1,v=0,y=0,D=0,w=0,F=0,E=0,j=0,X=0,B="12px Arial",G=275,R=48,K=16,H=40,W=30,z=0,Y=1,V=10,Z=24,Q=25,q=3,J=3,ee=20,ie=7,ne=1,te=0,re=0,le=0,oe=0,se=0,ae=0,de=0,ce=0,fe=0,ge={getContext:null,removeContext:null,addEvent:null},_e=0,ue="",Ne="",Oe="Nuvoton",pe="NuMicro",he=" Nuvoton Technology Corp.",xe=null,Pe=20,Te=20,Me=130,Ie=5,Ce="#FAB92D",me="#41AF88",Ue="#FC517E",be="#9365C9",Le=100,ke=100,$e=[],Ae=[],Se=[],ve=[],ye=[],De=[],we=[],Fe=[],Ee=[],je=[],Xe=[],Be=[],Ge=[],Re=[],Ke=[],He=[],We=[],ze=[],Ye=[],Ve={},Ze=[],Qe=["CM1003","ISD9100","ISD9300","KM1M0DF","KM1M0GF","KM1M4BF","KM1M7AF","KM1M7BF","KM1M7CF","M029G","M030G","M031","M051","M0518","M0519","M0564","M071","M091","M0A21","M2003","M2351","M251","M261","M2A23","M2L31","M433","M451","M460","M466","M471","M479","M480","M55M1","M55M1H2ES","MA35D0","MA35D1","MA35H0","MINI51","MG51","ML51","MS51","MUG51","N76S003","N76E003","N9H30xxxIEC","N9H30xxxIIM","N9H31KxxIFC","NANO100","NDA102","NM1120","NM1200","NM1500","NUC029","NUC100","NUC200","NUC400","NUC505","NUC970","NUC980"],qe=["M466","N9H30xxxIIM"],Je=!1,ei=!1,ii=!1,ni=!0,ti=!0,ri=!1,li=!1,oi=[];function si(){var e,i;for(e=0,i=$e.length;ec&&(f=c,l.font="bold "+f+"px Calibri"),_=f/2+5,l.save(),l.translate(ce+de/4-_,fe+de/2-l.measureText(a).width/2),l.rotate(Math.PI/2),l.fillText(a,0,0),l.restore(),v>12){c=1;do{c+=1,l.font="bold "+c+"px Calibri"}while(l.measureText(NUTOOL_PIN.g_packageNumber).widthc&&(f=c,l.font="bold "+f+"px Calibri"),_=v<100?f/2+v/2:f/2+v/10,l.fillText(a,ce+de/2-l.measureText(a).width/2,fe+de/2+_),a=o.slicePriorToX(")").sliceAfterX("(")+"(TOP VIEW)",c=1;do{c+=1,l.font="bold "+c+"px Calibri"}while(l.measureText(a).widthc&&(f=c,l.font="bold "+f+"px Calibri"),_=f/2+v/8,l.fillText(a,ce+de/2-l.measureText(a).width/2,fe+de/2+_),c=1;do{c+=1,l.font="bold "+c+"px Calibri"}while(l.measureText(NUTOOL_PIN.g_packageNumber).widtht?1:-1;for(n=n.match(a),t=t.match(a),o=n.length>t.length?t.length:n.length;sl?1:-1;return n.length-t.length}function ci(){var e,i,n,t,a,d,c,f,g,_,u,N,O,p,h,x,T,M,I,C,m,U,b=[],k=[],A=[],v=[],y=[],D=[],w=[],F=[],E=$("#rootTree_Pin"),j=$("#moduleTree"),X=$("#ChipType_span"),B=$("#MCU_span");if((b=Qi(je)).sort(di),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode)for(var K=0;K0&&-1!==$.inArray(i,A))){if(c=k[i],g=!1,0===NUTOOL_PIN.g_cfg_shareBits.length&&i!==k.length-1)for(n=i+1,d=k.length;n"),(T=$("#supportedModules_span")).css("vertical-align","text-top"),T.css("font-size","16px"),T.css("font-weight","bold"),x.append(""),M=$("#searchInput_Pin"),E[0].appendChild(Zi("div","moduleTree","Loading...")),j=$("#moduleTree"),X.text(m),X.css("font-size","16px"),X.css("font-weight","bold"),B.text(U),B.css("font-size","16px"),B.css("font-weight","bold"),C=null,m=null,U=null),x[0].setAttribute("style","background-color: #FFFFFF; border-right: 16px solid #F2F2F2; float:left; width:"+(G-16)+"px; height: 22px;"),T.text(I),M[0].setAttribute("style","font-family:Times Arial; position:absolute; left:"+(T.width()+10)+"px; width:"+(G-16-T.width()-10)+"px; height: 16px;"),E.hide(),M.change((function(){xi(this.value)})),j[0].setAttribute("style","background-color: #FFFFFF; overflow-y: scroll; float:left; width:"+G+"px; height: "+(ae-se-6-$("#supportedModules").height())+"px; font-size:16px;"),-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?ii?j.hover((function(){$(this).css("background-color","#FAFAFA"),Ji(),$("#pin_side_0").show(),$("#NUC_PinConfiguration_Canvas_Lining").hide()}),(function(){$(this).css("background-color","#FFFFFF"),$("#pin_side_0").hide(),$("#NUC_PinConfiguration_Canvas_Lining").show()})):j.hover((function(){$(this).css("background-color","#FAFAFA"),Ji(),$("#pin_side_0").css("opacity","0.8"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","0")}),(function(){$(this).css("background-color","#FFFFFF"),$("#pin_side_0").css("opacity","0.1"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","1")})):j.hover((function(){$(this).css("background-color","#FAFAFA"),Ji()}),(function(){$(this).css("background-color","#FFFFFF")})),j.jstree({themes:{theme:"classic",icons:!1},json_data:{data:y,progressive_render:!0},search:{case_insensitive:!0},core:{animation:0,html_titles:!0},plugins:["themes","json_data","types","search","checkbox","ui"]}).bind("hover_node.jstree",(function(e,i){var n,t=i.rslt.obj.attr("id"),l=!1,o="",s=-1;r&&NUTOOL_PIN.g_cfg_gpiosDescriptions.length>0&&-1===t.indexOf("_dot")&&(-1!==t.indexOf("_Pin")&&(n=t.restorePinTreeNodeName(),s=parseInt(t.sliceAfterX("_Pin"),10),l=!0),l&&(o=an(n=n.restorePinTreeNodeName().restoreSpecialCharacters(),s),$i(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1])&&(o="("+NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1]+") "+o),"unknown"!==o&&et(t,o,"right"))),n=null,l=null,o=null,s=null})).bind("check_node.jstree",(function(e,i){var n,t,r,l=i.rslt.obj.attr("id"),o=l.restorePinTreeNodeName();try{r=i.inst._get_parent(i.rslt.obj).attr("id")}catch(e){}if(function(e){for(var i=!1,n=e.slicePriorToX("_Pin"),t=e.sliceAfterX("_Pin"),r=0;ra").css("color")&&"rgb(255, 0, 0)"!==$("#"+o+" >a").css("color")||-1!==$.inArray(o.sliceAfterX("Pin"),b)||(U.push(o),b.push(o.sliceAfterX("Pin")))):(p=!1,d=0,T.jstree("open_node",$("#"+o)),$("#"+o).removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),$("#"+o).find("li").each((function(e,i){a=$(i).attr("id"),m.push(a),(c=we[parseInt(a.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters())===a.restorePinTreeNodeName()?(p=!0,x=!0):$("#"+a).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),"red"!==$("#"+a+" >a").css("color")&&"rgb(255, 0, 0)"!==$("#"+a+" >a").css("color")||(d+=1),e+1===$("#"+o).find("li").length&&!1===p&&(h=!1,d===$("#"+o).find("li").length&&L.push(o),$("#"+o).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"))})));else if((c=we[parseInt(o.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters())===o.restorePinTreeNodeName()?(p=!0,x=!0):$("#"+o).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),"red"!==$("#"+o+" >a").css("color")&&"rgb(255, 0, 0)"!==$("#"+o+" >a").css("color")||(d+=1),t+1===$("#"+e).find("li").length&&!1===p){if(h=!1,d===$("#"+e).find("li").length)for(i=0,n=$("#"+e).find("li").length;i0)for(i=0,n=L.length;i0&&(He[l].length=0),T.jstree("uncheck_node",$("#"+e));else if(U.length>0){for(O="",i=0;i":"Traditional Chinese"===Ne?"第"+nn(c)+"腳位已被"+tn(we[parseInt(c,10)-1])+"使用。
":"Pin"+nn(c)+" has been asserted by "+tn(we[parseInt(c,10)-1])+".
";"Simplified Chinese"===Ne?(f="冲突发生",g="預期的"+l+"和别的模组冲突。请问你要调整旧的且改设置到现在的模组吗?",_="要",u="不要"):"Traditional Chinese"===Ne?(f="衝突發生",g="預期的"+l+"和別的模組衝突。請問你要調整舊的且改設置到現在的模組嗎?",_="要",u="不要"):(f="Conflict Occurred",g="The expected "+l+" conflicts with other modules. Would you like to adjust the old modules and configure to the current one?",_="Yes",u="No"),On(),N=$('

'+g+"
"+O+'

').dialog({modal:!1,resizable:!1,title:f,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#conflictDialog").dialog("destroy")},buttons:[{text:_,click:function(){for(C=Qi(Ge),Ke=[],i=0,n=C.length;ia").css("background-color","#B0C4DE"));if(void 0===r&&void 0!==He[c]&&He[c].length>0){for(ti=!0,e=0,t=He[c].length;ea").css("color","red"),$("#"+d+" >a").css("color","red")):(void 0===He[r]||void 0!==He[r]&&0===He[r].length)&&-1!==(a=$.inArray(l,We))&&($("#"+l+" >a").css("color","blue"),We.splice(a,1))):(j.jstree("open_node",$("#"+l)),$("#"+l).find("li").each((function(e,i){o=$(i).attr("id"),r=Ri(o.slicePriorToX("_")),s=De[parseInt(o.sliceAfterX("_Pin"),10)-1],-1===o.indexOf(s)&&!$i(s)||-1!==o.indexOf(s)&&!1===$("#"+o).hasClass("jstree-checked")?($("#"+o+" >a").css("color","red"),$("#"+l+" >a").css("color","red"),$("#"+d+" >a").css("color","red")):(void 0===He[r]||void 0!==He[r]&&0===He[r].length)&&-1!==(e=$.inArray(o,We))&&($("#"+o+" >a").css("color","blue"),We.splice(e,1))})),j.jstree("close_node",$("#"+l)))})),Ze.forEach((e=>{-1!=e.indexOf(d.slicePriorToX("_"))&&(document.querySelector(`#${e}`).style.background="DarkGray")})),d=null,c=null,r=null,l=null,o=null,s=null,a=null})).bind("select_node.jstree",(function(e,i){var n,t,r=i.rslt.obj.attr("id");j.jstree("open_node",$("#"+r)),$("#"+r).find("li").each((function(e,i){-1!==(n=$(i).attr("id")).indexOf("_Pin")?j.jstree("open_node",$("#"+n)):(j.jstree("open_node",$("#"+n)),$("#"+n).find("li").each((function(e,i){t=$(i).attr("id"),j.jstree("open_node",$("#"+t))})))})),r=null,n=null,t=null})).bind("dblclick.jstree",(function(e){})).bind("loaded.jstree",(function(){for(e=0,t=F.length;ea").css("background-color","#B0C4DE");ni?(ti=!0,function(){var e,i,n,t,r,o,a,d,c,f,g,_,u,N,O,p,h,x,P,T,M,I,C,m,U,b,L,k=[],A=0,S=[],v=[],y=s,D=1;if(k=Qi(Be),"NUC400"===l||"M451HD"===l||"M451LD"===l||"M4521"===l||"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l||"NUC505"===l||"NUC121AE"===l||"NUC123AE"===l||"NANO103"===l||0===l.indexOf("M47")||"M433"===l||"M480MD"===l||"M480LD"===l||"AX58200"===l||0===l.indexOf("M25")||"M261"===l||0===l.indexOf("M235")||0===l.indexOf("M029")||0===l.indexOf("M030")||0===l.indexOf("M031")||0===l.indexOf("M091")||"M0564"===l||"M05641"===l||0===l.indexOf("NUC126")||"M071QV"===l||"NUC029xGE"===l||"NUC029KGE"===l||"MINI57"===l||"NM1120"===l||"NDA102"===l||"MA35D0"===l||"MA35D1"===l||"MA35H0"===l||0===l.indexOf("M2003")||0===l.indexOf("N9H30")||0===l.indexOf("N9H31")||0===l.indexOf("NUC97")||0===l.indexOf("NUC98")||0===l.indexOf("M2A23")){for(e=0,r=k.length;e>>0))>>>0)>>>4*i>>>0)&&(N=d?i:i+8,u="P"+k[e].slice(k[e].indexOf("P")+1,k[e].indexOf("P")+2)+"."+N.toString(),-1!==(_=$.inArray(u,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex])))){for(x=ji(k[e],N),n=1,o=NUTOOL_PIN.g_cfg_gpios[x].f.length;n>>0))break}}else if("M0A21"===l||0===l.indexOf("M46")||0===l.indexOf("M2L31")||0===l.indexOf("M55M1")){for(e=0,r=k.length;e>>0))>>>0)>>>8*i>>>0)&&(N=i+4*m,u="P"+k[e].slice(k[e].indexOf("P")+1,k[e].indexOf("P")+2)+"."+N.toString(),-1!==(_=$.inArray(u,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex])))){for(x=ji(k[e],N),n=1,o=NUTOOL_PIN.g_cfg_gpios[x].f.length;n>>0))break}}else if(0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("KM1M7")||0===l.indexOf("KM1M4")||0===l.indexOf("KM1M0")||0===l.indexOf("CM1003")){for(e=0,r=k.length;e>>0))>>>0)>>>4*i>>>0)&&(N=i,u="P"+k[e].slice(k[e].indexOf("P")+1,k[e].indexOf("P")+2)+"."+N.toString(),-1!==(_=$.inArray(u,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex])))){for(x=ji(k[e],N),n=1,o=NUTOOL_PIN.g_cfg_gpios[x].f.length;n>>0))break}}else if("ISD9100"===l||"ISD9300"===l){for(e=0,r=k.length;e>>0))>>>0)>>>2*i>>>0)&&(N=i,u="P"+k[e].slice(k[e].indexOf("P")+1,k[e].indexOf("P")+2)+"."+N.toString(),-1!==(_=$.inArray(u,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex])))){for(x=ji(k[e],N),n=1,o=NUTOOL_PIN.g_cfg_gpios[x].f.length;n>>0))break}}else if("NUC200AE"===l||"NUC2201"===l||"M071R1S"===l||"NUC029xEE"===l||"NUC100AN_BN"===l||"NUC100CN"===l||"NUC100DN"===l){for(e=0,r=k.length;e>>0))>>>i>>>0)for(p=k[e]+"["+i+"]",n=0,o=NUTOOL_PIN.g_cfg_gpioMatrix.length;n>>0,C=I.slicePriorToX("["),f+=(((A=Be[C])&c)>>>m)*Math.pow(2,t-1),C=I.slicePriorToX(":"),-1===$.inArray(C,NUTOOL_PIN.g_cfg_shareBits)&&(Be[C]=A&~c);for(O="",x=ji(u,parseInt(u.sliceAfterX("."),10)),t=1,a=NUTOOL_PIN.g_cfg_gpios[x].f.length;t>>0))>>>i>>>0)for(p=k[e]+"["+i+"]",n=0,o=NUTOOL_PIN.g_cfg_gpioMatrix.length;n>>0,C=I.slicePriorToX("["),f+=(((A=Be[C])&c)>>>m)*Math.pow(2,t-1),Be[C]=A&~c;for(O="",x=ji(u,parseInt(u.sliceAfterX("."),10)),t=1,a=NUTOOL_PIN.g_cfg_gpios[x].f.length;t30){L=!1;break}if(!L)break;for(-1!==(h=O=(O=y.slice(b-D+1,b)+U).replaceSpecialCharacters()).indexOf("_")&&(h=h.slicePriorToX("_")),h=Ri(h),L=!0,b-=D,D=1;"n"!==y.charAt(b-D);)if(b-(D+=1)<0||D>30){L=!1;break}if(!L)break;g=y.slice(b-D+1).slicePriorToX(":"),g=parseInt(g,10),S[0]=g,ui(O+"_Pin"+(_+1),h,S),void 0===He[h]?(He[h]=[],He[h][0]=O+"_Pin"+g):He[h].push(O+"_Pin"+g),y=y.slice(y.indexOf(U)+1)}for(e=0,r=Fe.length;e",(v=t.indexOf(Number(T[r])))>-1&&t.splice(v,1);else m+="Simplified Chinese"===Ne?"第"+nn(T[r])+"脚位已被"+tn(we[T[r]-1])+"使用。
":"Traditional Chinese"===Ne?"第"+nn(T[r])+"腳位已被"+tn(we[T[r]-1])+"使用。
":"Pin"+nn(T[r])+" has been asserted by "+tn(we[T[r]-1])+".
",x=!0}x&&("Simplified Chinese"===Ne?(d="冲突发生",c="預期的"+n+"和别的模组冲突。请问你要调整旧的且改设置到现在的模组吗?",f="要",g="不要"):"Traditional Chinese"===Ne?(d="衝突發生",c="預期的"+n+"和別的模組衝突。請問你要調整舊的且改設置到現在的模組嗎?",f="要",g="不要"):(d="Conflict Occurred",c="The expected "+n+" conflicts with other modules. Would you like to adjust the old modules and configure to the current one?",f="Yes",g="No"),On(),_=$('

'+c+"
"+m+'

').dialog({modal:!1,resizable:!1,title:d,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#conflictDialog").dialog("destroy")},buttons:[{text:f,click:function(){for(I=Qi(Ge),Ke=[],r=0,o=I.length;r0)U=Ce;else if(0!==Ye.length)for(l=0,a=Ye.length;la").css("color")||"rgb(255, 0, 0)"===$("#"+_+" >a").css("color")||p)$("#"+_).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");else{for(p=!0,(O=[])[0]=parseInt(_.sliceAfterX("Pin"),10),""!==P&&(f=P.slice(P.lastIndexOf("/")+1).slicePriorToX(";"))!==O[0].toString()&&"removed"!==f&&"end"!==f&&(P+=we[parseInt(f,10)-1]+":"+f+"/end;"),P+=_.restorePinTreeNodeName()+":"+O[0],o=0,s=T.length;oa").css("color","blue")}}function C(e,i){if(_=$(i).attr("id"),c=parseInt(_.sliceAfterX("Pin"),10),-1===$.inArray(c,n)&&(h=_i(_,n,0,T)),h)return!1}for(r=0,l=n.length;r0){for(r=0,l=M.length;r0)$("#"+M[r]).find("li").each(I);else for(_=M[r].restorePinTreeNodeName(),o=0,s=Se.length;o0)$("#"+M[r]).find("li").each(C);else for(_=M[r].restorePinTreeNodeName(),o=0,s=Se.length;o0)ue+="Failed: duplicate name occurs. "+l,!L&&window.console&&window.console.log("Failed: duplicate name occurs. "+l);else{for(!L&&window.console&&window.console.log("Duplicate function test passed."),e=0,i=(s=Qi(Ge).sort()).length;e=10)return!1;if(i.push(f),n+=1,p=!1,h=!1,T=[],_=Ri(N.slicePriorToX("_")),u=N+"_Intermediate",$("#"+u).find("li").length>0)$("#"+u).find("li").each((function(e,i){O=$(i).attr("id"),"red"===$("#"+O+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+O+" >a").css("color")||O.sliceAfterX("_Pin")===f.toString()||p?O.sliceAfterX("_Pin")!==f.toString()&&(T.push(O),$("#"+O).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")):(p=!0,(x=[])[0]=parseInt(O.sliceAfterX("Pin"),10),""!==P&&(g=P.slice(P.lastIndexOf("/")+1).slicePriorToX(";"))!==x[0].toString()&&"removed"!==g&&"end"!==g&&(P+=we[parseInt(g,10)-1]+":"+g+"/end;"),P+=O.restorePinTreeNodeName()+":"+x[0]+"/"+f+";",ui(O,_,x),$("#"+O).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),$("#"+O+" >a").css("color","blue"))}));else for(r=0,l=Se.length;r0)$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").each((function(i,n){(O=$(n).attr("id"))===e||!$("#"+O).hasClass("jstree-checked")&&-1===$.inArray(O,t)||(""!==P&&(g=P.slice(P.lastIndexOf("/")+1).slicePriorToX(";"))!==x[0].toString()&&"removed"!==g&&"end"!==g&&(P+=we[parseInt(g,10)-1]+":"+g+"/end;"),P+=e.restorePinTreeNodeName()+":"+x[0]+"/"+O.sliceAfterX("Pin")+";"),O!==e&&$("#"+O).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")}));else for(o=0,s=Se.length;oa").css("color","blue"),0===$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").length){for(a=0,d=We.length;a0){for(r=0;r0)$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").each(M);else for(o=0,s=Se.length;oa").css("color","blue"),0===$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").length){for(a=0,d=We.length;aa").css("color")||"rgb(255, 0, 0)"===$("#"+o+" >a").css("color")||a||(r=o.restorePinTreeNodeName()+"_Intermediate",(c=[])[0]=parseInt(o.sliceAfterX("Pin"),10),ui(o,t,c),s=!0,a=!0),we[parseInt(o.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters()===o.restorePinTreeNodeName()?$("#"+o).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"):$("#"+o).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")}for(s=!1,a=!1,f=[],t=Ri(e.slicePriorToX("_")),$("#"+e).find("li").each((function(e,i){-1!==(l=$(i).attr("id")).indexOf("_Pin")&&-1===$.inArray(l.restorePinTreeNodeName()+"_Intermediate",f)?("red"===$("#"+l+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+l+" >a").css("color")||a||(-1===$.inArray(l,Se)?((c=[])[0]=parseInt(l.sliceAfterX("Pin"),10),ui(l,t,c),s=!0):(s=!1,r=l.restorePinTreeNodeName()+"_Intermediate",d.jstree("open_node",$("#"+r)),$("#"+r).find("li").each((function(e,i){if(o=$(i).attr("id"),we[parseInt(o.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters()===o.restorePinTreeNodeName())return s=!0,!1})),s||((c=[])[0]=parseInt(l.sliceAfterX("Pin"),10),ui(l,t,c)),s=!0,a=!0)),we[parseInt(l.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters()===l.restorePinTreeNodeName()?$("#"+l).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"):$("#"+l).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")):-1!==l.indexOf("_Intermediate")&&f.push(l)})),i=0,n=f.length;i6&&(i=i.slice(0,6)+".."),s.fillText(i,a-s.measureText(i).width/2,d+parseInt(s.font,10)/2)):e=y&&e=y+D&&e=y+D+w&&ea").css("color")||"rgb(255, 0, 0)"===$("#"+$(i).attr("id")+" >a").css("color"))return $("#"+f[t]+" >a").css("color","red"),!1}function u(e,i){if("red"===$("#"+$(i).attr("id")+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+$(i).attr("id")+" >a").css("color"))return $("#"+g[t]+" >a").css("color","red"),!1}if(n)for(;""!==c;)-1!==c.indexOf("/")?(s=c.slicePriorToX("/")+"_Pin"+i,a=c.slicePriorToX("/")+"_Intermediate"):(s=c+"_Pin"+i,a=c+"_Intermediate"),s=s.replaceSpecialCharacters(),a=a.replaceSpecialCharacters(),e=e.replaceSpecialCharacters(),s.restorePinTreeNodeName()!==e.restorePinTreeNodeName()?"red"===$("#"+s+" >a").css("color")&&"rgb(255, 0, 0)"===$("#"+s+" >a").css("color")||($("#"+s+" >a").css("color","red"),$("#"+a+" >a").css("color","red"),-1!==s.indexOf("_")&&$("#"+Ri(s.slicePriorToX("_"))+"_Root >a").css("color","red")):"black"===$("#"+s+" >a").css("color")&&"rgb(0, 0, 0)"===$("#"+s+" >a").css("color")||($("#"+s+" >a").css("color","black"),$("#"+a+" >a").css("color","black"),-1===$.inArray(a,f)&&f.push(a),-1!==s.indexOf("_")&&(d=Ri(s.slicePriorToX("_"))+"_Root",0===$("#"+d).find("li").length&&"red"===$("#"+d+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+d+" >a").css("color")||($("#"+d+" >a").css("color","black"),-1===$.inArray(d,g)&&g.push(d)))),c=-1!==c.indexOf("/")?c.sliceAfterX("/"):"";else for(;""!==c;){if(-1!==c.indexOf("/")?(s=c.slicePriorToX("/")+"_Pin"+i,a=c.slicePriorToX("/")+"_Intermediate"):(s=c+"_Pin"+i,a=c+"_Intermediate"),s=s.replaceSpecialCharacters(),a=a.replaceSpecialCharacters(),s.restorePinTreeNodeName()===we[i-1].replaceSpecialCharacters()||""===we[i-1]){if(("black"!==$("#"+s+" >a").css("color")||"rgb(0, 0, 0)"!==$("#"+s+" >a").css("color"))&&($("#"+s+" >a").css("color","black"),$("#"+a+" >a").css("color","black"),-1===$.inArray(a,f)&&f.push(a),-1!==s.indexOf("_")&&(d=Ri(s.slicePriorToX("_"))+"_Root","red"===$("#"+d+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+d+" >a").css("color"))))if($("#"+d+" >a").css("color","black"),0!==$("#"+d).find("li").length)-1===$.inArray(d,g)&&g.push(d);else for(d=d.restorePinTreeNodeName(),t=0,l=je[d].length;ta").css("color","red");break}}else"red"===$("#"+s+" >a").css("color")&&"rgb(255, 0, 0)"===$("#"+s+" >a").css("color")||($("#"+s+" >a").css("color","red"),$("#"+a+" >a").css("color","red"),-1!==s.indexOf("_")&&$("#"+Ri(s.slicePriorToX("_"))+"_Root >a").css("color","red"));c=-1!==c.indexOf("/")?c.sliceAfterX("/"):""}for(t=0,l=f.length;t15||0===e.toLowerCase().indexOf("pin:")&&4===e.length)return c.jstree("close_all"),c.jstree("clear_search"),void(""!==e?(Ui(),e.length<2?Mi("最小输入字元为两个。请更换至更合适的搜寻。","最小輸入字元為兩個。請更換至更合適的搜尋。","The minimum inputting characters are two. Please change to a proper search."):Mi("预期的搜寻将花费很多时间。请更换至更合适的搜寻。","預期的搜尋將花費很多時間。請更換至更合適的搜尋。","The expected search will take much time. Please change to a proper search."),f.val("")):f.val(""));try{if(-1!==e.toLowerCase().indexOf("pin:")){if(-1!==(e=e.slice(e.toLowerCase().indexOf("pin:")+4)).indexOf(")")&&(e=e.slicePriorToX(")")),parseInt(e,10)>v)return;for(a=ve[parseInt(e,10)-1],N=[],i=0,n=a.length;i";if(""!==e&&void 0!==e){for(0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(a="GPIO_MD->"),Fe=[];-1!==e.indexOf("GPIOpin:");)t=(i=e.slice(e.indexOf("GPIOpin:"))).slice(i.indexOf("GPIOpin:")+8,i.indexOf("\r\n")),$i(o=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][parseInt(t,10)])&&(void 0===Fe?Fe[0]=parseInt(t,10):Fe.push(parseInt(t,10))),e=i.slice(1);for(Ve={};-1!==e.indexOf("UserDefined:");)o=(t=(n=e.slice(e.indexOf("UserDefined:"))).slice(n.indexOf("UserDefined:")+12,n.indexOf("\r\n"))).sliceAfterX("=>"),t=t.slicePriorToX("=>"),Ve[t]=o,e=n.slice(1);for(e=s;-1!==e.indexOf(a);)l=(r=e.sliceAfterX(a)).slice(r.indexOf(" = ")+3,r.indexOf("\r\n")),isNaN(parseInt(l.slice(2),16))?Mi("寄存器的值"+r.slicePriorToX("\r")+"存在一些错误,请更正它并重载配置档。","暫存器的值"+r.slicePriorToX("\r")+"存在一些錯誤,請更正它並重載配置檔。","The register value of "+r.slicePriorToX("\r")+" in the config file is incorrect.Please correct it and re-load the config file again."):Be[r.slicePriorToX(" = ")]=parseInt(l.slice(2),16),e=r.slice(1);for(e=s;-1!==e.indexOf("ALT_MFP");)l=(r=e.slice(e.indexOf("ALT_MFP"))).slice(r.indexOf(" = ")+3,r.indexOf("\r\n")),isNaN(parseInt(l.slice(2),16))?Mi("寄存器的值"+r.slicePriorToX("\r")+"存在一些错误,请更正它并重载配置档。","暫存器的值"+r.slicePriorToX("\r")+"存在一些錯誤,請更正它並重載配置檔。","The register value of "+r.slicePriorToX("\r")+" in the config file is incorrect.Please correct it and re-load the config file again."):Be[r.slicePriorToX(" = ")]=parseInt(l.slice(2),16),e=r.slice(1)}i=null,t=null,r=null,l=null,s=null,o=null}(s)):(Mi("从配置档读出的封装名称 "+r+" 不正确","從配置檔讀出的封裝名稱 "+r+" 不正確。","The package name "+r+" read from the config file is incorrect."),""!==_&&""!==g&&Nn(_,g,"js"),o="undefined"==typeof NUTOOL_PER?void 0===NUTOOL_PIN.g_partNumber_package_default||""===NUTOOL_PIN.g_partNumber_package_default?"NUC472VI8AE(LQFP100)":NUTOOL_PIN.g_partNumber_package_default:"M251EB2AE(TSSOP28)");NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&tt();return e=null,i=null,a=null,N=[],O=[],n=null,r=null,t=null,g=null,_=null,d=null,null,u=null,bMismatchedRedundant=null,c=null,f}()||(e=!1),NUTOOL_PIN.decidepackageNumber(),Ci(),e}function Ci(){return 33===(v=parseInt(NUTOOL_PIN.g_packageNumber.slice(NUTOOL_PIN.g_packageNumber.indexOf(NUTOOL_PIN.g_packageNumber.match(/\d/))),10))&&(v=32),-1!==NUTOOL_PIN.g_packageNumberIndex.toLowerCase().indexOf("pin:")?(y=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("D","R"),10),D=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("R","U"),10),w=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("U","L"),10),F=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("L",")"),10)):(y=v/4,D=v/4,w=v/4,F=v/4),E=Math.max(y,D,w,F),this}function mi(){return C=30,z=2,n=.95,I="\f",ge.getContext=function(e){return e.getContext("2d")},ge.removeContext=function(e){e.remove()},ge.addEvent=function(e,i,n){e.addEventListener(i,n,!1)},$("html").addClass("ie10+"),"undefined"==typeof NUTOOL_PER&&(Nn("","/tabulator/promise-polyfill.js","js"),Nn("","/tabulator/js/tabulator.js","js"),Nn("","/tabulator/css/tabulator.css","css")),!1}function Ui(){var e=localStorage.getItem("UIlanguage");Ne=void 0===e||null==e?"English":e,e=null}function bi(){var e=localStorage.getItem("DisplayTooltip");r=void 0===e||null==e||"No"!==e,e=null}function Li(){$(document).keypress((function(e){e.which}))}function ki(e){return!isNaN(parseFloat(e))&&isFinite(e)}function $i(e){return!(void 0===e||"P"!==e.slice(0,1)||"."!==e.slice(2,3)||!ki(e.sliceAfterX(".")))||(!(!NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode||void 0===e||"B"!==e.slice(0,1)||"P"!==e.slice(1,2)||!ki(e.sliceAfterX(".")))||("N9H30xxxIIM"===l||"N9H31KxxIFC"===l)&&void 0!==e&&-1!=e.indexOf("ADC"))}function Ai(e){return!!(NUTOOL_PIN.g_cfg_wppin&&NUTOOL_PIN.g_cfg_wppin[NUTOOL_PIN.g_packageNumberIndex]&&NUTOOL_PIN.g_cfg_wppin[NUTOOL_PIN.g_packageNumberIndex].includes(e))}function Si(e){return!!(NUTOOL_PIN.g_cfg_WPPin.length>0&&NUTOOL_PIN.g_cfg_WPPin.includes(e))}function vi(){var e,i,n,t,r,l,s,a,d,c,f,g,_,u,N,O=0,p=0,h=0,x=0;if(0===$("#NUC_PinConfiguration_Canvas").length&&$("#panel")[0].appendChild(Zi("canvas","NUC_PinConfiguration_Canvas")),s=$("#NUC_PinConfiguration_Canvas")[0],(a=ge.getContext(s)).font=B,N=a.measureText("012345678901234567890123456789").width,z=ii?0:2,Z=20,-1!==o.indexOf("SOP")){for(e=0,t=v/2;e=0;n-=1)f+=NUTOOL_PIN.g_cfg_gpios[i].f[n].slicePriorToX(":"),0!==n&&(f+="/");break}for(""===f&&(f=d),ve[e]=f,_="",c=(d=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e+v/2])+":0",i=0,r=NUTOOL_PIN.g_cfg_gpios.length;iO&&(O=a.measureText(f).width),a.measureText(_).width>h&&(h=a.measureText(_).width))}de=v/2*(K+z)-z+2*Z,Je?(O=0;n-=1)f+=NUTOOL_PIN.g_cfg_gpios[i].f[n].slicePriorToX(":"),0!==n&&(f+="/");break}""===f&&(f=d),ve[e]=f}de=Math.sqrt(v)*(2*W+z)-z+2*Z,ce=N+H+Q,fe=N+H+Q}else{for(e=0,t=y;e=0;n-=1)g+=NUTOOL_PIN.g_cfg_gpios[i].f[n].slicePriorToX(":"),0!==n&&(g+="/");break}""===g&&(g=d),ve[e]=g,Je&&a.measureText(g).width>p&&(p=a.measureText(g).width)}for(e=0,t=D;eh&&(h=a.measureText(_).width)}for(e=0,t=w;ex&&(x=a.measureText(u).width)}for(e=0,t=F;e=0;n-=1)f+=NUTOOL_PIN.g_cfg_gpios[i].f[n].slicePriorToX(":"),0!==n&&(f+="/");break}""===f&&(f=d),ve[e+y+D+w]=f,Je&&a.measureText(f).width>O&&(O=a.measureText(f).width)}de=E*(K+z)-z+2*Z,Je?(O>>0,t=(Ge[d="G"+n+"_MFPL"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0):(g=15<<4*(a-8)>>>0,t=(Ge[c="G"+n+"_MFPH"]&~g)>>>0,i=i<<4*(a-8)>>>0,Ge[c]=(t|i)>>>0);else if("M0A21"===l||0===l.indexOf("M46")||0===l.indexOf("M2L31")||0===l.indexOf("M55M1"))n=e.slice(0,2),g=255<<8*((a=parseInt(e.slice(3),10))-4*(s=Math.floor(a/4)))>>>0,t=(Ge[d="G"+n+"_MFP"+s]&~g)>>>0,i=i<<8*(a-4*s)>>>0,Ge[d]=(t|i)>>>0;else if("MINI57"===l||"NM1120"===l)n=e.slice(0,2),g=15<<4*(a=parseInt(e.slice(3),10))>>>0,t=(Ge[d="G"+n+"_MFP"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0;else if("NANO100AN"===l||"NANO100BN"===l||"NANO112"===l)n=e.slice(0,2),(a=parseInt(e.slice(3),10))<8&&(f=!0),f?(g=15<<4*a>>>0,t=(Ge[d=n+"_L_MFP"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0):(g=15<<4*(a-8)>>>0,t=(Ge[c=n+"_H_MFP"]&~g)>>>0,i=i<<4*(a-8)>>>0,Ge[c]=(t|i)>>>0);else if(0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003"))n=e.slice(0,2),g=15<<4*(a=parseInt(e.slice(3),10))>>>0,t=(Ge[d=n+"MF76543210"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0;else if(0===l.indexOf("KM1M7")||0===l.indexOf("KM1M4")||0===l.indexOf("KM1M0"))n=e.slice(0,2),g=15<<4*(a=parseInt(e.slice(3),10))>>>0,t=(Ge[d="IO"+n+"MD"]&~g)>>>0,i=i<<4*a>>>0,Ge[d]=(t|i)>>>0;else if("ISD9100"===l||"ISD9300"===l)n=e.slice(0,2),g=3<<2*(a=parseInt(e.slice(3),10))>>>0,t=(Ge[d="G"+n+"_MFP"]&~g)>>>0,i=i<<2*a>>>0,Ge[d]=(t|i)>>>0;else if("MINI55"===l||"NM1200"===l){for(_=0,r=NUTOOL_PIN.g_cfg_gpioMatrix.length;_>>0,N=0,i&1<>>0),t=(Ge[n]&~g)>>>0,Ge[n]=(t|N)>>>0;break}"P3.2"===e&&1===i&&(Ge.PIN_SEL=0)}else for(_=0,r=NUTOOL_PIN.g_cfg_gpioMatrix.length;_>>0,N=0,i&1<>>0),t=(Ge[n]&~g)>>>0,Ge[n]=(t|N)>>>0;break}n=null,g=null,t=null,_=null,u=null,r=null,o=null,s=null,N=null,O=null,a=null,d=null,c=null,f=null}function ji(e,i){var n,t,r,o=-1;return NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(t=parseInt(e.sliceAfterX("BP").slicePriorToX("."))+65,r=String.fromCharCode(t),e=e.replace(/BP[0-9]{1,}\./,"P"+r+".")),e=e.replace("GP","P"),"M0519"===l||"M051DN_DE"===l||"M051BN"===l||"M051AN"===l||"M058S"===l||"MINI51AN"===l||"MINI51DE"===l||"MINI55"===l||"MINI58"===l||"NUC029AE"===l||"NUC029TAE"===l||"NUC029AN"===l||"NM1200"===l||"NM1500"===l?n=8*parseInt(e.slice(1,2),16)+parseInt(e.slice(3),10):0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003")?n=8*parseInt(e.slice(1,2),16)+i:0===l.indexOf("KM1M7")||0===l.indexOf("KM1M4")||0===l.indexOf("KM1M0")?(o=e.indexOf("P"),n=8*parseInt(e.slice(o+1,o+2),16)+i):n="MINI57"===l||"NM1120"===l||"M0A21"===l?8*(e.slice(1,2).charCodeAt(0)-"A".charCodeAt(0))+i:16*(e.slice(1,2).charCodeAt(0)-"A".charCodeAt(0))+i,n}function Xi(e){var i,n,t,r,o,s,a,d,c,f,g,_,u,N,O,p,h,x,P,T=[],M=$("#moduleTree");if(s=a=parseInt(e.toLowerCase().slice(e.indexOf("0x")+2),16),"NUC400"===l||"M451HD"===l||"M451LD"===l||"M4521"===l||"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l||"NUC505"===l||"NUC121AE"===l||"NUC123AE"===l||"NANO103"===l||0===l.indexOf("M47")||"M433"===l||"M480MD"===l||"M480LD"===l||"AX58200"===l||0===l.indexOf("M25")||"M261"===l||0===l.indexOf("M235")||0===l.indexOf("M029")||0===l.indexOf("M030")||0===l.indexOf("M031")||0===l.indexOf("M091")||"M0564"===l||"M05641"===l||0===l.indexOf("NUC126")||"M071QV"===l||"NUC029xGE"===l||"NUC029KGE"===l||"MINI57"===l||"NM1120"===l||"NDA102"===l||"MA35D0"===l||"MA35D1"===l||"MA35H0"===l||0===l.indexOf("M2003")||0===l.indexOf("N9H30")||0===l.indexOf("N9H31")||0===l.indexOf("NUC97")||0===l.indexOf("NUC98")||0===l.indexOf("M2A23"))for(P=-1===e.indexOf("MFPH")&&-1===e.indexOf("_H_MFP"),i=0;i<8;i+=1){if(c=(a&(d=15<<4*i>>>0))>>>4*i>>>0)if(f=P?i:i+8,g="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+f.toString(),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(code=g.charCodeAt(1)-65,g=g.replace(/P[A-Z]\./,"BP"+code+".")),-1!==(u=$.inArray(g,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))){for(O="",N=ji(e,f),n=1,r=NUTOOL_PIN.g_cfg_gpios[N].f.length;n>>0))>>>8*i>>>0)if(f=i+4*x,g="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+f.toString(),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(code=g.charCodeAt(1)-65,g=g.replace(/P[A-Z]\./,"BP"+code+".")),-1!==(u=$.inArray(g,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))){for(O="",N=ji(e,f),n=1,r=NUTOOL_PIN.g_cfg_gpios[N].f.length;n>>0))>>>4*i>>>0)if(f=i,g="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+f.toString(),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(code=g.charCodeAt(1)-65,g=g.replace(/P[A-Z]\./,"BP"+code+".")),-1!==(u=$.inArray(g,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))){for(O="",N=ji(e,f),n=1,r=NUTOOL_PIN.g_cfg_gpios[N].f.length;n>>0))>>>2*i>>>0)if(f=i,g="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+f.toString(),NUTOOL_PIN.g_bSwitchSpeech8bitCPUMode&&(code=g.charCodeAt(1)-65,g=g.replace(/P[A-Z]\./,"BP"+code+".")),-1!==(u=$.inArray(g,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))){for(N=ji(e,f),O="",n=1,r=NUTOOL_PIN.g_cfg_gpios[N].f.length;n>>0))>>>i>>>0){for(p=e.slice(e.indexOf("P"),e.indexOf(":"))+"["+i+"]",n=0,r=NUTOOL_PIN.g_cfg_gpioMatrix.length;n>>0,h.slicePriorToX("["),c+=((a&d)>>>x)*Math.pow(2,t-1),a&=~d;for(N=8*parseInt(g.slice(1,2),16)+parseInt(g.slice(3),10),O="",t=1,o=NUTOOL_PIN.g_cfg_gpios[N].f.length;t>>0);continue}_=Ri(_=O),O=O.replaceSpecialCharacters(),-1!==_.indexOf("_")&&(_=_.slicePriorToX("_")),T[0]=u+1,M.jstree("check_node",$("#"+O+"_Pin"+(u+1))),$("#"+O+"_Pin"+(u+1)).hasClass("jstree-checked")||(M.jstree("open_node",$("#"+_+"_Root")),M.jstree("open_node",$("#"+O+"_Intermediate")),M.jstree("check_node",$("#"+O+"_Pin"+(u+1))));break}}-1===u&&(s&=~d)}if(0===a)break}return e=e.slice(0,e.indexOf("0x")+2)+zi(s),null,i=null,n=null,null,null,r=null,s=null,a=null,d=null,c=null,f=null,g=null,_=null,T=[],u=null,N=null,O=null,M=null,p=null,h=null,null,x=null,e}function Bi(e){var i,n,t,r,o,s,a,d,c,f,g,_,u,N,O,p=parseInt(e.toLowerCase().slice(e.indexOf("0x")+2),16),h=[];if("NUC400"===l||"M451HD"===l||"M451LD"===l||"M4521"===l||"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l||"NUC505"===l||"NUC121AE"===l||"NUC123AE"===l||"NANO103"===l||0===l.indexOf("M47")||"M433"===l||"M480MD"===l||"M480LD"===l||"AX58200"===l||0===l.indexOf("M25")||"M261"===l||0===l.indexOf("M235")||0===l.indexOf("M029")||0===l.indexOf("M030")||0===l.indexOf("M031")||0===l.indexOf("M091")||"M0564"===l||"M05641"===l||0===l.indexOf("NUC126")||"M071QV"===l||"NUC029xGE"===l||"NUC029KGE"===l||"MINI57"===l||"NM1120"===l||"NDA102"===l||"MA35D0"===l||"MA35D1"===l||"MA35H0"===l||0===l.indexOf("M2003")||0===l.indexOf("N9H30")||0===l.indexOf("N9H31")||0===l.indexOf("NUC97")||0===l.indexOf("NUC98")||0===l.indexOf("M2A23"))for(O=-1===e.indexOf("MFPH")&&-1===e.indexOf("_H_MFP"),n=0;n<8;n+=1)if((p&15<<4*n>>>0)>>>4*n>>>0,c=O?n:n+8,f="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+c.toString(),-1!==(u=$.inArray(f,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))&&""!==we[u]&&(g=(g=we[u]+"_Pin"+(u+1)).replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(_=Ri(g.slicePriorToX("_")),h[0]=u+1,Oi(g,_,h),$("#"+g).addClass("jstree-unchecked"),void 0!==He[_]))){for(i=0,o=He[_].length;i>>0)>>>8*n>>>0,c=n+4*d,f="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+c.toString(),-1!==(u=$.inArray(f,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))&&""!==we[u]&&(g=(g=we[u]+"_Pin"+(u+1)).replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(_=Ri(g.slicePriorToX("_")),h[0]=u+1,Oi(g,_,h),$("#"+g).addClass("jstree-unchecked"),void 0!==He[_]))){for(i=0,o=He[_].length;i>>0)>>>4*n>>>0,c=n,f="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+c.toString(),-1!==(u=$.inArray(f,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))&&""!==we[u]&&(g=(g=we[u]+"_Pin"+(u+1)).replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(_=Ri(g.slicePriorToX("_")),h[0]=u+1,Oi(g,_,h),$("#"+g).addClass("jstree-unchecked"),void 0!==He[_]))){for(i=0,o=He[_].length;i>>0)>>>2*n>>>0,c=n,f="P"+e.slice(e.indexOf("P")+1,e.indexOf("P")+2)+"."+c.toString(),-1!==(u=$.inArray(f,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]))&&""!==we[u]&&(g=(g=we[u]+"_Pin"+(u+1)).replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(_=Ri(g.slicePriorToX("_")),h[0]=u+1,Oi(g,_,h),$("#"+g).addClass("jstree-unchecked"),void 0!==He[_]))){for(i=0,o=He[_].length;i>>0)>>>n>>>0)for(N=e.slice(e.indexOf("P"),e.indexOf(":"))+"["+n+"]",t=0,s=NUTOOL_PIN.g_cfg_gpioMatrix.length;t";if("undefined"!=typeof NUTOOL_PER&&Ki(),"h"!==NUTOOL_PIN.g_pinFunctionString&&"dtsi"!==NUTOOL_PIN.g_pinFunctionString||a.sliceAfterX(".")===NUTOOL_PIN.g_pinFunctionString||(a=a.slicePriorToX(".")+"."+NUTOOL_PIN.g_pinFunctionString+'"\r\n'),d="",0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(w=""),k=Qi(Ge),"KM1M7CF"!==l&&k.sort(),0!==NUTOOL_PIN.g_cfg_gpiosDefines.length){if(-1===a.indexOf(".dtsi"))for(e=0,c=k.length;e0)for(i=y[k[e]].length-1;i>=0;i-=1)d+=" "+y[k[e]][i]+";\r\n",f=f+" "+y[k[e]][i]+";"}else if(0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003")){for(e=0,c=k.length;e0)for(i=0,g=y[k[e]].length;iIOPnMD = 0x"+zi(Ge[k[e]]).toUpperCase()+"UL;\r\n";for(d+="\r\n","undefined"==typeof NUTOOL_PER&&(d+=" /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\r\n"),f="",e=0,c=k.length;e0)for(d+=" "+w+"GPIO_MD(0x"+k[e][3]+")->IOPnMD = ",f=f+" "+w+"GPIO_MD(0x"+k[e][3]+")->IOPnMD = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+"GPIO_MD(0x"+k[e][3]+")->IOPnMD = 0x00000000;\r\n"}else if(0===l.indexOf("KM1M4BF")){for(e=0,c=k.length;eIOPnMD = 0x"+zi(Ge[k[e]]).toUpperCase()+"UL;\r\n":d+=" //"+w+"DBG->SELSWD = 0x"+zi(Ge[k[e]]).toUpperCase().slice(-2)+"UL;\r\n";for(d+="\r\n","undefined"==typeof NUTOOL_PER&&(d+=" /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\r\n"),f="",e=0,c=k.length;e0)for(d+=" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = ",f=f+" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = 0x00000000;\r\n";else 0==zi(Ge[k[e]])?d+=" "+w+"DBG->SELSWD = DEBUG_INTERFACE_DISABLE;\r\n":d+=" "+w+"DBG->SELSWD = DEBUG_INTERFACE_ENABLE;\r\n"}else if(0===l.indexOf("KM1M7CF")){for(e=0,c=k.length;eIOPnMD = 0x"+zi(Ge[k[e]]).toUpperCase()+"UL;\r\n":d+=" //"+w+k[e].slicePriorToX("_")+"->FPS"+k[e][3]+"n_SEL = 0x"+zi(Ge[k[e]]).toUpperCase()+"UL;\r\n";for(d+="\r\n","undefined"==typeof NUTOOL_PER&&(d+=" /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\r\n"),f="",e=0,c=k.length;e0)for(d+=" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = ",f=f+" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+"GPIO_MD"+k[e][3]+"->IOPnMD = 0x00000000;\r\n";else if(y[k[e]].length>0)for(d+=" "+w+k[e].slicePriorToX("_")+"->FPS"+k[e][3]+"n_SEL = ",f=f+" "+w+k[e].slicePriorToX("_")+"->FPS"+k[e][3]+"n_SEL = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+k[e].slicePriorToX("_")+"->FPS"+k[e][3]+"n_SEL = 0x00000000;\r\n"}else if(0===l.indexOf("M55M1"))for(d+="\r\n",f="",e=0,c=we.length;e;\r\n};\r\n\r\n";for(d+="&pinctrl {\r\n",e=0,c=k.length;eU&&(U=y[k[e]][i].length);for(U+=1,C=k[e].toLowerCase(),d+=" "+C+" {\r\n pinctrl_"+C+": "+C+"grp {\r\n nuvoton,pins =\r\n",f+=" "+C+" {\r\n pinctrl_"+C+": "+C+"grp {\r\n nuvoton,pins =\r\n",i=0,g=y[k[e]].length;i0)for(d+=" "+w+k[e]+" = ",f=f+" "+w+k[e]+" = ",i=y[k[e]].length-1;i>=0;i-=1)0!==i?(d+=y[k[e]][i]+" | ",f=f+y[k[e]][i]+" | "):(d+=y[k[e]][i]+";\r\n",f=f+y[k[e]][i]+";");else d+=" "+w+k[e]+" = 0x00000000;\r\n"}}else{for(e=0,c=k.length;e\{\}\[\]\\\/]/gi,"_").toUpperCase()).charAt(0))&&(U="_"+U),T+="#define "+U+" "+x.replace(/[.]/g,"").replace(/\s/g,"_").replace(/[`~!@#$%^&*()|+\-=?;:'",<>\{\}\[\]\\\/]/gi,"_")+"\r\n");"/* User-defined pins */\r\n"===T&&(T=""),L||("STADC"===C&&""===f&&(f="We do not Have the Define for STADC;"),$("#NUC_PinConfiguration_Canvas")[0].setAttribute("innerHTML",f))}function Wi(){var e,i,n,t,r,o,s,f,_,u,N,O,p,h,x,P,M,I,C,m,U,b,L,k=[],$=[],A=[],S="",y=[],D=[],w="SYS->",F=localStorage.getItem("ProjectName");for(O=function(e,i,n){return L=!1,(-1!==e.indexOf("_"+i)||-1!==e.indexOf(i+":")||0===e.indexOf(i+"_")||-1!==e.indexOf(","+i+"_")||-1!==e.lastIndexOf(i)&&e.lastIndexOf(i)+i.length===e.length||"GPIO"===i&&-1!==e.indexOf("_MFP_G"+n)||0===e.indexOf(i)&&-1!==e.indexOf("_FPS"))&&(L=!0),"GPIO"===i&&-1===e.indexOf("SYS_G"+n)&&-1===e.indexOf("SYS_MFP_"+n)&&-1===e.indexOf("SYS_"+n)&&-1===e.indexOf("MD_"+n)&&-1===e.indexOf("GPIO_"+n)&&(L=!1),L},p=function(e){return 0===e.indexOf("SYS_MFP")?e.substring(0,11)+"_Msk":0===e.indexOf("SYS_GP")&&-1!==e.indexOf("_MFP_")?-1===e.indexOf("_MFPL_")&&-1===e.indexOf("_MFPH_")?e.substring(0,15)+"_Msk":e.slicePriorToX("MFP_")+"MFP_Msk":-1===e.indexOf("SYS_GP")&&e.indexOf("_MFP_")!==e.lastIndexOf("_MFP_")?e.substring(0,e.lastIndexOf("_MFP_")+5)+"Msk":0===e.indexOf("GPIO_IO")?e.substring(0,e.lastIndexOf("MD_")+3)+"Msk":0===e.indexOf("GPIO_P")?"GPIO_MD_IOPnMD_Pn"+e.substring(7,e.lastIndexOf("GPIO_P")+8)+"MD_Msk":0===e.indexOf("GPIO_FPS")?"":e.slicePriorToX("MFP_")+"MFP_Msk"},0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(w=""),"undefined"!=typeof NUTOOL_PER&&Ki(),"h"!==NUTOOL_PIN.g_pinFunctionString&&"dtsi"!==NUTOOL_PIN.g_pinFunctionString||a.sliceAfterX(".")===NUTOOL_PIN.g_pinFunctionString||(a=a.slicePriorToX(".")+"."+NUTOOL_PIN.g_pinFunctionString+'"\r\n'),(k=Qi(Ge)).sort(),e=0,r=k.length;e0&&O(D[k[e]].join(),S,A[n])){var E;for(U=!1,b=!0,i=D[k[e]].length-1;i>=0;i-=1){var j=D[k[e]][i].slicePriorToX("MFP_").sliceAfterX("_MFP").sliceAfterX("_");if(O(D[k[e]][i],S,A[n])){I=D[k[e]][i].slicePriorToX(":"),U&&(m+="(); // Pin: "+E+"\r\n",g+="();
");var X=j.slice(0,2)+"."+j.slice(2);E=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].indexOf(X)+1,m+=" SET_"+I+"_"+j,g+=" SET_"+I+"_"+j,U=!0}}m+="(); // Pin: "+E+"\r\n",g+="();
"}for(m+="\r\n return;\r\n}\r\n\r\n",b?d+=m:g+=A[n]+" did not generate modularized code!!
",m="void "+F+"_deinit_"+A[n].toLowerCase()+"(void)\r\n{\r\n",b=!1,e=0,r=k.length;e0&&O(D[k[e]].join(),S,A[n])){for(U=!1,b=!0,i=D[k[e]].length-1;i>=0;i-=1){if(O(D[k[e]][i],S,A[n]))U&&(m+="();\r\n"),m+=" SET_GPIO_"+(j=D[k[e]][i].slicePriorToX("MFP_").sliceAfterX("_MFP").sliceAfterX("_")),g+=" SET_GPIO_"+j,U=!0}m+="();\r\n"}m+="\r\n return;\r\n}\r\n\r\n",b&&(d+=m)}else for(n=0,s=A.length;n0&&O(D[k[e]].join(),S,A[n])){for(U=!1,b=!0,m+=" "+w+k[e]+" &= ~(",g+=" "+w+k[e]+" &= ~(",i=D[k[e]].length-1;i>=0;i-=1)O(D[k[e]][i],S,A[n])&&(U&&(m+=" | ",g+=" | "),m+=p(I=D[k[e]][i].sliceAfterX(":")),g+=p(I),U=!0);for(m+=");\r\n",g+=");
",U=!1,m+=" "+w+k[e]+" |= (",g+=" "+w+k[e]+" |= (",i=D[k[e]].length-1;i>=0;i-=1)O(D[k[e]][i],S,A[n])&&(U&&(m+=" | ",g+=" | "),m+=I=D[k[e]][i].sliceAfterX(":"),g+=I,U=!0);m+=");\r\n",g+=");
"}for(m+="\r\n return;\r\n}\r\n\r\n",b?d+=m:g+=A[n]+" did not generate modularized code!!
",m="void "+F+"_deinit_"+A[n].toLowerCase()+"(void)\r\n{\r\n",b=!1,e=0,r=k.length;e0&&O(D[k[e]].join(),S,A[n])){for(U=!1,b=!0,m+=" "+w+k[e]+" &= ~(",i=D[k[e]].length-1;i>=0;i-=1)O(D[k[e]][i],S,A[n])&&(U&&(m+=" | "),m+=p(I=D[k[e]][i].sliceAfterX(":")),U=!0);m+=");\r\n"}m+="\r\n return;\r\n}\r\n\r\n",b&&(d+=m)}for("undefined"==typeof NUTOOL_PER?d+="void "+F+"_init(void)\r\n{\r\n":d+="void Pin_Init(void)\r\n{\r\n",e=0,r=k.length;e\{\}\[\]\\\/]/gi,"_").toUpperCase()).charAt(0))&&(I="_"+I),T+="#define "+I+" "+_.replace(/[.]/g,"").replace(/\s/g,"_").replace(/[`~!@#$%^&*()|+\-=?;:'",<>\{\}\[\]\\\/]/gi,"_")+"\r\n");"/* User-defined pins */\r\n"===T&&(T=""),k=null,$=null,A=null,y=null,D=null,gpio_MFPsDefine=null}function zi(e,i){var n=Number(e).toString(16);for(i=null==i?i=8:i;n.lengthae/3?ae/3:18*Qi(Ge).length+20,0===_.length&&($("#rootTree_Pin")[0].appendChild(Zi("div","mfpTree","Loading...")),_=$("#mfpTree"),$("#ChipType").hover((function(){$(this).css("background-color","#FAFAFA"),Ji()}),(function(){$(this).css("background-color","#FFFFFF")})),$("#MCU").hover((function(){$(this).css("background-color","#FAFAFA"),Ji()}),(function(){$(this).css("background-color","#FFFFFF")}))),_[0].setAttribute("style","background-color: #FFFFFF; float:left; overflow-y: scroll; width:"+G+"px; height: "+se+"px; border-bottom: 5px solid #F2F2F2;"),-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?ii?_.hover((function(){$(this).css("background-color","#FAFAFA"),Ji(),$("#pin_side_0").show(),$("#NUC_PinConfiguration_Canvas_Lining").hide()}),(function(){$(this).css("background-color","#FFFFFF"),$("#pin_side_0").hide(),$("#NUC_PinConfiguration_Canvas_Lining").show()})):_.hover((function(){$(this).css("background-color","#FAFAFA"),Ji(),$("#pin_side_0").css("opacity","0.8"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","0")}),(function(){$(this).css("background-color","#FFFFFF"),$("#pin_side_0").css("opacity","0.1"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","1")})):_.hover((function(){$(this).css("background-color","#FAFAFA"),Ji()}),(function(){$(this).css("background-color","#FFFFFF")})),_.jstree({json_data:{data:g},themes:{theme:"default",icons:!1},core:{animation:0},plugins:["themes","json_data","ui","crrm"]}).bind("hover_node.jstree",(function(e,i){var n=i.rslt.obj.attr("id").slicePriorToX(":"),t="";r&&NUTOOL_PIN.g_cfg_regDescriptions.hasOwnProperty(n)&&(-1===NUTOOL_PIN.g_cfg_regDescriptions[n].indexOf("nonexistent")&&(t="Simplified Chinese"===Ne||"Traditional Chinese"===Ne?"位址: ":"Address: "),et(n,t+=NUTOOL_PIN.g_cfg_regDescriptions[n],"right"))})).bind("dblclick.jstree",(function(e){var i=$(e.target).closest("li")[0].id;"mfp_tree"!==i&&void 0===Ge.ALT_MFP&&"MINI55"!==l&&"NM1200"!==l&&_.jstree("rename",$("#"+i))})).bind("rename.jstree",(function(e,i){var n,t,r=i.rslt.obj.attr("id"),o=i.rslt.old_name,s=i.rslt.new_name;n=s,t=!1,"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().indexOf("p")&&4===n.toLowerCase().lastIndexOf("_mfp")&&8===n.toLowerCase().lastIndexOf(":0x")&&(t=!0):"NM1500"===l||"M0519"===l||"M051DN_DE"===l||"M051BN"===l||"M051AN"===l||"M058S"===l||"MINI51AN"===l||"MINI51DE"===l||"MINI55"===l||"MINI58"===l||"NUC029AE"===l||"NUC029TAE"===l||"NUC029AN"===l||"NM1200"===l?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().indexOf("p")&&2===n.toLowerCase().lastIndexOf("_mfp")&&6===n.toLowerCase().lastIndexOf(":0x")&&(t=!0):0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003")?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().lastIndexOf("p")&&2===n.toLowerCase().lastIndexOf("mf")&&12===n.toLowerCase().lastIndexOf(":0x")&&(t=!0):0===l.indexOf("KM1M7CF")?(8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().lastIndexOf("iop")&&4===n.toLowerCase().lastIndexOf("md")||0===n.toLowerCase().lastIndexOf("fps")&&6===n.toLowerCase().lastIndexOf("_sel"))&&(t=!0):0===l.indexOf("KM1M7AF")||0===l.indexOf("KM1M7BF")||0===l.indexOf("KM1M4BF")||0===l.indexOf("KM1M0F")?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().lastIndexOf("iop")&&4===n.toLowerCase().lastIndexOf("md")&&6===n.toLowerCase().lastIndexOf(":0x")&&(t=!0):8!==n.slice(n.toLowerCase().indexOf("0x")+2).length||0!==n.toLowerCase().lastIndexOf("gp")||3!==n.toLowerCase().lastIndexOf("_mfp")||7!==n.toLowerCase().lastIndexOf(":0x")&&8!==n.toLowerCase().lastIndexOf(":0x")||(t=!0),t?(Bi(o),s=Xi(s),Vi()):_.jstree("rename_node",$("#"+r),o)})).bind("destroy.jstree",(function(){e=null,i=null,n=null,t=null,c=[],f=[],s=null,g=null,a=null,_=null,u=null,d=null})),_.css("font-size","16px"),_.css("font-family",'Monaco, Consolas, "Lucida Console", monospace;')}function Vi(){var e,i,n,t,r,l=[],o=0;for(e=0,n=(l=Qi(Ge)).length;e=0;n-=1)if(c=NUTOOL_PIN.g_cfg_gpios[t].f[n],parseInt(c.slice(c.indexOf(":")+1),10)=0;r-=1)0===l.indexOf("MA35D0")||0===l.indexOf("MA35H0")?0===NUTOOL_PIN.g_cfg_gpios[t].f[r].toUpperCase().indexOf(f+"_")&&NUTOOL_PIN.g_cfg_gpios[t].f.splice(r,1):0===NUTOOL_PIN.g_cfg_gpios[t].f[r].toUpperCase().indexOf(f)&&NUTOOL_PIN.g_cfg_gpios[t].f.splice(r,1);else if("PARTIAL"===u[e])for(t=0,d=NUTOOL_PIN.g_cfg_gpios.length;t=0;r-=1)NUTOOL_PIN.g_cfg_gpios[t].f[r].slicePriorToX(":").toUpperCase()===f&&NUTOOL_PIN.g_cfg_gpios[t].f.splice(r,1);else for(c=u[e]+":0",t=0,d=NUTOOL_PIN.g_cfg_gpios.length;t=0;r-=1)0===NUTOOL_PIN.g_cfg_gpios[t].f[r].toUpperCase().indexOf(f)&&NUTOOL_PIN.g_cfg_gpios[t].f.splice(r,1);break}for(e=(N=Qi(NUTOOL_PIN.g_cfg_regDescriptions)).length-1;e>=0;e-=1)void 0===Ge[N[e]]&&delete NUTOOL_PIN.g_cfg_regDescriptions[N[e]];for(je=[],e=0;e=y&&r=y+D&&r=y+D+w&&r4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,Y+V,r.y[e]-r.y[0]+V+4*K/5);break;case 1:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,Y+V,r.y[e]-r.y[r.oneSidePinNumber-1]+V+4*K/5)}else if(-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA"))for(e=0;e6&&(i=i.slice(0,6)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,r.x[e]-r.ctx.measureText(i).width/2,r.y[e]+parseInt(r.ctx.font,10)/2));else switch(r.whichSide){case 0:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",n=r.x[e]-r.x[0]+V,t=Y+V+H,r.ctx.save(),r.ctx.translate(n,t),r.ctx.rotate(-Math.PI/2),r.ctx.fillText(i,Y,4*K/5),r.ctx.restore();break;case 1:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,Y+V,r.y[e]-r.y[r.oneSidePinNumber-1]+V+4*K/5);break;case 2:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",n=r.x[e]-r.x[r.oneSidePinNumber-1]+V,t=V+H,r.ctx.save(),r.ctx.translate(n,t),r.ctx.rotate(-Math.PI/2),r.ctx.textAlign="end",r.ctx.fillText(i,H,4*K/5),r.ctx.restore();break;case 3:for(e=0;e4&&(i=i.slice(0,4)+".."),r.savedPinName[e]=i,r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(i,Y+V,r.y[e]-r.y[0]+V+4*K/5)}i=null,n=null,t=null},restore:function(){ge.removeContext($("#"+r.inner)),r=null},getMousePos:function(e,i){var n=e.getBoundingClientRect();return{x:i.clientX-n.left,y:i.clientY-n.top}},decideWhichPin:function(){var e,i,n;if(-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA"))for(e=r.mousePosition.x-ce*Le/100,i=r.mousePosition.y-fe*Le/100,n=0;n=(r.x[n]-r.r)*Le/100&&e<=(r.x[n]+r.r)*Le/100&&i>=(r.y[n]-r.r)*Le/100&&i<=(r.y[n]+r.r)*Le/100){r.currentPinIndex=n;break}r.currentPinIndex=-1}else for(n=0;n=e&&r.mousePosition.x<=e+r.w*Le/100&&r.mousePosition.y>=r.y[n]*Le/100&&r.mousePosition.y<=(r.y[n]+r.h)*Le/100){r.currentPinIndex=n;break}r.currentPinIndex=-1}-1!==r.currentPinIndex?r.mouseEnter():r.mouseLeave()},mouseEnter:function(){var e,i,n,s,a,d,c,f,g,_,u,N;for(e=0,i=$e.length;e6&&(N=u.slice(0,6)+".."),r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(N,r.x[n]-r.ctx.measureText(N).width/2,r.y[n]+parseInt(r.ctx.font,10)/2);else switch(r.whichSide){case 0:ii&&r.ctx.strokeRect(r.x[n]-r.x[0]+V,Y+V,r.w,r.h),r.ctx.fillRect(r.x[n]-r.x[0]+V,Y+V,r.w,r.h),r.ctx.font=B,r.ctx.fillStyle="black",s=r.x[n]-r.x[0]+V,a=Y+V+H,r.ctx.save(),r.ctx.translate(s,a),r.ctx.rotate(-Math.PI/2),r.ctx.fillText(r.savedPinName[n],Y,4*K/5),r.ctx.restore();break;case 1:ii&&r.ctx.strokeRect(Y+V,r.y[n]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[n]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[n],Y+V,r.y[n]-r.y[r.oneSidePinNumber-1]+V+4*K/5);break;case 2:ii&&r.ctx.strokeRect(r.x[n]-r.x[r.oneSidePinNumber-1]+V,V,r.w,r.h),r.ctx.fillRect(r.x[n]-r.x[r.oneSidePinNumber-1]+V,V,r.w,r.h),r.ctx.font=B,r.ctx.fillStyle="black",s=r.x[n]-r.x[r.oneSidePinNumber-1]+V,a=V+H,r.ctx.save(),r.ctx.translate(s,a),r.ctx.rotate(-Math.PI/2),r.ctx.textAlign="end",r.ctx.fillText(r.savedPinName[n],H,4*K/5),r.ctx.restore();break;case 3:ii&&r.ctx.strokeRect(Y+V,r.y[n]-r.y[0]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[n]-r.y[0]+V,r.w,r.h),r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[n],Y+V,r.y[n]-r.y[0]+4*K/5+V)}(!$i(u)||Si(u)||Ai(u))&&(Ai(u)?d=function(e){return NUTOOL_PIN.g_cfg_wppin_comment&&NUTOOL_PIN.g_cfg_wppin_comment[e]&&""!==String(NUTOOL_PIN.g_cfg_wppin_comment[e])?NUTOOL_PIN.g_cfg_wppin_comment[e]:e}(u):$i(u)?Si(u)&&(0===l.indexOf("KM1M4BF0")?d="When NDMOD pin input is L level, SWDCLK would be selected. Configurable only when NDMOD pin input is H level.":0===l.indexOf("KM1M4BF5")?d="When SELSWD.SWDEN = 1, SWDCLK would be selected. Configurable only when SELSWD.SWDEN = 0.":0===l.indexOf("KM1M0D0F")?"P0.0"===u?d="When NDMOD pin input is L level, DBG_SWDD would be selected. Configurable only when NDMOD pin input is H level.":"P0.1"===u&&(d="When NDMOD pin input is L level, DBG_SWDCLK would be selected. Configurable only when NDMOD pin input is H level."):0===l.indexOf("KM1M0D1F")?"P0.1"===u?d="When NDMOD pin input is L level, DBG_SWDD would be selected. Configurable only when NDMOD pin input is H level.":"P0.2"===u&&(d="When NDMOD pin input is L level, DBG_SWDCLK would be selected. Configurable only when NDMOD pin input is H level."):0===l.indexOf("KM1M0GF")&&("P1.0"===u?d="When NDMOD pin input is L level, DBG_SWDD would be selected. Configurable only when NDMOD pin input is H level.":"P1.1"===u&&(d="When NDMOD pin input is L level, DBG_SWDCLK would be selected. Configurable only when NDMOD pin input is H level."))):d=u,"unknown"!==d&&(t.stage=$("#panel")[0].appendChild(Zi("canvas",r.inner+"_tooltip_pin")),-1===d.indexOf("/")||-1===d.indexOf("XT1_IN")&&-1===d.indexOf("XT1_OUT")&&-1===d.indexOf("XTAL1")&&-1===d.indexOf("XTAL2")||(-1!==d.indexOf("XTAL1")?d+=" (XTAL1":-1!==d.indexOf("XTAL2")?d+=" (XTAL2":-1!==d.indexOf("XT1_IN")?d+=" (XT1_IN":d+=" (XT1_OUT",d+="Simplified Chinese"===Ne?"由User Configuration决定。)":"Traditional Chinese"===Ne?"由User Configuration決定。)":" is decided by User Configuration.)"),ii?(t.w=r.ctx.measureText(d).width,t.h=K,g="12px Arial",_=t.h-4,-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?(c=(ce+r.x[r.currentPinIndex])*Le/100,f=(fe+r.y[r.currentPinIndex]+10)*Le/100):(c=(r.x[r.currentPinIndex]+r.w)*Le/100,f=r.y[r.currentPinIndex]*Le/100)):(Le<100?(t.w=r.ctx.measureText(d).width/Le*100,t.h=K/Le*100,g=12/Le*100+"px Times Arial",_=t.h-5/Le*100,c=r.x[r.currentPinIndex]+r.w,f=r.y[r.currentPinIndex]):(t.w=r.ctx.measureText(d).width,t.h=K,g="12px Arial",_=t.h-4,c=r.x[r.currentPinIndex]+r.w,f=r.y[r.currentPinIndex]),-1===o.indexOf("WLCSP")&&-1===o.indexOf("BGA")||(c+=ce,f+=fe+10)),t.stage.setAttribute("style","z-index:2; position:absolute; left:"+c+"px; top:"+f+"px;"),t.stage.setAttribute("width",t.w+3*ie),t.stage.setAttribute("height",t.h),t.ctx=ge.getContext(t.stage),t.ctx.font=g,t.ctx.strokeStyle="#000000",t.ctx.lineWidth=2,t.ctx.strokeRect(0,0,t.w+3*ie,t.h),t.ctx.fillStyle="#FFF6C0",t.ctx.fillRect(ne,ne,t.w+3*ie-2*ne,t.h-2*ne),t.ctx.fillStyle="#000000",t.ctx.fillText(d,ie,_),d=null))}},mouseLeave:function(){var e,t=r.lastPinIndex;if(-1!==r.lastPinIndex){if(r.ctx.strokeStyle="#000000",r.ctx.fillStyle=r.savedPinPadColor[t],-1!==o.indexOf("SOP"))switch(r.whichSide){case 0:ii&&r.ctx.strokeRect(Y+V,r.y[t]-r.y[0]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[t]-r.y[0]+V,r.w,r.h),r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[t],Y+V,r.y[t]-r.y[0]+4*K/5+V);break;case 1:ii&&r.ctx.strokeRect(Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[t],Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V+4*K/5)}else if(-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA"))-1===(e=""!==we[t]?tn(we[t]):r.savedPinName[t]).toLowerCase().indexOf("toolnotshow")&&(r.ctx.beginPath(),r.ctx.arc(r.x[t],r.y[t],r.r,0,2*Math.PI,!0),r.ctx.fill(),e.length>6&&(e=e.slice(0,6)+".."),r.ctx.font=B,r.ctx.fillStyle="black",r.ctx.fillText(e,r.x[t]-r.ctx.measureText(e).width/2,r.y[t]+parseInt(r.ctx.font,10)/2));else switch(r.whichSide){case 0:ii&&r.ctx.strokeRect(r.x[t]-r.x[0]+V,Y+V,r.w,r.h),r.ctx.fillRect(r.x[t]-r.x[0]+V,Y+V,r.w,r.h),r.ctx.fillStyle="black",i=r.x[t]-r.x[0]+V,n=Y+V+H,r.ctx.save(),r.ctx.translate(i,n),r.ctx.rotate(-Math.PI/2),r.ctx.fillText(r.savedPinName[t],Y,4*K/5),r.ctx.restore();break;case 1:ii&&r.ctx.strokeRect(Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V,r.w,r.h),r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[t],Y+V,r.y[t]-r.y[r.oneSidePinNumber-1]+V+4*K/5);break;case 2:ii&&r.ctx.strokeRect(r.x[t]-r.x[r.oneSidePinNumber-1]+V,V,r.w,r.h),r.ctx.fillRect(r.x[t]-r.x[r.oneSidePinNumber-1]+V,V,r.w,r.h),r.ctx.fillStyle="black",i=r.x[t]-r.x[r.oneSidePinNumber-1]+V,n=V+H,r.ctx.save(),r.ctx.translate(i,n),r.ctx.rotate(-Math.PI/2),r.ctx.textAlign="end",r.ctx.fillText(r.savedPinName[t],H,4*K/5),r.ctx.restore();break;case 3:ii&&r.ctx.strokeRect(Y+V,r.y[t]-r.y[0]+V,r.w,r.h),r.ctx.fillRect(Y+V,r.y[t]-r.y[0]+V,r.w,r.h),r.ctx.fillStyle="black",r.ctx.fillText(r.savedPinName[t],Y+V,r.y[t]-r.y[0]+4*K/5+V)}r.lastPinIndex=-1,ge.removeContext($("#"+r.inner+"_tooltip_pin")),t=null}},pinClickHandler:function(){var i,n,t,s,a,d,c,f,g=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][r.pin[r.currentPinIndex]-1],_=[],u=0,N=ge.getContext($("#NUC_PinConfiguration_Canvas")[0]),O=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].indexOf(g)+1;if(-1!==r.currentPinIndex&&dt(O))ct();else if(-1!==r.currentPinIndex)if(ln(),"N9H30xxxIIM"!==l&&"N9H31KxxIFC"!==l||-1==g.indexOf("ADC")){if($i(g)){for(parseInt(g.sliceAfterX("."),10),s=ji(g+=":0",parseInt(g.sliceAfterX("."),10)),-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?(a=r.x[r.currentPinIndex]+ce,d=r.y[r.currentPinIndex]+fe+10):(a=r.x[r.currentPinIndex],d=r.y[r.currentPinIndex]),i=0,n=NUTOOL_PIN.g_cfg_gpios[s].f.length;iu&&(u=N.measureText(_[i]).width);for(_.push("Reset"),ze=[],i=0,n=_.length;i100?d+i*ee:d+i*ee/Le*100,f="#6495ED",i!==n-1&&_[i]===we[r.pin[r.currentPinIndex]-1]&&(f=($.inArray(r.pin[r.currentPinIndex],Ye),Ce)),-1!==l.indexOf("KM1M7CF")){p=Math.floor(i/10);ze[i]=on().init(r.pin[r.currentPinIndex],i.toString(),_[i],u,a+r.w+u*p/Le*100+3*ie*p,t-10*p*ee/Le*100,f,!0)}else ze[i]=on().init(r.pin[r.currentPinIndex],i.toString(),_[i],u,a+r.w,t,f,!0);c=(c=i.toString()).replaceSpecialCharacters(),$("#Pin_MultiFunction_Selection_"+c).hover(ze[i].mouseEnter,ze[i].mouseLeave),ze[i].draw()}}}else{switch(parseInt(g.sliceAfterX("."),10),s=ji(g+=":0",parseInt(g.sliceAfterX("."),10)),a=r.x[r.currentPinIndex],d=r.y[r.currentPinIndex],u=60,g.slicePriorToX(":")){case"ADC3":_.push("VSENSE");break;case"ADC4":_.push("YM");break;case"ADC5":_.push("YP");break;case"ADC6":_.push("XM");break;case"ADC7":_.push("XP")}for(_.push("Reset"),ze=[],i=0,n=_.length;i100?d+i*ee:d+i*ee/Le*100,f="#6495ED",i!==n-1&&_[i]===we[r.pin[r.currentPinIndex]-1]&&(f=($.inArray(r.pin[r.currentPinIndex],Ye),Ce)),-1!==l.indexOf("KM1M7CF")){var p=Math.floor(i/10);ze[i]=on().init(r.pin[r.currentPinIndex],i.toString(),_[i],u,a+r.w+u*p/Le*100+3*ie*p,t-10*p*ee/Le*100,f,!0)}else ze[i]=on().init(r.pin[r.currentPinIndex],i.toString(),_[i],u,a+r.w,t,f,!0);c=(c=i.toString()).replaceSpecialCharacters(),$("#Pin_MultiFunction_Selection_"+c).hover(ze[i].mouseEnter,ze[i].mouseLeave),ze[i].draw()}}g=null,_=[],u=null,N=null,t=null,s=null,e=null,a=null,d=null,c=null,f=null}};return r}function ln(){var e,i;for(e=0,i=ze.length;e0&&"Reset"!==i.label&&("MA35D0"===l||"MA35D1"===l||"MA35H0"===l||!$i(i.label))&&"unknown"!==(s=an(i.label,i.pin))){for(e.stage=$("#panel")[0].appendChild(Zi("canvas",i.inner+"_tooltip")),a=s.split("
"),e.w=0,n=0,t=a.length;ne.w&&(e.w=i.ctx.measureText(a[n]).width);for(-1!==o.indexOf("SOP")||-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")?i.pin>v/2?e.stage.setAttribute("style","z-index:2; position:absolute; left:"+(i.positionX-e.w-3*ie-ne)+"px; top:"+i.positionY+"px;"):e.stage.setAttribute("style","z-index:2; position:absolute; left:"+(i.positionX+i.w+3*ie+ne)+"px; top:"+i.positionY+"px;"):i.pin>y/2&&i.pin<=y+D+w/2?e.stage.setAttribute("style","z-index:2; position:absolute; left:"+(i.positionX-e.w-3*ie-ne)+"px; top:"+i.positionY+"px;"):e.stage.setAttribute("style","z-index:2; position:absolute; left:"+(i.positionX+i.w+3*ie+ne)+"px; top:"+i.positionY+"px;"),e.stage.setAttribute("width",e.w+3*ie),e.stage.setAttribute("height",i.h*a.length),L||e.stage.setAttribute("innerText",s),e.ctx=ge.getContext(e.stage),e.ctx.font=i.ctx.font,e.ctx.strokeStyle="#000000",e.ctx.lineWidth=2,e.ctx.strokeRect(0,0,e.w+3*ie,i.h*a.length),e.ctx.fillStyle="#FFF6C0",e.ctx.fillRect(ne,ne,e.w+3*ie-2*ne,i.h*a.length-2*ne),e.ctx.fillStyle="#000000",n=0,t=a.length;n

'+r+'

').dialog({modal:!1,resizable:!1,title:t,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#noticeForMultipleSelectionsDialog").dialog("destroy")},buttons:[{text:l,click:function(){e(),$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy")}},{text:o,click:function(){ln(),$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy")}}]}));t=null,r=null,l=null,o=null}((function(){sn(r,i.pin,i.label)}),i.label,nn(a))):sn(Ri(t.slicePriorToX("_")),i.pin,i.label),s=null,a=null}t=null}};return i}function sn(e,i,n){var t,r,l,o,s=$("#moduleTree"),a=we[i-1]+"_Pin"+i,d=[];if(a=a.replaceSpecialCharacters(),s.jstree("uncheck_node",$("#"+a)),!$("#"+a).hasClass("jstree-unchecked")){if(l=Ri(a.slicePriorToX("_")),(o=[])[0]=i,Oi(a,l,o),void 0!==He[l]){for(t=0,r=He[l].length;tNote:"),s=!1,-1!==r.indexOf("@")&&(l=l.slice(l.indexOf("@")+1,l.indexOf(":")),s=!0),!(0!==r.indexOf(e+":")&&0!==r.indexOf(e+"@")||s&&l!==NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][i-1])){o=!0;break}return n=null,t=null,r=o?r.slice(r.indexOf(":")+1):"unknown"}function dn(){je=[],ye=[],Ge=[],Re=[],De=[],we=[],ve=[],Ye=[],void 0!==Ri.specialModuleNames&&delete Ri.specialModuleNames,si(),ln(),$("#panel").unbind("mouseenter mouseleave"),ge.removeContext($("#NUC_PinConfiguration_Canvas")),ge.removeContext($("#NUC_PinConfiguration_Canvas_Lining")),$("#mfpTree").jstree("destroy"),$("#supportedModules").jstree("destroy"),$("#moduleTree").jstree("destroy"),$("#mfpTree").remove(),$("#supportedModules").remove(),$("#moduleTree").remove(),$("div").remove(".tooltip")}function cn(){var e,i,n=$("#MCUselect"),r={},s=[],a=!1;for(n.children().length>0&&n.children().remove(),e=0,i=NUTOOL_PIN.g_cfg_chips.length;e=0;r-=1)d[r]&&null!==d[r].getAttribute(a)&&(d[r].getAttribute(a)===e||d[r].getAttribute(a)===c)&&d[r].parentNode.removeChild(d[r]);for(d[0].parentNode.appendChild(l),"undefined"!=typeof NUTOOL_PER&&"js"===n&&(e="PinConfigure/"+e,i="PinConfigure/"+i),"PeripheralConfigure/"!==i&&(o=un(i,n),"function"==typeof t&&(o.onload=function(){t()})),!L&&window.console&&window.console.log("In replacejscssfile, oldfilename:"+e+" / newfilename:"+i),r=d.length;r>=0;r-=1)d[r]&&null!==d[r].getAttribute(a)&&(d[r].getAttribute(a)===e||d[r].getAttribute(a)===i)&&d[r].parentNode.removeChild(d[r]);d[0].parentNode.appendChild(o)}function On(){$("#conflictDialog").dialog("isOpen")&&$("#conflictDialog").dialog("destroy"),$("#adjustedModulesDialog").dialog("isOpen")&&$("#adjustedModulesDialog").dialog("destroy"),$("#warningForSavingDialog").dialog("isOpen")&&$("#warningForSavingDialog").dialog("destroy"),$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy"),$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy"),$("#generateCodeDialog").dialog("isOpen")&&$("#generateCodeDialog").dialog("destroy"),$("#printReportDialog").dialog("isOpen")&&$("#printReportDialog").dialog("destroy"),$("#runAnotherToolDialog").dialog("isOpen")&&$("#runAnotherToolDialog").dialog("destroy"),$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy"),$("#languageDialog").dialog("isOpen")&&$("#languageDialog").dialog("destroy")}function pn(){var e,i,n,t,r,l,o=ge.getContext($("#NUC_PinConfiguration_Canvas")[0]),s=0;"Simplified Chinese"===Ne?(n="被用户配置",t="悬停工具提示",r="滑鼠焦点",l="非可配置的","双击用户定义",o.font="12px 新細明體"):"Traditional Chinese"===Ne?(n="被使用者配置",t="懸停工具提示",r="滑鼠焦點",l="非可配置的","雙擊用戶定義",o.font="12px 新細明體"):(n="Configured by User",t="Tooltip on Hover",r="Focused by Mouse",l="Not Configurable","Dblclicked for UserDefined",o.font=B),o.strokeStyle="black",e=ce-Pe-H-Me,i=fe-Te-(s+=1)*(K+Ie),o.strokeRect(e,i,H,K),o.fillStyle=Ce,o.fillRect(e,i,H,K),o.fillStyle="black",o.fillText(n,e+H+3,i+4*K/5),e=ce-Pe-H-Me,i=fe-Te-(s+=1)*(K+Ie),o.strokeRect(e,i,H,K),o.fillStyle=me,o.fillRect(e,i,H,K),o.fillStyle="black",o.fillText(t,e+H+3,i+4*K/5),e=ce-Pe-H-Me,i=fe-Te-(s+=1)*(K+Ie),o.strokeRect(e,i,H,K),o.fillStyle=Ue,o.fillRect(e,i,H,K),o.fillStyle="black",o.fillText(r,e+H+3,i+4*K/5),e=ce-Pe-H-Me,i=fe-Te-(s+=1)*(K+Ie),o.strokeRect(e,i,H,K),o.fillStyle=be,o.fillRect(e,i,H,K),o.fillStyle="black",o.fillText(l,e+H+3,i+4*K/5)}function hn(e,i,n){var t,r,o,s,a,d;for(i=i.restorePinTreeNodeName().restoreSpecialCharacters(),d=(a=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e])+":0",t=0,o=NUTOOL_PIN.g_cfg_gpios.length;t>>0:0}}break}break}-1!==l.indexOf("KM1M4BF5")&&(0!=we.filter((function(e){return/DBG_SWDD/.test(e)})).length||0!=we.filter((function(e){return/DBG_SWDCLK/.test(e)})).length?Ge.SELSWD=1:Ge.SELSWD=0),t=null,r=null,o=null,s=null,a=null,d=null}function xn(){vi(),"none"===$("#mfpTree").css("display")?$("#moduleTree").height(ae-$("#supportedModules").height()):($("#mfpTree").height(se),$("#moduleTree").height(ae-$("#ChipType").height()-$("#MCU").height()-se-6-$("#supportedModules").height())),ai(),function(){var e,i,n,t,r=[];for(e=0,i=(r=Qi(we)).length;eae/3?ae/3:18*Qi(Ge).length+20,$("#panel").width(le-G-8),$("#panel").height(window.innerHeight-R-8-45),"none"===$("#mfpTree").css("display")?$("#moduleTree").height(ae-$("#supportedModules").height()-45):($("#mfpTree").height(se),$("#moduleTree").height(ae-$("#ChipType").height()-$("#MCU").height()-se-6-$("#supportedModules").height()-45)),Le=100,Pn(),recordedDialogSize=null}function Mn(){for(var e,i,n,t,r,l,o,s=[],a=0;ye.length>0&&a<1e3;)for(a+=1,e=parseInt(ye[0].slicePriorToX(":"),10),i=ve[e-1],r=-1,l=0,o=De[e-1];r!==l;)r=i.indexOf(o),l=i.lastIndexOf(o),n=Ri((t=(t=i.slice(r).slicePriorToX("/")+"_Pin"+e).replaceSpecialCharacters()).slicePriorToX("_")),s[0]=e,Oi(t,n,s),$("#"+t).removeClass("jstree-checked"),$("#"+t).addClass("jstree-unchecked"),$("#"+n+"_Root").removeClass("jstree-undetermined"),$("#"+n+"_Root").removeClass("jstree-checked"),$("#"+n+"_Root").addClass("jstree-unchecked"),i=i.slice(r+1);Vi(),$("#moduleTree").find("li").each((function(e,i){$("#"+$(i).attr("id")+" >a").css("color","black")})),$("#moduleTree").jstree("close_all"),ye=[],s=[],He=[],We=[],e=null,i=null,n=null,t=null,r=null,l=null,o=null,a=null}function In(e){var i,n,t,r,l,o,s,a,d,c,f,g,_,u,N,O,p,h,x,P,T,M,I,C,m,U=[],b="",L=[],k=!0;if(0!==NUTOOL_PIN.g_cfg_shareBits.length){for(void 0===(d=localStorage.getItem("UIlanguage"))||null==d?(M=" or ",I=" should be ",C=".",m="(configure it again)"):"Simplified Chinese"===d?(M="或",I="应为",C="。",m="(再次配置它)"):"Traditional Chinese"===d?(M="或",I="應為",C="。",m="(再次配置它)"):(M=" or ",I=" should be ",C=".",m="(configure it again)"),i=0,l=NUTOOL_PIN.g_cfg_shareBits.length;i>>0,P=x.slicePriorToX("["),f+=((Ge[P]&c)>>>T)*Math.pow(2,t-1);for(N=we[_],g=0,p=ji(u,parseInt(u.sliceAfterX("."),10)),t=1,s=NUTOOL_PIN.g_cfg_gpios[p].f.length;t>>0,P=x.slicePriorToX("["),Ge[P]&c))for(c=1<>>0,r=1,a=NUTOOL_PIN.g_cfg_gpios[p].f.length;r"}}}k||e("shareBit",b)}return void 0!==Xe.USB&&-1!==(h=we.join()).indexOf("USB_D+")&&-1!==h.indexOf("USB_D-")&&-1===h.indexOf("USB_OTG_ID")&&(k=!1,e("USB_OTG_ID",b)),k}function Cn(e,i){var n,t,r,l=localStorage.getItem("UIlanguage");if("shareBit"===e)void 0===l||null==l?(n="Shared Bits Error",t="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.

"+i+"
Unless they are all fixed, the operations of saving configuration, generating code and printing report will not be permitted.",r="Confirm"):"Simplified Chinese"===l?(n="共享位元错误",t="一些寄存器位元可能被复数个多功能给设置。这些位元称之为共享位元。下面共享位元与多功能组成的对应关系会是不正确的。

"+i+"
除非它们都被修正,否则存档丶产生程式码及印出报告这些操作将不被允许。",r="确定"):"Traditional Chinese"===l?(n="共享位元錯誤",t="一些暫存器位元可能被複數個多功能給設置。這些位元稱之為共享位元。下面共享位元與多功能組成的對應關係會是不正確的。

"+i+"
除非它們都被修正,否則存檔、產生程式碼及印出報告這些操作將不被允許。",r="確定"):(n="Shared Bits Error",t="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.

"+i+"
Unless they are all fixed, the operations of saving configuration, generating code and printing report will not be permitted.",r="Confirm");else{if("USB_OTG_ID"!==e)return;void 0===l||null==l?(n="Incorrect USB Settings",t="USB_OTG_ID must be configured when enabling USB.",r="Confirm"):"Simplified Chinese"===l?(n="不正确的USB设置",t="当USB开启时,USB_OTG_ID必须被设置。",r="确定"):"Traditional Chinese"===l?(n="不正確的USB設置",t="當USB開啟時,USB_OTG_ID必須被設置。",r="確定"):(n="Incorrect USB Settings",t="USB_OTG_ID must be configured when enabling USB.",r="Confirm")}On(),$('

'+t+'

').dialog({modal:!1,resizable:!1,title:n,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#showPinErrorDialog").dialog("destroy")},buttons:[{text:r,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy")}}]}),n=null,t=null,r=null,l=null}function mn(e,i){var n,t,r,l,o=localStorage.getItem("UIlanguage");if("shareBit"===e)void 0===o||null==o?(n="Shared Bit Error",t="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.

"+i+"
If you still want to close the application, please press Close. But all the configuration will be restored to the default.If you want to fix them, please press Fix.",r="Close",l="Fix"):"Simplified Chinese"===o?(n="共享位元错误",t="一些寄存器位元可能被复数个多功能给设置。这些位元称之为共享位元。下面共享位元与多功能组成的对应关系会是不正确的。

"+i+"
若你仍想要关掉应用程式,请按'关闭'。但所有设置将会回复到初始值。若你想要修正他们,请按'修正'。",r="关闭",l="修正"):"Traditional Chinese"===o?(n="共享位元錯誤",t="一些暫存器位元可能被複數個多功能給設置。這些位元稱之為共享位元。下面共享位元與多功能組成的對應關係會是不正確的。

"+i+"
若你仍想要關掉應用程式,請按'關閉'。但所有設置將會回復到初始值。若你想要修正他們,請按'修正'。",r="關閉",l="修正"):(n="Shared Bit Error",t="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.

"+i+"
If you still want to close the application, please press Close. But all the configuration will be restored to the default.If you want to fix them, please press Fix.",r="Close",l="Fix");else{if("USB_OTG_ID"!==e)return;void 0===o||null==o?(n="Incorrect USB Settings",t="USB_OTG_ID must be configured when enabling USB.",r="Close",l="Fix"):"Simplified Chinese"===o?(n="不正确的USB设置",t="当USB开启时,USB_OTG_ID必须被设置。",r="关闭",l="修正"):"Traditional Chinese"===o?(n="不正確的USB設置",t="當USB開啟時,USB_OTG_ID必須被設置。",r="關閉",l="修正"):(n="Incorrect USB Settings",t="USB_OTG_ID must be configured when enabling USB.",r="Close",l="Fix")}On(),$('

'+t+'

').dialog({modal:!1,resizable:!1,title:n,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#showPinErrorDialog").dialog("destroy")},buttons:[{text:r,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy"),Mn(),Di(),window.external.closeFromJS()}},{text:l,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy")}}]}),n=null,t=null,r=null,o=null}function Un(e){var i,n,t,r,l,o,s=!0,a=[];if($("#rootTree_Pin").is(":visible")){for(i=0,n=(a=Qi(Ge)).length;iWould you like to save it?",l="Yes",o="No"),On(),$('

'+r+'

').dialog({modal:!0,draggable:!1,resizable:!1,title:t,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#warningForSavingDialog").dialog("destroy")},buttons:[{text:l,click:function(){if(In(Cn))try{external.saveConfigFromJS("NUC_BROWSE_PROJECT_PATH")}catch(e){}e(),$("#warningForSavingDialog").dialog("isOpen")&&$("#warningForSavingDialog").dialog("destroy")}},{text:o,click:function(){e(),wn(),$("#warningForSavingDialog").dialog("isOpen")&&$("#warningForSavingDialog").dialog("destroy")}}]}),t=null,r=null,l=null,o=null),s=null,a=[]}}function bn(e){var i,n,t,r,l,o,s,a,d="",c=localStorage.getItem("UIlanguage");for(void 0===c||null==c?(i="Adjustment of the Conflict",n="Some modules have been adjusted. The others unable to adjust have been removed. Here is the list:
",t=" Pin",r="",l="from",s="Undo",a="Confirm"):"Simplified Chinese"===c?(i="冲突的调整",n="一些模组已被调整,其它无法调整的已被移除。列表如下:
",t="第",r="脚位",l="从",o="已移除",s="复原",a="确定"):"Traditional Chinese"===c?(i="衝突的調整",n="一些模組已被調整,其它無法調整的已被移除。列表如下:
",t="第",r="腳位",l="從",o="已移除",s="復原",a="確定"):(i="Adjustment of the Conflict",n="Some modules have been adjusted. The others unable to adjust have been removed. Here is the list:
",t=" Pin",r="",l="from",o=" has been removed",s="Undo",a="Confirm");-1!==e.indexOf(";");)d=e.sliceAfterX("/").slicePriorToX(";"),-1!==e.slicePriorToX(";").indexOf("removed")?(d="",e.slicePriorToX(":")!==we[parseInt(e.sliceAfterX(":").slicePriorToX("/"),10)-1]&&(n+=""+tn(e.slicePriorToX(":"))+":"+t+nn(e.sliceAfterX(":").slicePriorToX("/"))+r+o+"
",n+=tn(we[parseInt(e.sliceAfterX(":").slicePriorToX("/"),10)-1])+":"+t+nn(e.sliceAfterX(":").slicePriorToX("/"))+r+"
")):-1!==e.slicePriorToX(";").indexOf("end")?(d="",n+=tn(e.slicePriorToX(":"))+":"+t+nn(e.sliceAfterX(":").slicePriorToX("/"))+r+"
"):n+=tn(e.slicePriorToX(":"))+":"+t+nn(e.sliceAfterX(":").slicePriorToX("/"))+r+"("+l+t+nn(e.sliceAfterX("/").slicePriorToX(";"))+r+")
",e=e.sliceAfterX(";");""!==d&&(n+=tn(we[parseInt(d,10)-1])+":"+t+nn(d)+r+"
"),On(),$('

'+n+'

').dialog({modal:!1,resizable:!1,title:i,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#adjustedModulesDialog").dialog("destroy")},buttons:[{text:s,click:function(){!function(){var e,i,n=Qi(Ge);for(ni=!0,Be=[],e=0,i=n.length;e '+t+' '+e+' '+r+' '+((p=new Date).getMonth()+1+"/"+p.getDate()+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())+" ",h=o.slicePriorToX("("),O+='
'+s+'
'+a+' '+l+'
'+d+' '+h+'
'+c+' '+NUTOOL_PIN.g_packageNumber+"
",O+="






",O+="
",null!==i&&(-1!==i.indexOf("checkbox_byChipView")&&(O=function(e,i){var n,t,r,l,s,a,d,c,f,g,_,u,N,O,p,h,x,P,T,M=0;if($("#panel")[0].appendChild(Zi("canvas","NUC_ChipView_Canvas")),(r=$("#NUC_ChipView_Canvas")[0]).setAttribute("style","z-index:1; position:absolute; left:0px; top:0px; border: 1px solid white;"),l=30,a=(s=200)+H+Q+de+H+de/4,d=s+H+de+H+s,r.setAttribute("width",a),r.setAttribute("height",d),(c=ge.getContext(r)).scale(.85,.85),f=s+H+Q,g=s+H,-1!==o.indexOf("SOP")){f-=l,c.strokeRect(f,g,de/2,de),c.fillStyle="white",c.fillRect(f,g,de/2,de),c.beginPath(),c.arc(f+10,g+10,5,0,2*Math.PI,!0),c.stroke(),P=1;do{P+=1,c.font=P+"px Arial Black"}while(c.measureText(Oe).widthP&&(T=P,c.font="bold "+T+"px Calibri"),M=T/2+5,c.save(),c.translate(f+de/4-M,g+de/2-c.measureText(_).width/2),c.rotate(Math.PI/2),c.fillText(_,0,0),c.restore(),P=1;do{P+=1,c.font="bold "+P+"px Calibri"}while(c.measureText(NUTOOL_PIN.g_packageNumber).width4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N,O+4*K/5,H,K),N=f+de/2,O=g+de-Z-K-n*(K+z)+4*K/5,p=c.measureText((n+1+v/2).toString()),c.strokeText((n+1+v/2).toString(),N-p.width-q,O),""!==we[n+v/2]&&(x=tn(we[n+v/2]),N=f+de/2+H+J,c.fillText(x,N,O)),N=f+de/2,O=g+de-Z-K-n*(K+z),c.strokeRect(N,O,H,K),c.fillStyle=$e[1].savedPinPadColor[n],c.fillRect(N,O,H,K),!$i(h=(h=ve[n+v/2]).slicePriorToX("/"))&&h.length>4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N,O+4*K/5)}else if(-1!==o.indexOf("WLCSP")||-1!==o.indexOf("BGA")){for(f-=l,c.lineWidth=2,c.strokeRect(f,g,de,de),c.fillStyle="white",c.fillRect(f,g,de,de),c.beginPath(),c.arc(f+10,g+de-10,5,0,2*Math.PI,!0),c.stroke(),c.font=B,c.fillStyle="black",n=0,t=X;n6&&(h=h.slice(0,6)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N-c.measureText(h).width/2,O+parseInt(c.font,10)/2)}else{f-=l,c.strokeRect(f,g,de,de),c.fillStyle="white",c.fillRect(f,g,de,de),c.beginPath(),c.arc(f+10,g+de-10,5,0,2*Math.PI,!0),c.stroke(),P=1;do{P+=1,c.font=P+"px Arial Black"}while(c.measureText(Oe).widthP&&(T=P,c.font="bold "+T+"px Calibri"),M=T/2+10,c.fillText(_,f+de/2-c.measureText(_).width/2,g+de/2+M),P=1;do{P+=1,c.font="bold "+P+"px Calibri"}while(c.measureText(NUTOOL_PIN.g_packageNumber).width4&&(h=h.slice(0,4)+".."),O+=H,c.font=B,c.fillStyle="black",c.save(),c.translate(N,O),c.rotate(-Math.PI/2),c.fillText(h,Y,4*K/5),c.restore();for(u=Math.floor((E-D)/2),n=0,t=D;n4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N,O+4*K/5);for(u=Math.floor((E-w)/2),n=0,t=w;n4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",O+=H,c.save(),c.translate(N,O),c.rotate(-Math.PI/2),c.textAlign="end",c.fillText(h,H,4*K/5),c.restore();for(u=Math.floor((E-F)/2),n=0,t=F;n4&&(h=h.slice(0,4)+".."),c.font=B,c.fillStyle="black",c.fillText(h,N,O+4*K/5,H,K)}ii||(e+="

"+i+"

",e+='',e+="
",null);return $("#NUC_ChipView_Canvas").remove(),f+=l,n=null,t=null,r=null,l=null,f=null,g=null,s=null,a=null,d=null,c=null,null,_=null,u=null,N=null,O=null,h=null,null,P=null,T=null,M=null,e}(O,f)),-1!==i.indexOf("checkbox_byRegister")&&(O=function(e,i){var n,t,r=[];for(e+='",(r=Qi(Ge)).sort(),n=0,t=r.length;n";return e+="
'+i+"
'+r[n]+' 0x'+zi(Ge[r[n]]).toUpperCase()+"
",n=null,t=null,e}(O,N)),-1!==i.indexOf("checkbox_byPin")&&(O=function(e,i){var n,t=e,r=!0;for(e+='",n=1;n<=v;n+=1)""!==we[n-1]&&(e+='",r=!1);e+="
'+i+"
Pin'+nn(n)+' '+tn(we[n-1])+"
",r&&(e=t);return t=null,r=null,e}(O,g)),-1!==i.indexOf("checkbox_byModule")&&(O=function(e,i){var n,t,r,l,o,s,a,d=e,c=!0,f=[],g=[];for(n=1;n<=v;n+=1)""!==we[n-1]&&(s=n,-1!==(a=o=we[n-1]).indexOf("_")&&(a=a.slicePriorToX("_")),void 0===f[a=Ri(a)]?(f[a]=[],f[a][0]=tn(o)+"(Pin:"+nn(s)+")"):f[a].push(tn(o)+"(Pin:"+nn(s)+")"),c=!1);for(g=Qi(f),e+='",n=0,r=g.length;n";e+="
'+i+"
'+g[n]+' '+f[g[n]][t]+"
",c&&(e=d);return n=null,t=null,r=null,l=null,f=[],g=[],d=null,c=null,o=null,s=null,a=null,e}(O,_)),-1!==i.indexOf("checkbox_byGPIO")&&(O=function(e,i){var n,t,r,l,o,s,a,d,c=e,f=!0,g=[],_=[];for(n=1;n<=v;n+=1)""!==we[n-1]&&(s=n,o=tn(we[n-1]),void 0===g[a=Ri(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1])]?(g[a]=[],g[a][0]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1]+": "+o+"(Pin:"+nn(s)+")"):g[a].push(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][s-1]+": "+o+"(Pin:"+nn(s)+")"),f=!1);for(_=Qi(g).sort(di),e+='",n=0,r=_.length;n";e+="
'+i+"
'+(d=g[_[n]][t]).slicePriorToX(":")+' '+d.sliceAfterX(": ")+"
",f&&(e=c);return n=null,t=null,r=null,l=null,g=[],_=[],c=null,f=null,o=null,s=null,a=null,d=null,e}(O,u))),O+="",O+="",(x=window.open("dummy.htm","",P)).document.open(),x.document.write(O),x.document.close(),x.moveTo(0,0),x.focus(),x.print(),n=null,t=null,r=null,s=null,a=null,d=null,c=null,f=null,g=null,_=null,u=null,N=null,p=null,O=null,h=null,x=null,P=null}function kn(e){for($("#ChipTypeSelect").val(e),l=e,t=null,i=0,max=NUTOOL_PIN.g_cfg_chips.length;i";for(0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(r="GPIO_MD->"),d="",(t=Qi(Ge)).sort(),e=0,i=t.length;e"+Ve[n]+"\r\n");M="LockedPins="+JSON.stringify(Ze)+"\r\n",e=null,i=null,t=[],n=null}function Dn(){var e,i,n,t,r,l,o,s,a,d,c=[];for(N="Pin,Current Multi Function,Group\r\n",e=0,i=1;e\{\}\[\]\\\/]/gi,"_"):NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e],s=null==NUTOOL_PIN.g_cfg_OrCAD[NUTOOL_PIN.g_packageNumberIndex]?"":NUTOOL_PIN.g_cfg_OrCAD[NUTOOL_PIN.g_packageNumberIndex][e],-1===l.indexOf("NC_ToolNotShow")&&(N+=nn(e+1)+","+l+","+s+"\r\n",$i(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e])&&""!==we[e]&&((d={}).id=i,d.pin=nn(e+1),d.pinName=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e],d.pinNumber=e+1,d.description=we[e],void 0!==Ve[we[e]]&&""!==Ve[we[e]].trim()?d.userDefined=Ve[we[e]]:d.userDefined="",i+=1,c.push(d)));for(N+="\r\nPin,Description,Group\r\n",e=0;e","|"],o=!0;for(n=0,t=l.length;n").insertAfter($("#generateCodeDialogMainPart_div")),m=Dn(),_=m.length>10?"282px":"100%",m.length>0?(C=new Tabulator("#reviewReportTable",{height:_,data:m,layout:"fitColumns",columns:[{title:h,field:"pin",headerFilter:!0},{title:x,field:"pinName",headerFilter:!0},{title:P,field:"description",headerFilter:!0},{title:T,field:"userDefined",headerFilter:!0,editor:!0,validator:["regex:^[a-zA-Z0-9 _]+$","maxLength:30"],tooltip:M}],cellEdited:function(e){En(e._cell.row.data.pinNumber,e._cell.row.data.description,e._cell.value)},langs:{Simplified:{headerFilters:{default:"过滤"}},Traditional:{headerFilters:{default:"過濾..."}},English:{headerFilters:{default:"filter..."}}}}),-1!==Ne.indexOf("Simplified")?C.setLocale("Simplified"):-1!==Ne.indexOf("Traditional")?C.setLocale("Traditional"):C.setLocale("English")):0===m.length&&(C=new Tabulator("#reviewReportTable",{height:_,placeholder:I}))},!1!==In(Cn)){if(void 0===U||null==U?(t="Generate Code",r="User Defined Functions",o="Project Name","Please input a folder path for storing the generated code:",s="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",O="Or you can choose a folder from recent projects","Browse",d="Modularize Code",f="Review Report",u="Confirm"):(null==localStorage.getItem("CheckCriteriaPin")&&"No",null==localStorage.getItem("CheckCriteriaModule")&&"No",null==localStorage.getItem("CheckCriteriaGPIO")&&"No",null!=(b=localStorage.getItem("CheckModularizeCode"))&&"No"!==b||(b="No",N=""),null==(L=localStorage.getItem("ProjectName"))&&(L=""),null==localStorage.getItem("ProjectLocation")&&"",null==(k=localStorage.getItem("ProjectLocationHistory"))&&(k=""),"Simplified Chinese"===U?(t="产生程式码",r="用户定义功能",o="工程名称","请输入文件夹路径,用于存放生成的代码:",s="请注意,本软件不能取代技术参考手册或规格书。用户必须参考最新文档以确保正确性。",O="或是您可以从最近的工程中选择一个","浏览",d="模组化代码",f="检阅报告",u="确定"):"Traditional Chinese"===U?(t="產生程式碼",r="用戶定義功能",o="專案名稱","請輸入資料夾路徑,用於存放生成的程式碼:",s="請注意,本軟件不能取代技術參考手冊或規格書。用戶必須參考最新文檔以確保正確性。",O="或是您可以從最近的專案中選擇一個","瀏覽",d="模組化程式碼",f="檢閱報告",u="確定"):(t="Generate Code",r="User Defined Functions",o="Project Name","Please input a folder path for storing the generated code:",s="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",O="Or you can choose a folder from recent projects","Browse",d="Modularize Code",f="Review Report",u="Confirm")),""===L.trim()&&(L="MyProject"),""!==k.trim()){for('
"}0===l.indexOf("M55M1")||-1===["CM1003","ML51","ML5156","ML56","MG51","MG51_32K","MG51_64K","MS51_8K","MS51_8KDB","MS51_16K","MS51_32K","MUG51","N76S003","N76E003"].indexOf(l)&&0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length>1&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:")?c="checkbox":(d="",c="hidden",N=""),On(),void 0===e?(a='


",a+='
',$('
'+a+"
").dialog({modal:!1,resizable:!1,title:t,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#generateCodeDialog").dialog("destroy")},create:function(e,i){var n=$(this).dialog("widget").find(".ui-dialog-buttonpane");$("html").hasClass("ie10+")?$("
"+d+""+f+"
").prependTo(n):$("
").prependTo(n)},buttons:[{id:"generateCodeDialog_buttonOk",text:u,click:function(){localStorage.setItem("ProjectName",$("#inputText_projectName").val()),$("#checkbox_ModularizeCode").is(":checked")?localStorage.setItem("CheckModularizeCode","Yes"):localStorage.setItem("CheckModularizeCode","No"),$("#generateCodeDialog_buttonOk").button("disable"),""===$("#inputText_projectName").val().trim()&&$("#inputText_projectName").val("MyProject");try{Xn()}catch(e){}$("#generateCodeDialog").dialog("isOpen")?$("#generateCodeDialog").dialog("destroy"):$("#generateCodeDialog_buttonOk").button("enable")}}]})):0===e.indexOf("userDefined")&&(a='
',$('
'+a+"
").dialog({modal:!1,resizable:!1,title:r,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#generateCodeDialog").dialog("destroy")},buttons:[{id:"generateCodeDialog_buttonOk",text:u,click:function(){-1!==e.indexOf("runAnotherTool")?Wn():$("#generateCodeDialog").dialog("isOpen")&&$("#generateCodeDialog").dialog("destroy")}}]}),g()),$("#generateCodeDialogInput").keypress((function(e){if(22===e.which)$("#generateCodeDialogInput").val(window.clipboardData.getData("Text"))})),$("#generateCodeDialogBrowseFolder").click((function(){""===$("#inputText_projectName").val().trim()&&$("#inputText_projectName").val("MyProject");try{Xn()}catch(e){}""!==NUTOOL_PIN.g_pinFunctionString&&-1!==NUTOOL_PIN.g_pinFunctionString.indexOf(":")&&$("#generateCodeDialogInput").val(NUTOOL_PIN.g_pinFunctionString),$("#generateCodeDialog").focus()})),$("#generateCodeDialogSelect").change((function(){"default"!==$("#generateCodeDialogSelect").val()&&($("#generateCodeDialogInput").val($("#generateCodeDialogSelect").val()),$("#generateCodeDialogSelect").val($("#generateCodeDialogSelect option:first-child").val()))})),$("#checkbox_ReviewReport").change((function(){$("#checkbox_ReviewReport").is(":checked")?(g(),$("#generateCodeDialogMainPart_div").hide(),$("#generateCodeDialog_buttonOk").button("disable")):($("#reviewReportTable").remove(),$("#generateCodeDialogMainPart_div").show(),$("#generateCodeDialog_buttonOk").button("enable"))}))}}function Xn(){if("Yes"==localStorage.getItem("CheckCriteriaPin")&&Bn(),"Yes"==localStorage.getItem("CheckCriteriaModule")&&Gn(),"Yes"==localStorage.getItem("CheckCriteriaGPIO")&&Rn(),Ki(),-1==a.indexOf(".h")){Hi();var i=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.c\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\n *\r\n/********************\r\nMCU:${o}\r\n`+(null==O?"":`Pin Configuration:\r\n${O}`)+(null==p?"":`Module Configuration:\r\n${p}`)+(null==h?"":`GPIO Configuration:\r\n${h}`)+"********************/\r\n\r\n"+`${a}\r\n`+`${d}`+`/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,n=new Blob([i],{type:"text/plain;charset=utf-8"});saveAs(n,`${$("#inputText_projectName").val()}.dts`)}if($("#checkbox_ModularizeCode").is(":checked")){Wi();var t=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.c\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\n\r\n/********************\r\nMCU:${o}\r\n`+(null==O?"":`Pin Configuration:\r\n${O}`)+(null==p?"":`Module Configuration:\r\n${p}`)+(null==h?"":`GPIO Configuration:\r\n${h}`)+"********************/\r\n\r\n"+`${a}`+(null==T?"":`\r\n${T}`)+`${d}`+`\r\n\r\n/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,r=new Blob([t],{type:"text/plain;charset=utf-8"});saveAs(r,`${$("#inputText_projectName").val()}.c`);var l=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.h\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\n\r\n#ifndef __${$("#inputText_projectName").val().toUpperCase()}_H__\r\n#define __${$("#inputText_projectName").val().toUpperCase()}_H__\r\n\r\n#ifdef __cplusplus\r\nextern "C"\r\n{\r\n#endif\r\n${c}#ifdef __cplusplus\r\n}\r\n#endif\r\n#endif /*__${$("#inputText_projectName").val().toUpperCase()}_H__*/\r\n\r\n/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,s=new Blob([l],{type:"text/plain;charset=utf-8"});saveAs(s,`${$("#inputText_projectName").val()}.h`)}else{Hi();t=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.c\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\n\r\n/********************\r\nMCU:${o}\r\n`+(null==O?"":`Pin Configuration:\r\n${O}`)+(null==p?"":`Module Configuration:\r\n${p}`)+(null==h?"":`GPIO Configuration:\r\n${h}`)+"********************/\r\n\r\n"+`${a}`+(null==T?"":`\r\n${T}`)+"/*\r\n * @brief This function provides the configured MFP registers\r\n * @param None\r\n * @return None\r\n */\r\nvoid SYS_Init(void)\r\n{\r\n"+`${d}\r\n return;\r\n}\r\n\r\n`+`/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,r=new Blob([t],{type:"text/plain;charset=utf-8"});saveAs(r,`${$("#inputText_projectName").val()}.c`)}yn();var f=`/****************************************************************************\r\n * @file ${$("#inputText_projectName").val()}.ncfg\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} config file\r\n *\r\n * @note Please do not modify this file.\r\n * Otherwise, it may not be loaded successfully.\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\nMCU:${o}\r\n${_}${u}${T}${d}${M}/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,g=new Blob([f],{type:"text/plain;charset=utf-8"});saveAs(g,`${$("#inputText_projectName").val()}.ncfg`)}function Bn(e){var i;for(O="",i=1;i<=v;i+=1)""!==we[i-1]&&(O+=void 0!==e&&"primitiveDescription"===e?"Pin"+nn(i)+":"+we[i-1]+"\r\n":"Pin"+nn(i)+":"+tn(we[i-1])+"\r\n");i=null}function Gn(){var e,i,n,t,r,l,o,s=[],a=[];for(e=1;e<=v;e+=1)""!==we[e-1]&&(l=e,-1!==(o=r=we[e-1]).indexOf("_")&&(o=o.slicePriorToX("_")),void 0===s[o=Ri(o)]?(s[o]=[],s[o][0]=tn(r)+"(Pin:"+nn(l)+")"):s[o].push(tn(r)+"(Pin:"+nn(l)+")"));for(p="",e=0,n=(a=Qi(s)).length;e

'+n+'

'+a+'



'):$('

'+n+'


'+a+'



')).dialog({modal:!0,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#printReportDialog").dialog("destroy")},buttons:[{text:d,click:function(){$("#checkbox_byChipView").is(":checked")&&(c="checkbox_byChipView/"),$("#checkbox_byRegister").is(":checked")&&(c+="checkbox_byRegister/"),$("#checkbox_byPin").is(":checked")&&(c+="checkbox_byPin/"),$("#checkbox_byModule").is(":checked")&&(c+="checkbox_byModule/"),$("#checkbox_byGPIO").is(":checked")&&(c+="checkbox_byGPIO/"),Ln($("#inputText_projectName").val(),c),$("#printReportDialog").dialog("isOpen")&&$("#printReportDialog").dialog("destroy")}}]}),null,e=null,null,null,n=null,t=null,l=null,o=null,s=null,d=null,null,f=null,c=null)}function Hn(){if(In(Cn))try{Dn();var i=`/****************************************************************************\r\n * @file ${o}.csv\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} pin descriptions file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\nMCU:${o}\r\n${N}/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,n=new Blob([i],{type:"text/plain;charset=utf-8"});saveAs(n,`${o}.csv`)}catch(e){console.log("saveConfig failed, meg:"+e)}}function Wn(){var i,n,t,r,l,s,a,d,c="NuCAD";!1!==In(Cn)&&(d=localStorage.getItem("UIlanguage"),$("#rootTree_Pin").is(":visible")&&(void 0!==NUTOOL_PIN.g_anotherNameForNuCAD&&""!==NUTOOL_PIN.g_anotherNameForNuCAD&&(c=NUTOOL_PIN.g_anotherNameForNuCAD),void 0===d||null==d?(i="Run "+c,n="Select a tool to run.",t="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",s="Use NC pin to present a unconfigured pin",r="User Defined Functions",a="Confirm","Leave"):"Simplified Chinese"===d?(i="执行"+c,n="选择一个工具来执行。",t="请注意,本软件不能取代技术参考手册或规格书。用户必须参考最新文档以确保正确性。",s="使用NC脚位来显示未配置的脚位",r="用户定义功能",a="确定","离开"):"Traditional Chinese"===d?(i="執行"+c,n="選擇一個工具來執行。",t="請注意,本軟件不能取代技術參考手冊或規格書。用戶必須參考最新文檔以確保正確性。",s="使用NC腳位來顯示未配置的腳位",r="用戶定義功能",a="確定","離開"):(i="Run "+c,n="Select a tool to run.",t="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",s="Use NC pins to present unconfigured pins",r="User Defined Functions",a="Confirm","Leave"),On(),l='

'+n+'



"+t+"

",l+='
',$(l).dialog({modal:!1,draggable:!0,resizable:!1,title:i,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#runAnotherToolDialog").dialog("destroy")},create:function(e,i){var n=$(this).dialog("widget").find(".ui-dialog-buttonpane");$("html").hasClass("ie10+")&&$("
").prependTo(n)},buttons:[{id:"runAnotherToolDialog_buttonOk",text:a,click:function(){$("input").each((function(){if("RunAnotherTool"===this.name&&!0===this.checked){var i=!1;$("#checkbox_useNCpin").is(":checked")&&(i=!0),Dn();var n="NuCAD";-1!=NUTOOL_PIN.g_anotherNameForNuCAD.indexOf("CAD")&&(n=NUTOOL_PIN.g_anotherNameForNuCAD);var t=`/****************************************************************************\r\n * @file ${n}.csv\r\n * @version ${e}\r\n * @Date ${new Date}\r\n * @brief ${pe} generated code file\r\n *\r\n * SPDX-License-Identifier: Apache-2.0\r\n *\r\n * Copyright (C) 2013-${(new Date).getFullYear()}${he} All rights reserved.\r\n*****************************************************************************/\r\nMCU:${o}\r\n${N}`+(i?"UseNCPin\r\n":"")+`/*** (C) COPYRIGHT 2013-${(new Date).getFullYear()}${he} ***/\r\n`,r=new Blob([t],{type:"text/plain;charset=utf-8"});saveAs(r,`${n}.csv`),window.electronAPI.send("runNuCAD")}})),$("#runAnotherToolDialog").dialog("isOpen")&&$("#runAnotherToolDialog").dialog("destroy")}}]}),$("#checkbox_ReviewReport").change((function(){$("#checkbox_ReviewReport").is(":checked")&&jn("userDefined_runAnotherTool")}))))}function zn(){ei?xe.readyState?xe.send("q"):Mi("连线尚未稳定,请稍后再试。","連線尚未穩定,請稍後再試。","The connection is not stable. Please try it later."):((xe=new WebSocket("ws://127.0.0.1:5555","openocd-nuvoton-protocol")).onopen=function(){ei=!0,xe.readyState?xe.send("q"):Mi("连线尚未稳定,请稍后再试。","連線尚未穩定,請稍後再試。","The connection is not stable. Please try it later.")},xe.onerror=function(){!1===ei?Mi("请检查NuEclipse是否进入了调试模式。如果没有,PinConfig将无法连接到目标芯片。","請檢查NuEclipse是否進入了調試模式。如果沒有,PinConfig將無法連接到目標晶片。","Please check that NuEclipse has entered the debug mode. If not, PinConfig will not be able to connect to a target chip."):Mi("NuEclipse退出了调试模式。","NuEclipse退出了調試模式。","NuEclipse leaved the debug mode."),ei=!1,xe=null},xe.onmessage=function(e){0===e.data.indexOf("q")?(!function(e){var i;"UNKNOWN"!==(e=e.slice(1)).toUpperCase()&&((i=wi(e))!==l?(oldfilename="NUC_"+l+"_Content.js",newfilename="NUC_"+i+"_Content.js",Nn(oldfilename,newfilename,"js",kn(i))):$n())}(e.data),xe.send(function(){var e,i,n,t="m";for(e=0,i=(n=Qi(NUTOOL_PIN.g_cfg_regDescriptions)).length;e=C+5&&(Le=10*Math.floor(Le/10)-5,Pn())}function Qn(){Un((function(){Mn()})),wn()}function qn(){var e,i,n,t,l,o,s,a,d,c,f,g,_,u,N,O="",p="",h="",x="",P="",T="checked=true",M="checked=true",I="checked=true",C="",m="",U="";N=localStorage.getItem("DisplayTooltip"),u=localStorage.getItem("UIlanguage"),$("#rootTree_Pin").is(":visible")&&(void 0===u||null==u?(e="Settings",i="1. Select one of the following languages displayed in UI.",n="2. Display a tooltip.",t="3. Select the criteria by which the configured information is being cataloged.",l="English",o="Simplified Chinese",s="Traditional Chinese",a="Yes",d="No",O="checked",c="Pin",f="Module",g="GPIO",_="Confirm","Leave"):(null!=(C=localStorage.getItem("CheckCriteriaPin"))&&"No"!=C||(T=""),null!=(m=localStorage.getItem("CheckCriteriaModule"))&&"No"!=m||(M=""),null!=(U=localStorage.getItem("CheckCriteriaGPIO"))&&"No"!=U||(I=""),"Simplified Chinese"===u?(e="设定",i="1. 从下面选取一个语言显示在操作介面上。",n="2. 显示提示框。",t="3. 选择用来分类配置资讯的标准。",l="英文",o="简体中文",s="繁体中文",a="要",d="不要",p="checked",c="脚位",f="模組",g="多工泛用脚位",_="确定","离开"):"Traditional Chinese"===u?(e="設定",i="1. 從下面選取一個語言顯示在操作介面上。",n="2. 顯示提示框。",t="3. 選擇用來分類配置資訊的標準。",l="英文",o="简體中文",s="繁體中文",a="要",d="不要",h="checked",c="腳位",f="模組",g="多工泛用腳位",_="確定","離開"):(e="Settings",i="1. Select one of the following languages displayed in UI.",n="2. Display a tooltip.",t="3. Select the criteria by which the configured information is being cataloged.",l="English",o="Simplified Chinese",s="Traditional Chinese",a="Yes",d="No",O="checked",c="Pin",f="Module",g="GPIO",_="Confirm","Leave")),null==N||"No"==N?P="checked":x="checked",On(),$('

'+i+'




"+n+'



"+t+'



').dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#languageDialog").dialog("destroy")},buttons:[{text:_,click:function(){$("input").each((function(){"UIlanguage"===this.name&&!0===this.checked?(localStorage.setItem("UIlanguage",$(this).val()),Jn()):"DisplayTooltip"===this.name&&!0===this.checked&&(localStorage.setItem("DisplayTooltip",$(this).val()),r="No"!==$(this).val())})),$("#checkbox_byPin").is(":checked")?localStorage.setItem("CheckCriteriaPin","Yes"):localStorage.setItem("CheckCriteriaPin","No"),$("#checkbox_byModule").is(":checked")?localStorage.setItem("CheckCriteriaModule","Yes"):localStorage.setItem("CheckCriteriaModule","No"),$("#checkbox_byGPIO").is(":checked")?localStorage.setItem("CheckCriteriaGPIO","Yes"):localStorage.setItem("CheckCriteriaGPIO","No"),ft(),$("#languageDialog").dialog("isOpen")&&$("#languageDialog").dialog("destroy")}}]}))}function Jn(){var e,i,n,t,r,l,o,s,a;Ui(),"Simplified Chinese"===Ne?(e="芯片系列:",i="型号:",n="MFP寄存器",t="支援模组",r="搜寻..",et("ID_BUTTON_SHOW_REGISTERS","开关选择区域和MFP寄存器树状图"),et("ID_BUTTON_LOAD","读取配置档"),et("ID_BUTTON_SAVE","存放配置档"),et("ID_BUTTON_GENERATE_CODE","产生程式码"),et("ID_BUTTON_CONNECT_TO_TARGET","连线到目标芯片"),et("ID_BUTTON_PRINT_REPORT","印出报告"),et("ID_BUTTON_GENERATE_PIN_DESCRIPTIONS","产生脚位描述报告"),et("ID_BUTTON_RUN_NUCAD","执行NuCAD"),et("ID_BUTTON_SHOW_PIN_DESCRIPTIONS","开关管脚描述"),et("ID_BUTTON_ZOOM_IN","放大"),et("ID_BUTTON_BEST_FIT","最适大小"),et("ID_BUTTON_ZOOM_OUT","缩小"),et("ID_BUTTON_LOCK_PIN","锁定/解锁所有脚位"),et("ID_BUTTON_SHOW_LOCKED_PINS","锁定脚位列表"),et("ID_BUTTON_DISABLE","取消所有已选模组"),et("ID_BUTTON_LANGUAGE","设定"),et("ID_BUTTON_INSTRUCTION","阅读用户手册")):"Traditional Chinese"===Ne?(e="晶片系列:",i="型號:",n="MFP暫存器",t="支援模組",r="搜尋..",et("ID_BUTTON_SHOW_REGISTERS","開關選擇區域和MFP暫存器樹狀圖"),et("ID_BUTTON_LOAD","讀取配置檔"),et("ID_BUTTON_SAVE","存放配置檔"),et("ID_BUTTON_GENERATE_CODE","產生程式碼"),et("ID_BUTTON_CONNECT_TO_TARGET","連線到目標晶片"),et("ID_BUTTON_PRINT_REPORT","印出報告"),et("ID_BUTTON_GENERATE_PIN_DESCRIPTIONS","產生腳位描述報告"),et("ID_BUTTON_RUN_NUCAD","執行NuCAD"),et("ID_BUTTON_SHOW_PIN_DESCRIPTIONS","開關腳位描述"),et("ID_BUTTON_ZOOM_IN","放大"),et("ID_BUTTON_BEST_FIT","最適大小"),et("ID_BUTTON_ZOOM_OUT","縮小"),et("ID_BUTTON_LOCK_PIN","鎖定/解鎖所有腳位"),et("ID_BUTTON_SHOW_LOCKED_PINS","鎖定腳位列表"),et("ID_BUTTON_DISABLE","取消所有已選模組"),et("ID_BUTTON_LANGUAGE","設定"),et("ID_BUTTON_INSTRUCTION","閱讀用戶手冊")):(e="Chip Series:",i="Part No.:",t="Supported Modules",r="Search..",n="MFP Registers",et("ID_BUTTON_SHOW_REGISTERS","Switch Select Field and MFP-Registers TreeView"),et("ID_BUTTON_LOAD","Load Configuration"),et("ID_BUTTON_SAVE","Save Configuration"),et("ID_BUTTON_GENERATE_CODE","Generate Code"),et("ID_BUTTON_CONNECT_TO_TARGET","Connect to Target Chip"),et("ID_BUTTON_PRINT_REPORT","Print Report"),et("ID_BUTTON_GENERATE_PIN_DESCRIPTIONS","Generate Report of Pin Description"),et("ID_BUTTON_RUN_NUCAD","Run NuCAD"),et("ID_BUTTON_SHOW_PIN_DESCRIPTIONS","Switch Pin Description"),et("ID_BUTTON_ZOOM_IN","Zoom In"),et("ID_BUTTON_BEST_FIT","Best Fit"),et("ID_BUTTON_ZOOM_OUT","Zoom Out"),et("ID_BUTTON_LOCK_PIN","Lock/Unlock All the Pins"),et("ID_BUTTON_SHOW_LOCKED_PINS","Show Locked Pins List"),et("ID_BUTTON_DISABLE","Disable All Checked Modules"),et("ID_BUTTON_LANGUAGE","Settings"),et("ID_BUTTON_INSTRUCTION","Read User Manual")),$("#ChipType_span").text(e),$("#MCU_span").text(i),$("#mfpTree").jstree("rename_node",$("#mfp_tree"),n),$("#supportedModules_span").text(t),$("#searchInput_Pin")[0].setAttribute("style","font-family:Times Arial; position:absolute; left:"+($("#supportedModules_span").width()+10)+"px; width:"+(G-16-$("#supportedModules_span").width()-10)+"px; height: 16px;"),$("#searchInput_Pin").val(r),$("#searchInput_Pin").change((function(){xi(this.value)})),a=5,$("html").hasClass("ie10+")||(a=4),l=ge.getContext($("#NUC_PinConfiguration_Canvas")[0]),o=ce-Pe-H-Me-3,s=fe-Te-a*(K+Ie),l.fillStyle="#FFFFFF",l.fillRect(o,s,Pe+H+Me,Te+4*(K+Ie)),l=null,o=null,s=null,pn(),e=null,i=null,n=null,t=null,r=null}function et(e,i,n){null!=n&&null!=n||(n="top"),null!=document.querySelector(`#${e}`)&&null!=document.querySelector(`#${e}`)&&document.querySelector(`#${e}`)._tippy&&document.querySelector(`#${e}`)._tippy.destroy(),tippy(`#${e}`,{content:`${i}`,placement:`${n}`})}function it(){var e="NuCAD";void 0!==NUTOOL_PIN.g_anotherNameForNuCAD&&""!==NUTOOL_PIN.g_anotherNameForNuCAD&&(e=NUTOOL_PIN.g_anotherNameForNuCAD),Mi("您的电脑不能执行"+e+"因为它不在Content资料夹里面。","您的電腦不能執行"+e+"因為它不在Content資料夾裡面。","Your PC is incapable of executing "+e+" because it does not exist in the Content folder.")}function nt(e,i,n){var t,r,o,s,a,d,c,f,g,_,u,N,O=-1,p=!1;for(t=0,o=NUTOOL_PIN.g_cfg_gpios.length;t0&&(void 0===NUTOOL_PIN.g_cfg_gpioMatrix||0===NUTOOL_PIN.g_cfg_gpioMatrix.length)){for(p=!1,4,15,-1!==e.indexOf(".")&&(f=e.slice(0,e.indexOf(".")),g=e.slice(e.indexOf(".")+1)),"M451HD"===l||"M451LD"===l||"M4521"===l||"NUC121AE"===l||"M0564"===l||"M05641"===l||0===l.indexOf("NUC126")||"M071QV"===l||"NUC029xGE"===l||"NUC029KGE"===l||"NUC400"===l||0===l.indexOf("M46")||0===l.indexOf("M47")||"M433"===l||"M480MD"===l||"M480LD"===l||"AX58200"===l||0===l.indexOf("M25")||"NDA102"===l||"M261"===l||0===l.indexOf("M235")||0===l.indexOf("M029")||0===l.indexOf("M030")||0===l.indexOf("M031")||0===l.indexOf("M091")||"NANO103"===l||"NUC505"===l||"NUC123AE"===l||"MA35D0"===l||"MA35D1"===l||"MA35H0"===l||0===l.indexOf("M2003")||0===l.indexOf("N9H30")||0===l.indexOf("N9H31")||0===l.indexOf("NUC97")||0===l.indexOf("NUC98")||0===l.indexOf("M2A23")?f=parseInt(g)<8?"G"+f+"_MFPL":"G"+f+"_MFPH":"NANO100AN"===l||"NANO100BN"===l||"NANO112"===l?parseInt(g)<8?f+="_L_MFP":f+="_H_MFP":"NM1500"===l||"M0519"===l||"M051DN_DE"===l||"M051BN"===l||"M051AN"===l||"M058S"===l||"MINI51AN"===l||"MINI51DE"===l||"MINI55"===l||"MINI58"===l||"NUC029AE"===l||"NUC029TAE"===l||"NUC029AN"===l||"NM1200"===l?f+="_MFP":0===l.indexOf("ML5")||0===l.indexOf("MS51")||0===l.indexOf("MG51")||0===l.indexOf("MUG51")||0===l.indexOf("N76S003")||0===l.indexOf("N76E003")||0===l.indexOf("CM1003")?f+="MF76543210":f=0===l.indexOf("KM1M7")||0===l.indexOf("KM1M4")||0===l.indexOf("KM1M0")?"IO"+f+"MD":"G"+f+"_MFP",r=0,s=n.length;r>>0))>>>0>>>_>>>0===O){p=!0;break}}else if(O>0&&NUTOOL_PIN.g_cfg_gpioMatrix.length>0){for(t=0,o=NUTOOL_PIN.g_cfg_gpioMatrix.length;t=0;){for(f=NUTOOL_PIN.g_cfg_gpioMatrix[t].f[c+1],u=1<<(_=parseInt(f.slice(f.indexOf("[")+1,f.indexOf("]")),10))>>>0,g=f.slice(0,f.indexOf("[")),p=!1,r=0,s=n.length;r2))break;if(!((O-=Math.pow(2,c))>0))break;c=Math.floor(Math.log(O)/Math.log(2))}break}}else 0===O&&(p=!0);return p}function tt(){var e;for(i=0,max=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].length;i-1!=i.indexOf(e)))[0].slicePriorToX("-")}function at(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function dt(e){for(var i=0;i

'+i+"").dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#lockedWarningDialog").dialog("destroy")},buttons:[{text:n,click:function(){$("#lockedWarningDialog").dialog("isOpen")&&$("#lockedWarningDialog").dialog("destroy")}}]})}function ft(){var e;at()||localStorage.getItem("CheckPrivacyBannerDismiss")||(e="Simplified Chinese"===Ne?"本网站使用cookie作为与网站交互时识别流览器之用,浏览本网站即表示您同意本网站对cookie的使用":"Traditional Chinese"===Ne?"本網站使用cookie作為與網站互動時識別瀏覽器之用,瀏覽本網站即表示您同意本網站對cookie的使用":"This website uses cookies to ensure you get the best experience on our website.",$("#ID_PRIVACY_BANNER_TEXT").text(e),$("#ID_PRIVACY_BANNER_BUTTON").on("click",(function(){$("#ID_PRIVACY_BANNER_DIV").hide(),localStorage.setItem("CheckPrivacyBannerDismiss",!0)})),$("#ID_PRIVACY_BANNER_DIV").show())}window.onload=function(){rt(),$("#ID_BUTTON_SHOW_REGISTERS").on("click",(function(){An()})),$("#ID_BUTTON_LOAD").on("click",(function(){$("#rootTree_Pin").is(":visible")&&Un((function(){$("#loadConfiguration").trigger("click")}))})),$("#loadConfiguration").on("change",lt),$("#ID_BUTTON_SAVE").on("click",(function(){vn()})),$("#ID_BUTTON_GENERATE_CODE").on("click",(function(){jn()})),$("#ID_BUTTON_CONNECT_TO_TARGET").on("click",(function(){at()?window.electronAPI.send("connect"):async function(){var e;null!=b&&(await navigator.usb.getDevices().then((i=>{i.forEach((i=>{e=i}))})).catch((i=>{console.log(i),e=void 0})),null==e&&(e=await navigator.usb.requestDevice({filters:[{vendorId:1046}]}).catch((i=>{console.log(i),e=void 0}))),null!=e&&b.postMessage({action:"connect"}))}()})),$("#ID_BUTTON_PRINT_REPORT").on("click",(function(){Kn()})),$("#ID_BUTTON_GENERATE_PIN_DESCRIPTIONS").on("click",(function(){Hn()})),$("#ID_BUTTON_RUN_NUCAD").on("click",(function(){Wn()})),$("#ID_BUTTON_SHOW_PIN_DESCRIPTIONS").on("click",(function(){Fn()})),$("#ID_BUTTON_ZOOM_IN").on("click",(function(){Yn()})),$("#ID_BUTTON_BEST_FIT").on("click",(function(){Vn()})),$("#ID_BUTTON_ZOOM_OUT").on("click",(function(){Zn()})),$("#ID_BUTTON_LOCK_PIN").on("click",(function(){!function(){var e=[];for(i=0,max=ye.length;i{var i=e.slicePriorToX(":"),n=e.sliceAfterX(":"),t=n+"_Root";$("#moduleTree").jstree("open_node",$("#"+t)),$("#"+t).find("li").each((function(e,t){var r=$(t).attr("id");-1!=r.indexOf(i)&&-1!=r.indexOf(n)&&-1==Ze.indexOf(r)&&(Ze.push(r),document.querySelector(`#${r}`).style.background="orange")}))}))):($("#ID_IMAGE_LOCK_PIN").attr("src","./src/res/unlock.png"),Ze.forEach((e=>{var i=e.sliceAfterX(":")+"_Root";$("#moduleTree").jstree("open_node",$("#"+i)),document.querySelector(`#${e}`).style.background="transparent"})),Ze=[])}()})),$("#ID_BUTTON_SHOW_LOCKED_PINS").on("click",(function(){var e,i,n,t;n="",t=localStorage.getItem("UIlanguage"),On(),Ze.sort(),Ze.forEach((e=>{var i=e.sliceAfterX("Pin");n=n+e.slicePriorToX("_Pin")+"(Pin: "+i+")
"})),void 0===t||null==t?(e="Locked Pins",i="Confirm"):"Simplified Chinese"===t?(e="已鎖定的腳位",i="确定"):"Traditional Chinese"===t?(e="已锁定的脚位",i="確定"):(e="Locked Pins",i="Confirm"),$('

'+n+"

").dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#lockedPinsDialog").dialog("destroy")},buttons:[{text:i,click:function(){$("#lockedPinsDialog").dialog("isOpen")&&$("#lockedPinsDialog").dialog("destroy")}}]})})),$("#ID_BUTTON_DISABLE").on("click",(function(){Qn()})),$("#ID_BUTTON_LANGUAGE").on("click",(function(){qn()})),$("#ID_BUTTON_INSTRUCTION").on("click",(function(){window.open("https://www.nuvoton.com/resource-download.jsp?tp_GUID=UG1320220401093634")})),setTimeout(Jn,100),$.ajax({url:"./src/PartNumID.cpp",async:!1}).responseText.split(/\r\n|\n/).filter((function(e){return new RegExp(".*[^/]{.*0x.*[PROJ].*}").test(e)})).forEach((function(e){if(-1==e.indexOf("not release")){let i=e.substring(e.indexOf('"')+1,e.lastIndexOf('"')),n=e.substring(e.indexOf("0x"),e.lastIndexOf("PROJ")-2),t=e.substring(e.indexOf("PROJ"),e.lastIndexOf("}"));oi.push(i+"-"+n+"-"+t)}})),ft(),at()?(window.electronAPI.onConnected(((e,i)=>{console.log("electronAPI: onConnected"),ri=!0,window.electronAPI.send("getPIDValue")})),window.electronAPI.onReturnPIDValue(((e,n)=>{if(console.log("electronAPI: onReturnPIDValue"),U=st(n),console.log("connected device: "+U),-1!=o.toUpperCase().indexOf(U.toUpperCase())){var t=[],r=[];for(r=Qi(NUTOOL_PIN.g_cfg_regDescriptions),i=0;i{console.log("electronAPI: onReturnRegisterValue"),ot(i,n)})),window.electronAPI.onDisconnect(((e,i)=>{console.log("electronAPI: onDisconnect"),ri=!1})),window.electronAPI.onWarning(((e,i)=>{console.warn(i)})),window.electronAPI.onRunNuCADError(((e,i)=>{it()}))):window.Worker&&((b=new Worker("./src/worker/webusb.worker-bundle.js")).onmessage=async function(e){let n=e.data.action,t=e.data;if("connected"==n)console.log("worker: connected"),ri=!0,b.postMessage({action:"getPIDValue"});else if("returnPIDValue"==n)if(console.log("worker: returnPIDValue"),U=st(t.value),console.log("connected device: "+U),-1!=o.toUpperCase().indexOf(U.toUpperCase())){var r=[],l=[];for(l=Qi(NUTOOL_PIN.g_cfg_regDescriptions),i=0;i',$(n).dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#connectToTargetDialog").dialog("destroy")},buttons:[{text:t,click:function(){$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy")}}]}),e=null,null,null,i=null,n=null,t=null,null,r=null):ei?zn():$("#rootTree_Pin").is(":visible")&&(void 0===r||null==r?(e="Connect to Target Chip",i="When connecting to a target chip, what you have configured is going to be gone. To continue, click the Confirm button.",t="Confirm","Leave"):"Simplified Chinese"===r?(e="连线到目标芯片",i="当连接到目标芯片时,您配置的内容将会消失。 若要继续,请点击确定按钮。",t="确定","离开"):"Traditional Chinese"===r?(e="連線到目標晶片",i="當連接到目標晶片時,您配置的內容將會消失。 若要繼續,請點擊確定按鈕。",t="確定","離開"):(e="Connect to Target Chip",i="When connecting to a target chip, what you have configured is going to be gone. To continue, click the Confirm button.",t="Confirm","Leave"),On(),n='

'+i+'

',$(n).dialog({modal:!1,draggable:!1,resizable:!1,title:e,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#connectToTargetDialog").dialog("destroy")},buttons:[{text:t,click:function(){zn(),$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy")}}]}),e=null,null,null,i=null,n=null,t=null,null,r=null)},printReport:Kn,generatePinDescriptions:Hn,runAnotherTool:Wn,get_pin_descriptions:Dn,showPinDescriptions:Fn,zoomIn:Yn,bestFit:Vn,zoomOut:Zn,uncheckAllNodes:Qn,uncheckAllNodes_core:Mn,settings:qn,changeUIlanguage:Jn,executePDFfail:function(){Mi("您的电脑不能执行PDF档。请安装必要的软件来支援它。","您的電腦不能執行PDF檔。請安裝必要的軟件來支援它。","Your PC is incapable of executing the PDF files. Please install a necessary software to support it")},executeNuCADfail:it,get_gpio_MFPsNames:yn,recordConfig:wn,g_readConfigFilePath:"",g_readConfigFileContentText:"",g_pinFunctionString:"",g_bFunctionalTesting:!1,g_bModuleTreeLoaded:!1,g_horizontalIndexArray:["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","T","U","V","W","Y"],g_toolbarRemovedIndices:"4",g_chipType_default:"",g_partNumber_package_default:"",g_chipSilkScreenPrint_default:"",g_briefName_default:"",g_copyrightCompanyName_default:"",g_anotherNameForNuCAD:"",g_bSwitchSpeech8bitCPUMode:!1}}(); \ No newline at end of file