far__ptr_8h_source.html (16661B)
1<!-- HTML header for doxygen 1.8.14--> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4<head> 5<meta http-equiv="cache-control" content="max-age=86400"/> 6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 7<meta http-equiv="X-UA-Compatible" content="IE=9"/> 8<meta name="generator" content="Doxygen 1.8.20"/> 9<meta name="viewport" content="width=device-width, initial-scale=1"/> 10<title>GBDK 2020 Docs: gbdk/far_ptr.h Source File</title> 11<link href="tabs.css" rel="stylesheet" type="text/css"/> 12<script type="text/javascript" src="jquery.js"></script> 13<script type="text/javascript" src="dynsections.js"></script> 14<link href="navtree.css" rel="stylesheet" type="text/css"/> 15<script type="text/javascript" src="resize.js"></script> 16<script type="text/javascript" src="navtreedata.js"></script> 17<script type="text/javascript" src="navtree.js"></script> 18<link href="search/search.css" rel="stylesheet" type="text/css"/> 19<script type="text/javascript" src="search/searchdata.js"></script> 20<script type="text/javascript" src="search/search.js"></script> 21<link href="doxygen.css" rel="stylesheet" type="text/css" /> 22<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/> 23</head> 24<body> 25<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 26<div id="titlearea"> 27<table cellspacing="0" cellpadding="0"> 28 <tbody> 29 <tr style="height: 56px;"> 30 <td id="projectalign" style="padding-left: 0.5em;"> 31 <div id="projectname">GBDK 2020 Docs 32  <span id="projectnumber">4.0.6</span> 33 </div> 34 <div id="projectbrief">API Documentation for GBDK 2020</div> 35 </td> 36 </tr> 37 </tbody> 38</table> 39</div> 40<!-- end header part --> 41<!-- Generated by Doxygen 1.8.20 --> 42<script type="text/javascript"> 43/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 44var searchBox = new SearchBox("searchBox", "search",false,'Search'); 45/* @license-end */ 46</script> 47<script type="text/javascript" src="menudata.js"></script> 48<script type="text/javascript" src="menu.js"></script> 49<script type="text/javascript"> 50/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 51$(function() { 52 initMenu('',true,false,'search.php','Search'); 53 $(document).ready(function() { init_search(); }); 54}); 55/* @license-end */</script> 56<div id="main-nav"></div> 57</div><!-- top --> 58<div id="side-nav" class="ui-resizable side-nav-resizable"> 59 <div id="nav-tree"> 60 <div id="nav-tree-contents"> 61 <div id="nav-sync" class="sync"></div> 62 </div> 63 </div> 64 <div id="splitbar" style="-moz-user-select:none;" 65 class="ui-resizable-handle"> 66 </div> 67</div> 68<script type="text/javascript"> 69/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 70$(document).ready(function(){initNavTree('far__ptr_8h_source.html',''); initResizable(); }); 71/* @license-end */ 72</script> 73<div id="doc-content"> 74<!-- window showing the filter options --> 75<div id="MSearchSelectWindow" 76 onmouseover="return searchBox.OnSearchSelectShow()" 77 onmouseout="return searchBox.OnSearchSelectHide()" 78 onkeydown="return searchBox.OnSearchSelectKey(event)"> 79</div> 80 81<!-- iframe showing the search results (closed by default) --> 82<div id="MSearchResultsWindow"> 83<iframe src="javascript:void(0)" frameborder="0" 84 name="MSearchResults" id="MSearchResults"> 85</iframe> 86</div> 87 88<div class="header"> 89 <div class="headertitle"> 90<div class="title">far_ptr.h</div> </div> 91</div><!--header--> 92<div class="contents"> 93<a href="far__ptr_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div> 94<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef __FAR_PTR_H_INCLUDE</span></div> 95<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#define __FAR_PTR_H_INCLUDE</span></div> 96<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  </div> 97<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <types.h></span></div> 98<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include <<a class="code" href="stdint_8h.html">stdint.h</a>></span></div> 99<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  </div> 100<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="far__ptr_8h.html#a0c227677a96f9bf7e84a90922f2f8708"> 25</a></span> <span class="preprocessor">#define TO_FAR_PTR(ofs, seg) (((FAR_PTR)seg << 16) | (FAR_PTR)ofs)</span></div> 101<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div> 102<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="far__ptr_8h.html#a5bebc5322a1bba1c60c8d60e9b58be14"> 32</a></span> <span class="preprocessor">#define FAR_SEG(ptr) (((union __far_ptr *)&ptr)->segofs.seg)</span></div> 103<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div> 104<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="far__ptr_8h.html#ab79586d8cc3cb926f363f4d0cf7143d5"> 39</a></span> <span class="preprocessor">#define FAR_OFS(ptr) (((union __far_ptr *)&ptr)->segofs.ofs)</span></div> 105<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div> 106<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="far__ptr_8h.html#a048cfacb5d37ab758a74f44e86c1dbc6"> 41</a></span> <span class="preprocessor">#define FAR_FUNC(ptr, typ) ((typ)(((union __far_ptr *)&ptr)->segfn.fn))</span></div> 107<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div> 108<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="far__ptr_8h.html#a7f4ab1893ea392f8bf042a3b97de4730"> 65</a></span> <span class="preprocessor">#define FAR_CALL(ptr, typ, ...) (__call_banked_ptr=ptr,((typ)(&__call__banked))(__VA_ARGS__))</span></div> 109<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  </div> 110<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="far__ptr_8h.html#a7c6f52121dd07af29b477f4e64314842"> 69</a></span> <span class="keyword">typedef</span> <a class="code" href="stdint_8h.html#a33594304e786b158f3fb30289278f5af">uint32_t</a> <a class="code" href="far__ptr_8h.html#a7c6f52121dd07af29b477f4e64314842">FAR_PTR</a>;</div> 111<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div> 112<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="union____far__ptr.html"> 73</a></span> <span class="keyword">union </span><a class="code" href="union____far__ptr.html">__far_ptr</a> {</div> 113<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="union____far__ptr.html#afabdeeef2b4056bc9c2d2e34b030f348"> 74</a></span>  <a class="code" href="far__ptr_8h.html#a7c6f52121dd07af29b477f4e64314842">FAR_PTR</a> <a class="code" href="union____far__ptr.html#afabdeeef2b4056bc9c2d2e34b030f348">ptr</a>;</div> 114<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keyword">struct </span>{</div> 115<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="union____far__ptr.html#a60fef2b4efac12d73fd609373631ac4e"> 76</a></span>  <span class="keywordtype">void</span> * <a class="code" href="union____far__ptr.html#a60fef2b4efac12d73fd609373631ac4e">ofs</a>;</div> 116<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="union____far__ptr.html#a13c65a38be633a3ac219c3b5b3be5ce6"> 77</a></span>  <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="code" href="union____far__ptr.html#a13c65a38be633a3ac219c3b5b3be5ce6">seg</a>;</div> 117<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="union____far__ptr.html#ab77baeba835fa23f6d96c641e7ee2b06"> 78</a></span>  } <a class="code" href="union____far__ptr.html#ab77baeba835fa23f6d96c641e7ee2b06">segofs</a>;</div> 118<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keyword">struct </span>{</div> 119<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="union____far__ptr.html#a90065c72477187e9f9c97c07c90f6af9"> 80</a></span>  void (*<a class="code" href="union____far__ptr.html#a90065c72477187e9f9c97c07c90f6af9">fn</a>)();</div> 120<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="code" href="union____far__ptr.html#a13c65a38be633a3ac219c3b5b3be5ce6">seg</a>;</div> 121<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="union____far__ptr.html#a8c6e2345a04a58dc76339923baffcbe3"> 82</a></span>  } <a class="code" href="union____far__ptr.html#a8c6e2345a04a58dc76339923baffcbe3">segfn</a>;</div> 122<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> };</div> 123<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  </div> 124<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="keyword">extern</span> <span class="keyword">volatile</span> <a class="code" href="far__ptr_8h.html#a7c6f52121dd07af29b477f4e64314842">FAR_PTR</a> <a class="code" href="far__ptr_8h.html#a27792b7fc3796a1e1828d4c5812e5b21">__call_banked_ptr</a>;</div> 125<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="keyword">extern</span> <span class="keyword">volatile</span> <span class="keywordtype">void</span> * <a class="code" href="far__ptr_8h.html#a1344c26ca298a9eadea4bcfea6442ae3">__call_banked_addr</a>;</div> 126<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="keyword">extern</span> <span class="keyword">volatile</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="far__ptr_8h.html#a892433d652420445a9a6aebf1a256623">__call_banked_bank</a>;</div> 127<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  </div> 128<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="far__ptr_8h.html#aa45a2312a2584abb8733a052f66b4a90"> 89</a></span> <span class="keywordtype">void</span> <a class="code" href="far__ptr_8h.html#aa45a2312a2584abb8733a052f66b4a90">__call__banked</a>();</div> 129<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  </div> 130<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="far__ptr_8h.html#a23ab15f7eb85a48d72f717183badb110"> 97</a></span> <a class="code" href="stdint_8h.html#a33594304e786b158f3fb30289278f5af">uint32_t</a> <a class="code" href="far__ptr_8h.html#a23ab15f7eb85a48d72f717183badb110">to_far_ptr</a>(<span class="keywordtype">void</span>* ofs, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> seg) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div> 131<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  </div> 132<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="preprocessor">#endif</span></div> 133</div><!-- fragment --></div><!-- contents --> 134</div><!-- doc-content --> 135<div class="ttc" id="afar__ptr_8h_html_a23ab15f7eb85a48d72f717183badb110"><div class="ttname"><a href="far__ptr_8h.html#a23ab15f7eb85a48d72f717183badb110">to_far_ptr</a></div><div class="ttdeci">uint32_t to_far_ptr(void *ofs, uint16_t seg) OLDCALL</div></div> 136<div class="ttc" id="astdint_8h_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:51</div></div> 137<div class="ttc" id="afar__ptr_8h_html_a27792b7fc3796a1e1828d4c5812e5b21"><div class="ttname"><a href="far__ptr_8h.html#a27792b7fc3796a1e1828d4c5812e5b21">__call_banked_ptr</a></div><div class="ttdeci">volatile FAR_PTR __call_banked_ptr</div></div> 138<div class="ttc" id="astdint_8h_html_a33594304e786b158f3fb30289278f5af"><div class="ttname"><a href="stdint_8h.html#a33594304e786b158f3fb30289278f5af">uint32_t</a></div><div class="ttdeci">unsigned long int uint32_t</div><div class="ttdef"><b>Definition:</b> stdint.h:53</div></div> 139<div class="ttc" id="aunion____far__ptr_html_a60fef2b4efac12d73fd609373631ac4e"><div class="ttname"><a href="union____far__ptr.html#a60fef2b4efac12d73fd609373631ac4e">__far_ptr::ofs</a></div><div class="ttdeci">void * ofs</div><div class="ttdef"><b>Definition:</b> far_ptr.h:76</div></div> 140<div class="ttc" id="aunion____far__ptr_html_a8c6e2345a04a58dc76339923baffcbe3"><div class="ttname"><a href="union____far__ptr.html#a8c6e2345a04a58dc76339923baffcbe3">__far_ptr::segfn</a></div><div class="ttdeci">struct __far_ptr::@1 segfn</div></div> 141<div class="ttc" id="afar__ptr_8h_html_a1344c26ca298a9eadea4bcfea6442ae3"><div class="ttname"><a href="far__ptr_8h.html#a1344c26ca298a9eadea4bcfea6442ae3">__call_banked_addr</a></div><div class="ttdeci">volatile void * __call_banked_addr</div></div> 142<div class="ttc" id="astdint_8h_html_adf4d876453337156dde61095e1f20223"><div class="ttname"><a href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a></div><div class="ttdeci">unsigned short int uint16_t</div><div class="ttdef"><b>Definition:</b> stdint.h:52</div></div> 143<div class="ttc" id="astdint_8h_html"><div class="ttname"><a href="stdint_8h.html">stdint.h</a></div></div> 144<div class="ttc" id="aasm_2types_8h_html_a0971918860055db2e50dacea4da8f3bc"><div class="ttname"><a href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></div><div class="ttdeci">#define OLDCALL</div><div class="ttdef"><b>Definition:</b> types.h:19</div></div> 145<div class="ttc" id="aunion____far__ptr_html_a90065c72477187e9f9c97c07c90f6af9"><div class="ttname"><a href="union____far__ptr.html#a90065c72477187e9f9c97c07c90f6af9">__far_ptr::fn</a></div><div class="ttdeci">void(* fn)()</div><div class="ttdef"><b>Definition:</b> far_ptr.h:80</div></div> 146<div class="ttc" id="aunion____far__ptr_html_a13c65a38be633a3ac219c3b5b3be5ce6"><div class="ttname"><a href="union____far__ptr.html#a13c65a38be633a3ac219c3b5b3be5ce6">__far_ptr::seg</a></div><div class="ttdeci">uint16_t seg</div><div class="ttdef"><b>Definition:</b> far_ptr.h:77</div></div> 147<div class="ttc" id="aunion____far__ptr_html"><div class="ttname"><a href="union____far__ptr.html">__far_ptr</a></div><div class="ttdef"><b>Definition:</b> far_ptr.h:73</div></div> 148<div class="ttc" id="afar__ptr_8h_html_a892433d652420445a9a6aebf1a256623"><div class="ttname"><a href="far__ptr_8h.html#a892433d652420445a9a6aebf1a256623">__call_banked_bank</a></div><div class="ttdeci">volatile uint8_t __call_banked_bank</div></div> 149<div class="ttc" id="aunion____far__ptr_html_afabdeeef2b4056bc9c2d2e34b030f348"><div class="ttname"><a href="union____far__ptr.html#afabdeeef2b4056bc9c2d2e34b030f348">__far_ptr::ptr</a></div><div class="ttdeci">FAR_PTR ptr</div><div class="ttdef"><b>Definition:</b> far_ptr.h:74</div></div> 150<div class="ttc" id="aunion____far__ptr_html_ab77baeba835fa23f6d96c641e7ee2b06"><div class="ttname"><a href="union____far__ptr.html#ab77baeba835fa23f6d96c641e7ee2b06">__far_ptr::segofs</a></div><div class="ttdeci">struct __far_ptr::@0 segofs</div></div> 151<div class="ttc" id="afar__ptr_8h_html_aa45a2312a2584abb8733a052f66b4a90"><div class="ttname"><a href="far__ptr_8h.html#aa45a2312a2584abb8733a052f66b4a90">__call__banked</a></div><div class="ttdeci">void __call__banked()</div></div> 152<div class="ttc" id="afar__ptr_8h_html_a7c6f52121dd07af29b477f4e64314842"><div class="ttname"><a href="far__ptr_8h.html#a7c6f52121dd07af29b477f4e64314842">FAR_PTR</a></div><div class="ttdeci">uint32_t FAR_PTR</div><div class="ttdef"><b>Definition:</b> far_ptr.h:69</div></div> 153<!-- HTML footer for doxygen 1.8.14--> 154<!-- start footer part --> 155<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> 156</div> 157</body> 158</html>