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 RTX5", "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-RTOS2 Requirements", "resource_requirements.html#rtos2_req", null ],
21 [ "CMSIS-RTOS Requirements", "resource_requirements.html#rtos_req", null ]
23 [ "Reference", "modules.html", "modules" ],
24 [ "Data Structures", "annotated.html", "annotated" ],
25 [ "Data Structure Index", "classes.html", null ],
26 [ "Data Fields", "functions.html", [
27 [ "All", "functions.html", null ],
28 [ "Variables", "functions_vars.html", null ]
36 "struct_i_o___r_e_c_v_f_r_o_m.html#ad7a0b7fadc2f226af80409011d8bc885"
39 var SYNCONMSG = 'click to disable panel synchronisation';
40 var SYNCOFFMSG = 'click to enable panel synchronisation';
41 var SYNCONMSG = 'click to disable panel synchronisation';
42 var SYNCOFFMSG = 'click to enable panel synchronisation';
43 var navTreeSubIndices = new Array();
45 function getData(varName)
47 var i = varName.lastIndexOf('/');
48 var n = i>=0 ? varName.substring(i+1) : varName;
49 return eval(n.replace(/\-/g,'_'));
52 function stripPath(uri)
54 return uri.substring(uri.lastIndexOf('/')+1);
57 function stripPath2(uri)
59 var i = uri.lastIndexOf('/');
60 var s = uri.substring(i+1);
61 var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
62 return m ? uri.substring(i-6) : s;
65 function localStorageSupported()
68 return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
76 function storeLink(link)
78 if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
79 window.localStorage.setItem('navpath',link);
85 if (localStorageSupported()) {
86 window.localStorage.setItem('navpath','');
92 if (localStorageSupported()) {
93 return window.localStorage.getItem('navpath');
99 function getScript(scriptName,func,show)
101 var head = document.getElementsByTagName("head")[0];
102 var script = document.createElement('script');
103 script.id = scriptName;
104 script.type = 'text/javascript';
105 script.onload = func;
106 script.src = scriptName+'.js';
107 if ($.browser.msie && $.browser.version<=8) {
108 // script.onload does not work with older versions of IE
109 script.onreadystatechange = function() {
110 if (script.readyState=='complete' || script.readyState=='loaded') {
111 func(); if (show) showRoot();
115 head.appendChild(script);
118 function createIndent(o,domNode,node,level)
122 while (n.parentNode) { level++; n=n.parentNode; }
123 if (node.childrenData) {
124 var imgNode = document.createElement("img");
125 imgNode.style.paddingLeft=(16*level).toString()+'px';
129 node.plus_img = imgNode;
130 node.expandToggle = document.createElement("a");
131 node.expandToggle.href = "javascript:void(0)";
132 node.expandToggle.onclick = function() {
134 $(node.getChildrenUL()).slideUp("fast");
135 node.plus_img.src = node.relpath+"ftv2pnode.png";
136 node.expanded = false;
138 expandNode(o, node, false, false);
141 node.expandToggle.appendChild(imgNode);
142 domNode.appendChild(node.expandToggle);
143 imgNode.src = node.relpath+"ftv2pnode.png";
145 var span = document.createElement("span");
146 span.style.display = 'inline-block';
147 span.style.width = 16*(level+1)+'px';
148 span.style.height = '22px';
149 span.innerHTML = ' ';
150 domNode.appendChild(span);
154 var animationInProgress = false;
156 function gotoAnchor(anchor,aname,updateLocation)
158 var pos, docContent = $('#doc-content');
159 if (anchor.parent().attr('class')=='memItemLeft' ||
160 anchor.parent().attr('class')=='fieldtype' ||
161 anchor.parent().is(':header'))
163 pos = anchor.parent().position().top;
164 } else if (anchor.position()) {
165 pos = anchor.position().top;
168 var dist = Math.abs(Math.min(
169 pos-docContent.offset().top,
170 docContent[0].scrollHeight-
171 docContent.height()-docContent.scrollTop()));
172 animationInProgress=true;
174 scrollTop: pos + docContent.scrollTop() - docContent.offset().top
175 },Math.max(50,Math.min(500,dist)),function(){
176 if (updateLocation) window.location.href=aname;
177 animationInProgress=false;
182 function newNode(o, po, text, link, childrenData, lastNode)
184 var node = new Object();
185 node.children = Array();
186 node.childrenData = childrenData;
187 node.depth = po.depth + 1;
188 node.relpath = po.relpath;
189 node.isLast = lastNode;
191 node.li = document.createElement("li");
192 po.getChildrenUL().appendChild(node.li);
193 node.parentNode = po;
195 node.itemDiv = document.createElement("div");
196 node.itemDiv.className = "item";
198 node.labelSpan = document.createElement("span");
199 node.labelSpan.className = "label";
201 createIndent(o,node.itemDiv,node,0);
202 node.itemDiv.appendChild(node.labelSpan);
203 node.li.appendChild(node.itemDiv);
205 var a = document.createElement("a");
206 node.labelSpan.appendChild(a);
207 node.label = document.createTextNode(text);
208 node.expanded = false;
209 a.appendChild(node.label);
212 if (link.substring(0,1)=='^') {
213 url = link.substring(1);
216 url = node.relpath+link;
218 a.className = stripPath(link.replace('#',':'));
219 if (link.indexOf('#')!=-1) {
220 var aname = '#'+link.split('#')[1];
221 var srcPage = stripPath($(location).attr('pathname'));
222 var targetPage = stripPath(link.split('#')[0]);
223 a.href = srcPage!=targetPage ? url : "javascript:void(0)";
224 a.onclick = function(){
226 if (!$(a).parent().parent().hasClass('selected'))
228 $('.item').removeClass('selected');
229 $('.item').removeAttr('id');
230 $(a).parent().parent().addClass('selected');
231 $(a).parent().parent().attr('id','selected');
233 var anchor = $(aname);
234 gotoAnchor(anchor,aname,true);
238 a.onclick = function() { storeLink(link); }
241 if (childrenData != null)
243 a.className = "nolink";
244 a.href = "javascript:void(0)";
245 a.onclick = node.expandToggle.onclick;
249 node.childrenUL = null;
250 node.getChildrenUL = function() {
251 if (!node.childrenUL) {
252 node.childrenUL = document.createElement("ul");
253 node.childrenUL.className = "children_ul";
254 node.childrenUL.style.display = "none";
255 node.li.appendChild(node.childrenUL);
257 return node.childrenUL;
265 var headerHeight = $("#top").height();
266 var footerHeight = $("#nav-path").height();
267 var windowHeight = $(window).height() - headerHeight - footerHeight;
268 (function (){ // retry until we can scroll to the selected item
270 var navtree=$('#nav-tree');
271 navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
273 setTimeout(arguments.callee, 0);
278 function expandNode(o, node, imm, showRoot)
280 if (node.childrenData && !node.expanded) {
281 if (typeof(node.childrenData)==='string') {
282 var varName = node.childrenData;
283 getScript(node.relpath+varName,function(){
284 node.childrenData = getData(varName);
285 expandNode(o, node, imm, showRoot);
288 if (!node.childrenVisited) {
290 } if (imm || ($.browser.msie && $.browser.version>8)) {
291 // somehow slideDown jumps to the start of tree for IE9 :-(
292 $(node.getChildrenUL()).show();
294 $(node.getChildrenUL()).slideDown("fast");
297 node.plus_img.src = node.relpath+"ftv2mlastnode.png";
299 node.plus_img.src = node.relpath+"ftv2mnode.png";
301 node.expanded = true;
306 function glowEffect(n,duration)
308 n.addClass('glow').delay(duration).queue(function(next){
309 $(this).removeClass('glow');next();
313 function highlightAnchor()
315 var aname = $(location).attr('hash');
316 var anchor = $(aname);
317 if (anchor.parent().attr('class')=='memItemLeft'){
318 var rows = $('.memberdecls tr[class$="'+
319 window.location.hash.substring(1)+'"]');
320 glowEffect(rows.children(),300); // member without details
321 } else if (anchor.parents().slice(2).prop('tagName')=='TR') {
322 glowEffect(anchor.parents('div.memitem'),1000); // enum value
323 } else if (anchor.parent().attr('class')=='fieldtype'){
324 glowEffect(anchor.parent().parent(),1000); // struct field
325 } else if (anchor.parent().is(":header")) {
326 glowEffect(anchor.parent(),1000); // section header
328 glowEffect(anchor.next(),1000); // normal member
330 gotoAnchor(anchor,aname,false);
333 function selectAndHighlight(hash,n)
337 var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1);
338 a=$('.item a[class$="'+link+'"]');
341 a.parent().parent().addClass('selected');
342 a.parent().parent().attr('id','selected');
345 $(n.itemDiv).addClass('selected');
346 $(n.itemDiv).attr('id','selected');
348 if ($('#nav-tree-contents .item:first').hasClass('selected')) {
349 $('#nav-sync').css('top','30px');
351 $('#nav-sync').css('top','5px');
356 function showNode(o, node, index, hash)
358 if (node && node.childrenData) {
359 if (typeof(node.childrenData)==='string') {
360 var varName = node.childrenData;
361 getScript(node.relpath+varName,function(){
362 node.childrenData = getData(varName);
363 showNode(o,node,index,hash);
366 if (!node.childrenVisited) {
369 $(node.getChildrenUL()).css({'display':'block'});
371 node.plus_img.src = node.relpath+"ftv2mlastnode.png";
373 node.plus_img.src = node.relpath+"ftv2mnode.png";
375 node.expanded = true;
376 var n = node.children[o.breadcrumbs[index]];
377 if (index+1<o.breadcrumbs.length) {
378 showNode(o,n,index+1,hash);
380 if (typeof(n.childrenData)==='string') {
381 var varName = n.childrenData;
382 getScript(n.relpath+varName,function(){
383 n.childrenData = getData(varName);
385 showNode(o,node,index,hash); // retry with child node expanded
388 var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
389 if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
390 expandNode(o, n, true, true);
392 selectAndHighlight(hash,n);
397 selectAndHighlight(hash);
401 function removeToInsertLater(element) {
402 var parentNode = element.parentNode;
403 var nextSibling = element.nextSibling;
404 parentNode.removeChild(element);
407 parentNode.insertBefore(element, nextSibling);
409 parentNode.appendChild(element);
414 function getNode(o, po)
416 var insertFunction = removeToInsertLater(po.li);
417 po.childrenVisited = true;
418 var l = po.childrenData.length-1;
419 for (var i in po.childrenData) {
420 var nodeData = po.childrenData[i];
421 po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
427 function gotoNode(o,subIndex,root,hash,relpath)
429 var nti = navTreeSubIndices[subIndex][root+hash];
430 o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
431 if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
432 navTo(o,NAVTREE[0][1],"",relpath);
433 $('.item').removeClass('selected');
434 $('.item').removeAttr('id');
437 o.breadcrumbs.unshift(0); // add 0 for root node
438 showNode(o, o.node, 0, hash);
442 function navTo(o,root,hash,relpath)
444 var link = cachedLink();
446 var parts = link.split('#');
448 if (parts.length>1) hash = '#'+parts[1];
451 if (hash.match(/^#l\d+$/)) {
452 var anchor=$('a[name='+hash.substring(1)+']');
453 glowEffect(anchor.parent(),1000); // line number
454 hash=''; // strip line number anchors
455 //root=root.replace(/_source\./,'.'); // source link to doc link
459 while (NAVTREEINDEX[i+1]<=url) i++;
460 if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
461 if (navTreeSubIndices[i]) {
462 gotoNode(o,i,root,hash,relpath)
464 getScript(relpath+'navtreeindex'+i,function(){
465 navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
466 if (navTreeSubIndices[i]) {
467 gotoNode(o,i,root,hash,relpath);
473 function showSyncOff(n,relpath)
475 n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
478 function showSyncOn(n,relpath)
480 n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
483 function toggleSyncButton(relpath)
485 var navSync = $('#nav-sync');
486 if (navSync.hasClass('sync')) {
487 navSync.removeClass('sync');
488 showSyncOff(navSync,relpath);
489 storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));
491 navSync.addClass('sync');
492 showSyncOn(navSync,relpath);
497 function initNavTree(toroot,relpath)
499 var o = new Object();
501 o.node = new Object();
502 o.node.li = document.getElementById("nav-tree-contents");
503 o.node.childrenData = NAVTREE;
504 o.node.children = new Array();
505 o.node.childrenUL = document.createElement("ul");
506 o.node.getChildrenUL = function() { return o.node.childrenUL; };
507 o.node.li.appendChild(o.node.childrenUL);
509 o.node.relpath = relpath;
510 o.node.expanded = false;
511 o.node.isLast = true;
512 o.node.plus_img = document.createElement("img");
513 o.node.plus_img.src = relpath+"ftv2pnode.png";
514 o.node.plus_img.width = 16;
515 o.node.plus_img.height = 22;
517 if (localStorageSupported()) {
518 var navSync = $('#nav-sync');
520 showSyncOff(navSync,relpath);
521 navSync.removeClass('sync');
523 showSyncOn(navSync,relpath);
525 navSync.click(function(){ toggleSyncButton(relpath); });
528 $(window).load(function(){
529 navTo(o,toroot,window.location.hash,relpath);
533 $(window).bind('hashchange', function(){
534 if (window.location.hash && window.location.hash.length>1){
536 if ($(location).attr('hash')){
537 var clslink=stripPath($(location).attr('pathname'))+':'+
538 $(location).attr('hash').substring(1);
539 a=$('.item a[class$="'+clslink+'"]');
541 if (a==null || !$(a).parent().parent().hasClass('selected')){
542 $('.item').removeClass('selected');
543 $('.item').removeAttr('id');
545 var link=stripPath2($(location).attr('pathname'));
546 navTo(o,link,$(location).attr('hash'),relpath);
547 } else if (!animationInProgress) {
548 $('#doc-content').scrollTop(0);
549 $('.item').removeClass('selected');
550 $('.item').removeAttr('id');
551 navTo(o,toroot,window.location.hash,relpath);