3 [ "CMSIS-Driver Validation", "index.html", [
4 [ "Introduction", "index.html", null ],
5 [ "Test Setup", "test_setup.html", [
6 [ "Step 1: Create an MDK project with your target microcontroller device", "test_setup.html#step1", null ],
7 [ "Step 2: Add required software components", "test_setup.html#step2", null ],
8 [ "Step 3: Add main.c", "test_setup.html#step3", null ],
9 [ "Step 4: Configure DV_Config.h", "test_setup.html#step4", null ],
10 [ "Step 5: Configure Keil RTX", "test_setup.html#step5", null ],
11 [ "Step 6: Configure Heap", "test_setup.html#step6", null ],
12 [ "Step 7: Configure the Device", "test_setup.html#step7", null ],
13 [ "Step 8: Make Hardware Connections for Loopback Tests", "test_setup.html#step8", null ],
14 [ "Step 9: Download and Run the Project", "test_setup.html#step9", null ]
16 [ "Reading Test Results", "test_results.html", null ],
17 [ "Examples", "examples.html", "examples" ],
18 [ "Resource Requirements", "resource_requirements.html", [
19 [ "Heap Requirements", "resource_requirements.html#heap_req", null ],
20 [ "CMSIS-RTOS Requirements", "resource_requirements.html#rtos_req", null ]
22 [ "Reference", "modules.html", "modules" ]
31 var SYNCONMSG = 'click to disable panel synchronisation';
32 var SYNCOFFMSG = 'click to enable panel synchronisation';
33 var SYNCONMSG = 'click to disable panel synchronisation';
34 var SYNCOFFMSG = 'click to enable panel synchronisation';
35 var navTreeSubIndices = new Array();
37 function getData(varName)
39 var i = varName.lastIndexOf('/');
40 var n = i>=0 ? varName.substring(i+1) : varName;
41 return eval(n.replace(/\-/g,'_'));
44 function stripPath(uri)
46 return uri.substring(uri.lastIndexOf('/')+1);
49 function stripPath2(uri)
51 var i = uri.lastIndexOf('/');
52 var s = uri.substring(i+1);
53 var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
54 return m ? uri.substring(i-6) : s;
57 function localStorageSupported()
60 return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
68 function storeLink(link)
70 if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
71 window.localStorage.setItem('navpath',link);
77 if (localStorageSupported()) {
78 window.localStorage.setItem('navpath','');
84 if (localStorageSupported()) {
85 return window.localStorage.getItem('navpath');
91 function getScript(scriptName,func,show)
93 var head = document.getElementsByTagName("head")[0];
94 var script = document.createElement('script');
95 script.id = scriptName;
96 script.type = 'text/javascript';
98 script.src = scriptName+'.js';
99 if ($.browser.msie && $.browser.version<=8) {
100 // script.onload does not work with older versions of IE
101 script.onreadystatechange = function() {
102 if (script.readyState=='complete' || script.readyState=='loaded') {
103 func(); if (show) showRoot();
107 head.appendChild(script);
110 function createIndent(o,domNode,node,level)
114 while (n.parentNode) { level++; n=n.parentNode; }
115 if (node.childrenData) {
116 var imgNode = document.createElement("img");
117 imgNode.style.paddingLeft=(16*level).toString()+'px';
121 node.plus_img = imgNode;
122 node.expandToggle = document.createElement("a");
123 node.expandToggle.href = "javascript:void(0)";
124 node.expandToggle.onclick = function() {
126 $(node.getChildrenUL()).slideUp("fast");
127 node.plus_img.src = node.relpath+"ftv2pnode.png";
128 node.expanded = false;
130 expandNode(o, node, false, false);
133 node.expandToggle.appendChild(imgNode);
134 domNode.appendChild(node.expandToggle);
135 imgNode.src = node.relpath+"ftv2pnode.png";
137 var span = document.createElement("span");
138 span.style.display = 'inline-block';
139 span.style.width = 16*(level+1)+'px';
140 span.style.height = '22px';
141 span.innerHTML = ' ';
142 domNode.appendChild(span);
146 var animationInProgress = false;
148 function gotoAnchor(anchor,aname,updateLocation)
150 var pos, docContent = $('#doc-content');
151 if (anchor.parent().attr('class')=='memItemLeft' ||
152 anchor.parent().attr('class')=='fieldtype' ||
153 anchor.parent().is(':header'))
155 pos = anchor.parent().position().top;
156 } else if (anchor.position()) {
157 pos = anchor.position().top;
160 var dist = Math.abs(Math.min(
161 pos-docContent.offset().top,
162 docContent[0].scrollHeight-
163 docContent.height()-docContent.scrollTop()));
164 animationInProgress=true;
166 scrollTop: pos + docContent.scrollTop() - docContent.offset().top
167 },Math.max(50,Math.min(500,dist)),function(){
168 if (updateLocation) window.location.href=aname;
169 animationInProgress=false;
174 function newNode(o, po, text, link, childrenData, lastNode)
176 var node = new Object();
177 node.children = Array();
178 node.childrenData = childrenData;
179 node.depth = po.depth + 1;
180 node.relpath = po.relpath;
181 node.isLast = lastNode;
183 node.li = document.createElement("li");
184 po.getChildrenUL().appendChild(node.li);
185 node.parentNode = po;
187 node.itemDiv = document.createElement("div");
188 node.itemDiv.className = "item";
190 node.labelSpan = document.createElement("span");
191 node.labelSpan.className = "label";
193 createIndent(o,node.itemDiv,node,0);
194 node.itemDiv.appendChild(node.labelSpan);
195 node.li.appendChild(node.itemDiv);
197 var a = document.createElement("a");
198 node.labelSpan.appendChild(a);
199 node.label = document.createTextNode(text);
200 node.expanded = false;
201 a.appendChild(node.label);
204 if (link.substring(0,1)=='^') {
205 url = link.substring(1);
208 url = node.relpath+link;
210 a.className = stripPath(link.replace('#',':'));
211 if (link.indexOf('#')!=-1) {
212 var aname = '#'+link.split('#')[1];
213 var srcPage = stripPath($(location).attr('pathname'));
214 var targetPage = stripPath(link.split('#')[0]);
215 a.href = srcPage!=targetPage ? url : "javascript:void(0)";
216 a.onclick = function(){
218 if (!$(a).parent().parent().hasClass('selected'))
220 $('.item').removeClass('selected');
221 $('.item').removeAttr('id');
222 $(a).parent().parent().addClass('selected');
223 $(a).parent().parent().attr('id','selected');
225 var anchor = $(aname);
226 gotoAnchor(anchor,aname,true);
230 a.onclick = function() { storeLink(link); }
233 if (childrenData != null)
235 a.className = "nolink";
236 a.href = "javascript:void(0)";
237 a.onclick = node.expandToggle.onclick;
241 node.childrenUL = null;
242 node.getChildrenUL = function() {
243 if (!node.childrenUL) {
244 node.childrenUL = document.createElement("ul");
245 node.childrenUL.className = "children_ul";
246 node.childrenUL.style.display = "none";
247 node.li.appendChild(node.childrenUL);
249 return node.childrenUL;
257 var headerHeight = $("#top").height();
258 var footerHeight = $("#nav-path").height();
259 var windowHeight = $(window).height() - headerHeight - footerHeight;
260 (function (){ // retry until we can scroll to the selected item
262 var navtree=$('#nav-tree');
263 navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
265 setTimeout(arguments.callee, 0);
270 function expandNode(o, node, imm, showRoot)
272 if (node.childrenData && !node.expanded) {
273 if (typeof(node.childrenData)==='string') {
274 var varName = node.childrenData;
275 getScript(node.relpath+varName,function(){
276 node.childrenData = getData(varName);
277 expandNode(o, node, imm, showRoot);
280 if (!node.childrenVisited) {
282 } if (imm || ($.browser.msie && $.browser.version>8)) {
283 // somehow slideDown jumps to the start of tree for IE9 :-(
284 $(node.getChildrenUL()).show();
286 $(node.getChildrenUL()).slideDown("fast");
289 node.plus_img.src = node.relpath+"ftv2mlastnode.png";
291 node.plus_img.src = node.relpath+"ftv2mnode.png";
293 node.expanded = true;
298 function glowEffect(n,duration)
300 n.addClass('glow').delay(duration).queue(function(next){
301 $(this).removeClass('glow');next();
305 function highlightAnchor()
307 var aname = $(location).attr('hash');
308 var anchor = $(aname);
309 if (anchor.parent().attr('class')=='memItemLeft'){
310 var rows = $('.memberdecls tr[class$="'+
311 window.location.hash.substring(1)+'"]');
312 glowEffect(rows.children(),300); // member without details
313 } else if (anchor.parents().slice(2).prop('tagName')=='TR') {
314 glowEffect(anchor.parents('div.memitem'),1000); // enum value
315 } else if (anchor.parent().attr('class')=='fieldtype'){
316 glowEffect(anchor.parent().parent(),1000); // struct field
317 } else if (anchor.parent().is(":header")) {
318 glowEffect(anchor.parent(),1000); // section header
320 glowEffect(anchor.next(),1000); // normal member
322 gotoAnchor(anchor,aname,false);
325 function selectAndHighlight(hash,n)
329 var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1);
330 a=$('.item a[class$="'+link+'"]');
333 a.parent().parent().addClass('selected');
334 a.parent().parent().attr('id','selected');
337 $(n.itemDiv).addClass('selected');
338 $(n.itemDiv).attr('id','selected');
340 if ($('#nav-tree-contents .item:first').hasClass('selected')) {
341 $('#nav-sync').css('top','30px');
343 $('#nav-sync').css('top','5px');
348 function showNode(o, node, index, hash)
350 if (node && node.childrenData) {
351 if (typeof(node.childrenData)==='string') {
352 var varName = node.childrenData;
353 getScript(node.relpath+varName,function(){
354 node.childrenData = getData(varName);
355 showNode(o,node,index,hash);
358 if (!node.childrenVisited) {
361 $(node.getChildrenUL()).css({'display':'block'});
363 node.plus_img.src = node.relpath+"ftv2mlastnode.png";
365 node.plus_img.src = node.relpath+"ftv2mnode.png";
367 node.expanded = true;
368 var n = node.children[o.breadcrumbs[index]];
369 if (index+1<o.breadcrumbs.length) {
370 showNode(o,n,index+1,hash);
372 if (typeof(n.childrenData)==='string') {
373 var varName = n.childrenData;
374 getScript(n.relpath+varName,function(){
375 n.childrenData = getData(varName);
377 showNode(o,node,index,hash); // retry with child node expanded
380 var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
381 if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
382 expandNode(o, n, true, true);
384 selectAndHighlight(hash,n);
389 selectAndHighlight(hash);
393 function removeToInsertLater(element) {
394 var parentNode = element.parentNode;
395 var nextSibling = element.nextSibling;
396 parentNode.removeChild(element);
399 parentNode.insertBefore(element, nextSibling);
401 parentNode.appendChild(element);
406 function getNode(o, po)
408 var insertFunction = removeToInsertLater(po.li);
409 po.childrenVisited = true;
410 var l = po.childrenData.length-1;
411 for (var i in po.childrenData) {
412 var nodeData = po.childrenData[i];
413 po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
419 function gotoNode(o,subIndex,root,hash,relpath)
421 var nti = navTreeSubIndices[subIndex][root+hash];
422 o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
423 if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
424 navTo(o,NAVTREE[0][1],"",relpath);
425 $('.item').removeClass('selected');
426 $('.item').removeAttr('id');
429 o.breadcrumbs.unshift(0); // add 0 for root node
430 showNode(o, o.node, 0, hash);
434 function navTo(o,root,hash,relpath)
436 var link = cachedLink();
438 var parts = link.split('#');
440 if (parts.length>1) hash = '#'+parts[1];
443 if (hash.match(/^#l\d+$/)) {
444 var anchor=$('a[name='+hash.substring(1)+']');
445 glowEffect(anchor.parent(),1000); // line number
446 hash=''; // strip line number anchors
447 //root=root.replace(/_source\./,'.'); // source link to doc link
451 while (NAVTREEINDEX[i+1]<=url) i++;
452 if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
453 if (navTreeSubIndices[i]) {
454 gotoNode(o,i,root,hash,relpath)
456 getScript(relpath+'navtreeindex'+i,function(){
457 navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
458 if (navTreeSubIndices[i]) {
459 gotoNode(o,i,root,hash,relpath);
465 function showSyncOff(n,relpath)
467 n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
470 function showSyncOn(n,relpath)
472 n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
475 function toggleSyncButton(relpath)
477 var navSync = $('#nav-sync');
478 if (navSync.hasClass('sync')) {
479 navSync.removeClass('sync');
480 showSyncOff(navSync,relpath);
481 storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));
483 navSync.addClass('sync');
484 showSyncOn(navSync,relpath);
489 function initNavTree(toroot,relpath)
491 var o = new Object();
493 o.node = new Object();
494 o.node.li = document.getElementById("nav-tree-contents");
495 o.node.childrenData = NAVTREE;
496 o.node.children = new Array();
497 o.node.childrenUL = document.createElement("ul");
498 o.node.getChildrenUL = function() { return o.node.childrenUL; };
499 o.node.li.appendChild(o.node.childrenUL);
501 o.node.relpath = relpath;
502 o.node.expanded = false;
503 o.node.isLast = true;
504 o.node.plus_img = document.createElement("img");
505 o.node.plus_img.src = relpath+"ftv2pnode.png";
506 o.node.plus_img.width = 16;
507 o.node.plus_img.height = 22;
509 if (localStorageSupported()) {
510 var navSync = $('#nav-sync');
512 showSyncOff(navSync,relpath);
513 navSync.removeClass('sync');
515 showSyncOn(navSync,relpath);
517 navSync.click(function(){ toggleSyncButton(relpath); });
520 $(window).load(function(){
521 navTo(o,toroot,window.location.hash,relpath);
525 $(window).bind('hashchange', function(){
526 if (window.location.hash && window.location.hash.length>1){
528 if ($(location).attr('hash')){
529 var clslink=stripPath($(location).attr('pathname'))+':'+
530 $(location).attr('hash').substring(1);
531 a=$('.item a[class$="'+clslink+'"]');
533 if (a==null || !$(a).parent().parent().hasClass('selected')){
534 $('.item').removeClass('selected');
535 $('.item').removeAttr('id');
537 var link=stripPath2($(location).attr('pathname'));
538 navTo(o,link,$(location).attr('hash'),relpath);
539 } else if (!animationInProgress) {
540 $('#doc-content').scrollTop(0);
541 $('.item').removeClass('selected');
542 $('.item').removeAttr('id');
543 navTo(o,toroot,window.location.hash,relpath);