mirror of https://github.com/AxioDL/jbus.git
154 lines
55 KiB
HTML
154 lines
55 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<meta name="generator" content="Doxygen 1.8.11"/>
|
||
|
<title>JBus: include/jbus/Endpoint.hpp Source File</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="resize.js"></script>
|
||
|
<script type="text/javascript" src="navtreedata.js"></script>
|
||
|
<script type="text/javascript" src="navtree.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(initResizable);
|
||
|
$(window).load(resizeHeight);
|
||
|
</script>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { init_search(); });
|
||
|
</script>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td id="projectalign" style="padding-left: 0.5em;">
|
||
|
<div id="projectname">JBus
|
||
|
</div>
|
||
|
<div id="projectbrief">JoyBus communication server</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.11 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div><!-- top -->
|
||
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||
|
<div id="nav-tree">
|
||
|
<div id="nav-tree-contents">
|
||
|
<div id="nav-sync" class="sync"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="splitbar" style="-moz-user-select:none;"
|
||
|
class="ui-resizable-handle">
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function(){initNavTree('Endpoint_8hpp_source.html','');});
|
||
|
</script>
|
||
|
<div id="doc-content">
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
</div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<div class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">Endpoint.hpp</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<a href="Endpoint_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef JBUS_ENDPOINT_HPP</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define JBUS_ENDPOINT_HPP</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> </div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include "<a class="code" href="Common_8hpp.html">Common.hpp</a>"</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include "<a class="code" href="Socket_8hpp.html">Socket.hpp</a>"</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "optional.hpp"</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <thread></span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <mutex></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="keyword">namespace </span><a class="code" href="namespacejbus.html">jbus</a></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> {</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="classjbus_1_1Endpoint.html"> 15</a></span> <span class="keyword">class </span><a class="code" href="classjbus_1_1Endpoint.html">Endpoint</a></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> {</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="keyword">class </span>KawasedoChallenge</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keyword">struct </span>DSPSecParms</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  {</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="comment">/* Nonce challenge (first read from GBA, hence already little-endian) */</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <a class="code" href="namespacejbus.html#ae4a7d015f3b8913ec0b563caa0a53221">u32</a> x0_gbaChallenge;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="comment">/* Palette of pulsing logo on GBA during transmission [0,6] */</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <a class="code" href="namespacejbus.html#ae4a7d015f3b8913ec0b563caa0a53221">u32</a> x4_logoPalette;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="comment">/* Speed and direction of palette interpolation [-4,4] */</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <a class="code" href="namespacejbus.html#ae4a7d015f3b8913ec0b563caa0a53221">u32</a> x8_logoSpeed;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="comment">/* Length of JoyBoot program to upload */</span></div><div class="line"><a name="l00039"></a><
|
||
|
<div class="ttc" id="namespacejbus_html_aff2760609de15f92daafbdff7be79b33"><div class="ttname"><a href="namespacejbus.html#aff2760609de15f92daafbdff7be79b33">jbus::u16</a></div><div class="ttdeci">uint16_t u16</div><div class="ttdef"><b>Definition:</b> Common.hpp:14</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a779ba524cf30f41e29fd53a626ba2acf"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a779ba524cf30f41e29fd53a626ba2acf">jbus::Endpoint::GBAGetStatus</a></div><div class="ttdeci">EJoyReturn GBAGetStatus(u8 *status)</div><div class="ttdoc">Get JOYSTAT register from GBA synchronously. </div></div>
|
||
|
<div class="ttc" id="classjbus_1_1ThreadLocalEndpoint_html_a0899b0293f9eb4b69763d8e1e21e58a9"><div class="ttname"><a href="classjbus_1_1ThreadLocalEndpoint.html#a0899b0293f9eb4b69763d8e1e21e58a9">jbus::ThreadLocalEndpoint::GetChan</a></div><div class="ttdeci">int GetChan() const </div><div class="ttdoc">Get virtual SI channel assigned to this endpoint. </div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:293</div></div>
|
||
|
<div class="ttc" id="namespacejbus_html_a416b65eae1b2ff9ab63c4c71ff857ea4"><div class="ttname"><a href="namespacejbus.html#a416b65eae1b2ff9ab63c4c71ff857ea4">jbus::s8</a></div><div class="ttdeci">int8_t s8</div><div class="ttdef"><b>Definition:</b> Common.hpp:11</div></div>
|
||
|
<div class="ttc" id="namespacejbus_html_ae1577e03ea8c6e27361cb389c992280d"><div class="ttname"><a href="namespacejbus.html#ae1577e03ea8c6e27361cb389c992280d">jbus::FGBACallback</a></div><div class="ttdeci">std::function< void(ThreadLocalEndpoint &endpoint, EJoyReturn status)> FGBACallback</div><div class="ttdoc">Standard callback for asynchronous jbus::Endpoint APIs. </div><div class="ttdef"><b>Definition:</b> Common.hpp:169</div></div>
|
||
|
<div class="ttc" id="namespacejbus_html_a19d112b8b9f912fca094b41ce26c4fef"><div class="ttname"><a href="namespacejbus.html#a19d112b8b9f912fca094b41ce26c4fef">jbus::u8</a></div><div class="ttdeci">uint8_t u8</div><div class="ttdef"><b>Definition:</b> Common.hpp:12</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_ab5de6af29530791b0b2958002f1d3603"><div class="ttname"><a href="classjbus_1_1Endpoint.html#ab5de6af29530791b0b2958002f1d3603">jbus::Endpoint::ThreadLocalEndpoint</a></div><div class="ttdeci">friend class ThreadLocalEndpoint</div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:131</div></div>
|
||
|
<div class="ttc" id="namespacejbus_html"><div class="ttname"><a href="namespacejbus.html">jbus</a></div><div class="ttdef"><b>Definition:</b> Common.hpp:8</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1net_1_1Socket_html"><div class="ttname"><a href="classjbus_1_1net_1_1Socket.html">jbus::net::Socket</a></div><div class="ttdef"><b>Definition:</b> Socket.hpp:103</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a06506d0cfa26d461f239ed761264d7b0"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a06506d0cfa26d461f239ed761264d7b0">jbus::Endpoint::GBAWriteAsync</a></div><div class="ttdeci">EJoyReturn GBAWriteAsync(const u8 *src, u8 *status, FGBACallback &&callback)</div><div class="ttdoc">Send WRITE command to GBA asynchronously. </div></div>
|
||
|
<div class="ttc" id="namespacejbus_html_a36fb1f7488218c972a50b1f9dd547b81"><div class="ttname"><a href="namespacejbus.html#a36fb1f7488218c972a50b1f9dd547b81">jbus::u64</a></div><div class="ttdeci">uint64_t u64</div><div class="ttdef"><b>Definition:</b> Common.hpp:18</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a39ddcbf5ac7078d59a4d99d291e3f0fa"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a39ddcbf5ac7078d59a4d99d291e3f0fa">jbus::Endpoint::Endpoint</a></div><div class="ttdeci">Endpoint(u8 chan, net::Socket &&data, net::Socket &&clock)</div></div>
|
||
|
<div class="ttc" id="Socket_8hpp_html"><div class="ttname"><a href="Socket_8hpp.html">Socket.hpp</a></div></div>
|
||
|
<div class="ttc" id="namespacejbus_html_aa767fe4f71e145e2c0b12eccbeb83071"><div class="ttname"><a href="namespacejbus.html#aa767fe4f71e145e2c0b12eccbeb83071">jbus::s16</a></div><div class="ttdeci">int16_t s16</div><div class="ttdef"><b>Definition:</b> Common.hpp:13</div></div>
|
||
|
<div class="ttc" id="namespacejbus_html_a33e5022738a0799c066372ce74d04c37"><div class="ttname"><a href="namespacejbus.html#a33e5022738a0799c066372ce74d04c37">jbus::s32</a></div><div class="ttdeci">int32_t s32</div><div class="ttdef"><b>Definition:</b> Common.hpp:15</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a4ba9120b99057be42940b797708b790e"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a4ba9120b99057be42940b797708b790e">jbus::Endpoint::GBAGetStatusAsync</a></div><div class="ttdeci">EJoyReturn GBAGetStatusAsync(u8 *status, FGBACallback &&callback)</div><div class="ttdoc">Get JOYSTAT register from GBA asynchronously. </div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a047d724cc9ccb8253cb8464c24b9ccd4"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a047d724cc9ccb8253cb8464c24b9ccd4">jbus::Endpoint::GBAReadAsync</a></div><div class="ttdeci">EJoyReturn GBAReadAsync(u8 *dst, u8 *status, FGBACallback &&callback)</div><div class="ttdoc">Send READ command to GBA asynchronously. </div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_aad76a9374e4e151540f678798548a843"><div class="ttname"><a href="classjbus_1_1Endpoint.html#aad76a9374e4e151540f678798548a843">jbus::Endpoint::GBAJoyBootAsync</a></div><div class="ttdeci">EJoyReturn GBAJoyBootAsync(s32 paletteColor, s32 paletteSpeed, const u8 *programp, s32 length, u8 *status, FGBACallback &&callback)</div><div class="ttdoc">Initiate JoyBoot sequence on this endpoint. </div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a6e59373aa28a23097129470deaeb46dd"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a6e59373aa28a23097129470deaeb46dd">jbus::Endpoint::GBAWrite</a></div><div class="ttdeci">EJoyReturn GBAWrite(const u8 *src, u8 *status)</div><div class="ttdoc">Send WRITE command to GBA synchronously. </div></div>
|
||
|
<div class="ttc" id="namespacejbus_html_a7118bfa3cb9d51e588418220bca20117"><div class="ttname"><a href="namespacejbus.html#a7118bfa3cb9d51e588418220bca20117">jbus::EJoyReturn</a></div><div class="ttdeci">EJoyReturn</div><div class="ttdef"><b>Definition:</b> Common.hpp:157</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html"><div class="ttname"><a href="classjbus_1_1Endpoint.html">jbus::Endpoint</a></div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:15</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_ad39f268d3bee438e5176cc7f4cf59675"><div class="ttname"><a href="classjbus_1_1Endpoint.html#ad39f268d3bee438e5176cc7f4cf59675">jbus::Endpoint::~Endpoint</a></div><div class="ttdeci">~Endpoint()</div></div>
|
||
|
<div class="ttc" id="namespacejbus_html_ae4a7d015f3b8913ec0b563caa0a53221"><div class="ttname"><a href="namespacejbus.html#ae4a7d015f3b8913ec0b563caa0a53221">jbus::u32</a></div><div class="ttdeci">uint32_t u32</div><div class="ttdef"><b>Definition:</b> Common.hpp:16</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a1cae93f2e1e097b10b34810a0d04333f"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a1cae93f2e1e097b10b34810a0d04333f">jbus::Endpoint::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdoc">Request stop of I/O thread and block until joined. Further use of this Endpoint is undefined behavior...</div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a9065f6189182596a3f5c498e8ef98b40"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a9065f6189182596a3f5c498e8ef98b40">jbus::Endpoint::GBAReset</a></div><div class="ttdeci">EJoyReturn GBAReset(u8 *status)</div><div class="ttdoc">Send RESET command to GBA synchronously. </div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_acb5167184768ea65d026adc531f237b9"><div class="ttname"><a href="classjbus_1_1Endpoint.html#acb5167184768ea65d026adc531f237b9">jbus::Endpoint::GetChan</a></div><div class="ttdeci">int GetChan() const </div><div class="ttdoc">Get virtual SI channel assigned to this endpoint. </div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:249</div></div>
|
||
|
<div class="ttc" id="Common_8hpp_html"><div class="ttname"><a href="Common_8hpp.html">Common.hpp</a></div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a81d86608ffb93b3211a915fa1712beb4"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a81d86608ffb93b3211a915fa1712beb4">jbus::Endpoint::GBAResetAsync</a></div><div class="ttdeci">EJoyReturn GBAResetAsync(u8 *status, FGBACallback &&callback)</div><div class="ttdoc">Send RESET command to GBA asynchronously. </div></div>
|
||
|
<div class="ttc" id="classjbus_1_1Endpoint_html_a50401a9a9d658f1f68e3dde61d5dfbce"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a50401a9a9d658f1f68e3dde61d5dfbce">jbus::Endpoint::GBAGetProcessStatus</a></div><div class="ttdeci">EJoyReturn GBAGetProcessStatus(u8 &percentOut)</div><div class="ttdoc">Get status of last asynchronous operation. </div></div>
|
||
|
<div class="ttc" id="classjbus_1_1ThreadLocalEndpoint_html"><div class="ttname"><a href="classjbus_1_1ThreadLocalEndpoint.html">jbus::ThreadLocalEndpoint</a></div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:258</div></div>
|
||
|
</div><!-- fragment --></div><!-- contents -->
|
||
|
</div><!-- doc-content -->
|
||
|
<!-- start footer part -->
|
||
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||
|
<ul>
|
||
|
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_4525d057f72f34aebe3436e89afccf45.html">jbus</a></li><li class="navelem"><a class="el" href="Endpoint_8hpp.html">Endpoint.hpp</a></li>
|
||
|
<li class="footer">Generated by
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|