Micro template library A library for building device drivers
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

i2c_8h_source.html 53 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.14"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>uTL: include/utl/com/i2c.h Source File</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  18. $(document).ready(initResizable);
  19. /* @license-end */</script>
  20. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  21. <script type="text/javascript" src="search/searchdata.js"></script>
  22. <script type="text/javascript" src="search/search.js"></script>
  23. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  24. </head>
  25. <body>
  26. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  27. <div id="titlearea">
  28. <table cellspacing="0" cellpadding="0">
  29. <tbody>
  30. <tr style="height: 56px;">
  31. <td id="projectalign" style="padding-left: 0.5em;">
  32. <div id="projectname">uTL
  33. </div>
  34. <div id="projectbrief">micro Template library</div>
  35. </td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. <!-- end header part -->
  41. <!-- Generated by Doxygen 1.8.14 -->
  42. <script type="text/javascript">
  43. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  44. var 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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
  70. $(document).ready(function(){initNavTree('i2c_8h_source.html','');});
  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. <!-- iframe showing the search results (closed by default) -->
  81. <div id="MSearchResultsWindow">
  82. <iframe src="javascript:void(0)" frameborder="0"
  83. name="MSearchResults" id="MSearchResults">
  84. </iframe>
  85. </div>
  86. <div class="header">
  87. <div class="headertitle">
  88. <div class="title">i2c.h</div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <a href="i2c_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>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#ifndef _utl_com_i2c_h__</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#define _utl_com_i2c_h__</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="impl_8h.html">utl/core/impl.h</a>&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="crtp_8h.html">utl/core/crtp.h</a>&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="meta_8h.html">utl/meta/meta.h</a>&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceutl.html">utl</a> {</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> impl_t&gt;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html"> 43</a></span>&#160; <span class="keyword">class </span><a class="code" href="classutl_1_1i2c__i.html">i2c_i</a> {</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a054b6bc43f22e14d4e9feb0772f7ada5">_CRTP_IMPL</a>(impl_t);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#aa9267a8602702b78f188e0cf61b68a55"> 47</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classutl_1_1i2c__i.html">type</a> = <a class="code" href="classutl_1_1i2c__i.html">i2c_i&lt;impl_t&gt;</a>; </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keyword">enum class</span> <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5">Sequence</a> {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5ae409eb2ba6eb6801f52763ae370c350e">BYTE</a> =0, </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a0fc437bc317835cad5faafc12a83fad5">ACK</a>, </div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a01af7e5aa5863a91810dd4e5d0e383ce">BYTEnACK</a> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; };</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keyword">protected</span>:</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a84375c05d1c40d9992aa1290dd488410">i2c_i</a> () = <span class="keywordflow">default</span>; </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a6a07d19db8974ad606031b60a6079957">~i2c_i</a> () = <span class="keywordflow">default</span>; </div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a84375c05d1c40d9992aa1290dd488410">i2c_i</a> (<span class="keyword">const</span> <a class="code" href="classutl_1_1i2c__i.html#aa9267a8602702b78f188e0cf61b68a55">type</a>&amp;) = <span class="keyword">delete</span>; </div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#aa9267a8602702b78f188e0cf61b68a55">type</a>&amp; <a class="code" href="classutl_1_1i2c__i.html#aee83d11e02c3a0639dd3ed1ea440ed24">operator= </a>(<span class="keyword">const</span> <a class="code" href="classutl_1_1i2c__i.html#aa9267a8602702b78f188e0cf61b68a55">type</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51"> 74</a></span>&#160; uint32_t <a class="code" href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51">_clock</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> impl()._clock (); } </div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#afa0b1552f8fc7c971456fab1ad01242d"> 75</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#afa0b1552f8fc7c971456fab1ad01242d">_clock</a> (uint32_t c) { impl()._clock (c); } </div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#af060d656c685c1ab5dd6981c5c88b26d"> 76</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#af060d656c685c1ab5dd6981c5c88b26d">_start</a>() { impl()._start (); } </div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#aa6202c6c7c1282071ae962fa6bb0f195"> 77</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#aa6202c6c7c1282071ae962fa6bb0f195">_stop</a>() { impl()._stop (); } </div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#a03a25367cdec7ceb76f8de9d5b3145fb"> 78</a></span>&#160; <a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a> <a class="code" href="classutl_1_1i2c__i.html#a03a25367cdec7ceb76f8de9d5b3145fb">_rx_data</a> (<span class="keywordtype">bool</span> ack, <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5">Sequence</a> seq) { <span class="keywordflow">return</span> impl()._rx_data (ack, seq); }</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#ae2b164d2c085d5331b627ba711bbb2c9"> 79</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classutl_1_1i2c__i.html#ae2b164d2c085d5331b627ba711bbb2c9">_tx_data</a> (<a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a> byte, <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5">Sequence</a> seq) { <span class="keywordflow">return</span> impl()._tx_data (byte, seq); }</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#aac5fed816701cc4543acd717ec804ac0"> 87</a></span>&#160; uint32_t <a class="code" href="classutl_1_1i2c__i.html#aac5fed816701cc4543acd717ec804ac0">clock</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51">_clock</a> (); } </div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#ae4c59938aeeb1f0726195d425a4c0083"> 88</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#ae4c59938aeeb1f0726195d425a4c0083">clock</a> (uint32_t f) { <a class="code" href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51">_clock</a> (f); } </div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#a3591683e5fbf17b582f6ac1f79af871d"> 96</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#a3591683e5fbf17b582f6ac1f79af871d">start</a>() { <a class="code" href="classutl_1_1i2c__i.html#af060d656c685c1ab5dd6981c5c88b26d">_start</a> (); } </div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#a1310b52ac908b8c37059fb253cc3f56e"> 97</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#a1310b52ac908b8c37059fb253cc3f56e">stop</a> () { <a class="code" href="classutl_1_1i2c__i.html#aa6202c6c7c1282071ae962fa6bb0f195">_stop</a> (); } </div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#ab2f6a579096b4872f5dfd1530e200eda"> 111</a></span>&#160; <a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a> <a class="code" href="classutl_1_1i2c__i.html#ab2f6a579096b4872f5dfd1530e200eda">rx_data</a> (<span class="keywordtype">bool</span> ack, <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5">Sequence</a> seq =<a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a01af7e5aa5863a91810dd4e5d0e383ce">Sequence::BYTEnACK</a>) {</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classutl_1_1i2c__i.html#a03a25367cdec7ceb76f8de9d5b3145fb">_rx_data</a> (ack, seq);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; }</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i.html#aaf0b0ceec57fd8014ea3e6b58e9bfe3d"> 127</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classutl_1_1i2c__i.html#aaf0b0ceec57fd8014ea3e6b58e9bfe3d">tx_data</a> (<a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a> byte, <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5">Sequence</a> seq =<a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a01af7e5aa5863a91810dd4e5d0e383ce">Sequence::BYTEnACK</a>) {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classutl_1_1i2c__i.html#ae2b164d2c085d5331b627ba711bbb2c9">_tx_data</a> (byte, seq);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; };</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html"> 140</a></span>&#160; <span class="keyword">class </span><a class="code" href="classutl_1_1i2c__i.html">i2c_i</a> &lt;<a class="code" href="structutl_1_1virtual__tag.html">virtual_tag</a>&gt; {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#ac892faacc1566f4ca1438e3df765bcac"> 142</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html">type</a> = <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html">i2c_i &lt;virtual_tag&gt;</a>; </div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a260541de452a9a653162b8b109b26c09"> 145</a></span>&#160; <span class="keyword">enum class</span> <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a260541de452a9a653162b8b109b26c09">Sequence</a> {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5ae409eb2ba6eb6801f52763ae370c350e">BYTE</a>=0, </div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a0fc437bc317835cad5faafc12a83fad5">ACK</a>, </div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a01af7e5aa5863a91810dd4e5d0e383ce">BYTEnACK</a> </div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; };</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="keyword">protected</span>:</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a84375c05d1c40d9992aa1290dd488410">i2c_i</a> () = <span class="keywordflow">default</span>; </div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#a84375c05d1c40d9992aa1290dd488410">i2c_i</a> (<span class="keyword">const</span> <a class="code" href="classutl_1_1i2c__i.html#aa9267a8602702b78f188e0cf61b68a55">type</a>&amp;) = <span class="keyword">delete</span>; </div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <a class="code" href="classutl_1_1i2c__i.html#aa9267a8602702b78f188e0cf61b68a55">type</a>&amp; <a class="code" href="classutl_1_1i2c__i.html#aee83d11e02c3a0639dd3ed1ea440ed24">operator= </a>(<span class="keyword">const</span> <a class="code" href="classutl_1_1i2c__i.html#aa9267a8602702b78f188e0cf61b68a55">type</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keyword">virtual</span> <a class="code" href="classutl_1_1i2c__i.html#a6a07d19db8974ad606031b60a6079957">~i2c_i</a> () = <span class="keywordflow">default</span>; </div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="keyword">virtual</span> uint32_t <a class="code" href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51">_clock</a> () <span class="keyword">const</span> = 0; </div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51">_clock</a> (uint32_t) = 0; </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#af060d656c685c1ab5dd6981c5c88b26d">_start</a>() = 0; </div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i.html#aa6202c6c7c1282071ae962fa6bb0f195">_stop</a>() = 0; </div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="keyword">virtual</span> <a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a> <a class="code" href="classutl_1_1i2c__i.html#a03a25367cdec7ceb76f8de9d5b3145fb">_rx_data</a> (<span class="keywordtype">bool</span> ack, <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5">Sequence</a> seq) = 0; </div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classutl_1_1i2c__i.html#ae2b164d2c085d5331b627ba711bbb2c9">_tx_data</a> (<a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a> byte, <a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5">Sequence</a> seq) = 0; </div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a7b905fe7f0878a83d1c08a3fb95ac093"> 180</a></span>&#160; uint32_t <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a7b905fe7f0878a83d1c08a3fb95ac093">clock</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51">_clock</a>(); } </div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a7a267d84ea677bc2d11b25dc828f67a7"> 181</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a7a267d84ea677bc2d11b25dc828f67a7">clock</a> (uint32_t c) { <a class="code" href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51">_clock</a>(c); } </div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#ad7e9c66a85ab55f80bb0977208517603"> 189</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#ad7e9c66a85ab55f80bb0977208517603">start</a> () { <a class="code" href="classutl_1_1i2c__i.html#af060d656c685c1ab5dd6981c5c88b26d">_start</a>(); }</div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a86b0da49baf7d149ce5e316db186d65c"> 190</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a86b0da49baf7d149ce5e316db186d65c">stop</a> () { <a class="code" href="classutl_1_1i2c__i.html#aa6202c6c7c1282071ae962fa6bb0f195">_stop</a>(); }</div><div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a6dccb32f00830226f6782034177c7d8b"> 203</a></span>&#160; <a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a> <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a6dccb32f00830226f6782034177c7d8b">rx_data</a> (<span class="keywordtype">bool</span> ack, <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a260541de452a9a653162b8b109b26c09">Sequence</a> seq =<a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a01af7e5aa5863a91810dd4e5d0e383ce">Sequence::BYTEnACK</a>) {</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classutl_1_1i2c__i.html#a03a25367cdec7ceb76f8de9d5b3145fb">_rx_data</a> (ack, seq);</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; }</div><div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a5e60b4bda2d7203aa8f2df35aa6dfa5d"> 218</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a5e60b4bda2d7203aa8f2df35aa6dfa5d">tx_data</a> (<a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a> byte, <a class="code" href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a260541de452a9a653162b8b109b26c09">Sequence</a> seq =<a class="code" href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a01af7e5aa5863a91810dd4e5d0e383ce">Sequence::BYTEnACK</a>) {</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classutl_1_1i2c__i.html#ae2b164d2c085d5331b627ba711bbb2c9">_tx_data</a> (byte, seq);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; }</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; };</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;<span class="preprocessor">#if defined _utl_have_concepts</span></div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; concept <span class="keywordtype">bool</span> I2c_i = requires (T t, <span class="keyword">const</span> T ct, <span class="keyword">typename</span> T::Sequence s) {</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="comment">// Object type</span></div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; requires not_&lt;std::is_copy_constructible&lt;T&gt;::value&gt;::value;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; requires not_&lt;std::is_copy_assignable&lt;T&gt;::value&gt;::value;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="comment">// Methods</span></div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; {ct.clock()} -&gt; uint32_t;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; {t.clock(0)} -&gt; void;</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; {t.start()} -&gt; void;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; {t.stop()} -&gt; void;</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; {t.rx_data (1, s)} -&gt; <a class="code" href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">byte_t</a>;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; {t.tx_data (0, s)} -&gt; bool;</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; };</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="namespaceutl_1_1i2c__i__details.html"> 243</a></span>&#160; <span class="keyword">namespace </span>i2c_i_details {</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="keyword">using</span> std::declval;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="namespaceutl_1_1i2c__i__details.html#a81c12a06fe9cf6f643718f9175da8769"> 246</a></span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> _Tp&gt; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1i2c__i__details.html#a81c12a06fe9cf6f643718f9175da8769">try_cclk_t</a> = decltype (declval&lt;const _Tp&gt;().clock());</div><div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="namespaceutl_1_1i2c__i__details.html#adaf6b9dbc57caeda1a6a85bd17ac6317"> 247</a></span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> _Tp&gt; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1i2c__i__details.html#adaf6b9dbc57caeda1a6a85bd17ac6317">try_clk_t</a> = decltype (declval&lt;_Tp&gt;().clock(declval&lt;uint32_t&gt;()));</div><div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="namespaceutl_1_1i2c__i__details.html#a173335d0a45cba1b159bf33bcefb3a46"> 248</a></span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> _Tp&gt; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1i2c__i__details.html#a173335d0a45cba1b159bf33bcefb3a46">try_start_t</a> = decltype (declval&lt;_Tp&gt;().start());</div><div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="namespaceutl_1_1i2c__i__details.html#a25cbce342478441f05d3a101fcafc02c"> 249</a></span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> _Tp&gt; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1i2c__i__details.html#a25cbce342478441f05d3a101fcafc02c">try_stop_t</a> = decltype (declval&lt;_Tp&gt;().stop());</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> _Tp&gt; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1i2c__i__details.html#a10de1b351bd683c5435e2db3d682819c">try_rx_data_t</a></div><div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="namespaceutl_1_1i2c__i__details.html#a10de1b351bd683c5435e2db3d682819c"> 251</a></span>&#160; = decltype (declval&lt;_Tp&gt;().rx_data (declval&lt;bool&gt;(), declval&lt;typename _Tp::Sequence&gt;()));</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> _Tp&gt; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1i2c__i__details.html#ad8d87a56b12244ba8060f8d27207083f">try_tx_data_t</a></div><div class="line"><a name="l00253"></a><span class="lineno"><a class="line" href="namespaceutl_1_1i2c__i__details.html#ad8d87a56b12244ba8060f8d27207083f"> 253</a></span>&#160; = decltype (declval&lt;_Tp&gt;().tx_data (declval&lt;byte_t&gt;(), declval&lt;typename _Tp::Sequence&gt;()));</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _Tp, <span class="keyword">typename</span> =<span class="keywordtype">void</span>&gt;</div><div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="structutl_1_1i2c__i__details_1_1is__i2c__.html"> 257</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structutl_1_1i2c__i__details_1_1is__i2c__.html">is_i2c_</a> : <a class="code" href="namespaceutl_1_1meta.html#a55511dbaa0adb605ce22dcec11f8d22d">meta::false_</a> { };</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _Tp&gt;</div><div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="structutl_1_1i2c__i__details_1_1is__i2c___3_01___tp_00_01meta_1_1void__t_3_01typename_01___tp_1_1_sequence_00_01void_01_4_01_4.html"> 261</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structutl_1_1i2c__i__details_1_1is__i2c__.html">is_i2c_</a> &lt;_Tp,</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; meta::<a class="code" href="group__detection.html#gae7373c997420d16cf37e542eb3cfa3ad">void_t</a> &lt;</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; typename _Tp::Sequence,</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;<span class="comment">// meta::use_if_same_t &lt;uint32_t,try_cclk_t &lt;_Tp&gt;&gt;,</span></div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160;<span class="comment">// meta::use_if_same_t &lt;void, try_clk_t &lt;_Tp&gt;&gt;,</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;<span class="comment">// meta::use_if_same_t &lt;void, try_start_t &lt;_Tp&gt;&gt;,</span></div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;<span class="comment">// meta::use_if_same_t &lt;void, try_stop_t &lt;_Tp&gt;&gt;,</span></div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;<span class="comment">// meta::use_if_same_t &lt;byte_t, try_rx_data_t &lt;_Tp&gt;&gt;,</span></div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;<span class="comment">// meta::use_if_same_t &lt;bool, try_tx_data_t &lt;_Tp&gt;&gt;</span></div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; void</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; &gt;</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; &gt; : <a class="code" href="namespaceutl_1_1meta.html#ae9a5a8fbe8202785f059935af219fb97">meta::true_</a> { };</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; }</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;<span class="comment">// template &lt;typename _Tp&gt;</span></div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;<span class="comment">// constexpr bool I2c_i = i2c_i_details::is_i2c_&lt;_Tp&gt;::value;</span></div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;} <span class="comment">// namespace utl</span></div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;<span class="preprocessor">#endif // _utl_com_i2c_h__</span></div><div class="ttc" id="meta_8h_html"><div class="ttname"><a href="meta_8h.html">meta.h</a></div><div class="ttdoc">Include all meta library. </div></div>
  92. <div class="ttc" id="group__detection_html_gae7373c997420d16cf37e542eb3cfa3ad"><div class="ttname"><a href="group__detection.html#gae7373c997420d16cf37e542eb3cfa3ad">utl::meta::void_t</a></div><div class="ttdeci">void void_t</div><div class="ttdoc">void_t type alias </div><div class="ttdef"><b>Definition:</b> <a href="detection_8h_source.html#l00055">detection.h:55</a></div></div>
  93. <div class="ttc" id="structutl_1_1i2c__i__details_1_1is__i2c___html"><div class="ttname"><a href="structutl_1_1i2c__i__details_1_1is__i2c__.html">utl::i2c_i_details::is_i2c_</a></div><div class="ttdoc">Primary template to catch any non I2C interface types. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00257">i2c.h:257</a></div></div>
  94. <div class="ttc" id="classutl_1_1i2c__i_html_ae4c59938aeeb1f0726195d425a4c0083"><div class="ttname"><a href="classutl_1_1i2c__i.html#ae4c59938aeeb1f0726195d425a4c0083">utl::i2c_i::clock</a></div><div class="ttdeci">void clock(uint32_t f)</div><div class="ttdoc">set clock frequency of the bus </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00088">i2c.h:88</a></div></div>
  95. <div class="ttc" id="classutl_1_1i2c__i_html"><div class="ttname"><a href="classutl_1_1i2c__i.html">utl::i2c_i</a></div><div class="ttdoc">Abstract base class for i2c bus. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00043">i2c.h:43</a></div></div>
  96. <div class="ttc" id="namespaceutl_1_1i2c__i__details_html_a25cbce342478441f05d3a101fcafc02c"><div class="ttname"><a href="namespaceutl_1_1i2c__i__details.html#a25cbce342478441f05d3a101fcafc02c">utl::i2c_i_details::try_stop_t</a></div><div class="ttdeci">decltype(declval&lt; _Tp &gt;().stop()) try_stop_t</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00249">i2c.h:249</a></div></div>
  97. <div class="ttc" id="classutl_1_1i2c__i_3_01virtual__tag_01_4_html"><div class="ttname"><a href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html">utl::i2c_i&lt; virtual_tag &gt;</a></div><div class="ttdoc">A virtual base class specialization. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00140">i2c.h:140</a></div></div>
  98. <div class="ttc" id="namespaceutl_1_1meta_html_ae9a5a8fbe8202785f059935af219fb97"><div class="ttname"><a href="namespaceutl_1_1meta.html#ae9a5a8fbe8202785f059935af219fb97">utl::meta::true_</a></div><div class="ttdeci">bool_&lt; true &gt; true_</div><div class="ttdoc">The type used as a compile-time boolean with true value. </div><div class="ttdef"><b>Definition:</b> <a href="integral_8h_source.html#l00068">integral.h:68</a></div></div>
  99. <div class="ttc" id="crtp_8h_html"><div class="ttname"><a href="crtp_8h.html">crtp.h</a></div></div>
  100. <div class="ttc" id="namespaceutl_1_1i2c__i__details_html_ad8d87a56b12244ba8060f8d27207083f"><div class="ttname"><a href="namespaceutl_1_1i2c__i__details.html#ad8d87a56b12244ba8060f8d27207083f">utl::i2c_i_details::try_tx_data_t</a></div><div class="ttdeci">decltype(declval&lt; _Tp &gt;().tx_data(declval&lt; byte_t &gt;(), declval&lt; typename _Tp::Sequence &gt;())) try_tx_data_t</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00253">i2c.h:253</a></div></div>
  101. <div class="ttc" id="namespaceutl_1_1i2c__i__details_html_a81c12a06fe9cf6f643718f9175da8769"><div class="ttname"><a href="namespaceutl_1_1i2c__i__details.html#a81c12a06fe9cf6f643718f9175da8769">utl::i2c_i_details::try_cclk_t</a></div><div class="ttdeci">decltype(declval&lt; const _Tp &gt;().clock()) try_cclk_t</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00246">i2c.h:246</a></div></div>
  102. <div class="ttc" id="namespaceutl_1_1i2c__i__details_html_a10de1b351bd683c5435e2db3d682819c"><div class="ttname"><a href="namespaceutl_1_1i2c__i__details.html#a10de1b351bd683c5435e2db3d682819c">utl::i2c_i_details::try_rx_data_t</a></div><div class="ttdeci">decltype(declval&lt; _Tp &gt;().rx_data(declval&lt; bool &gt;(), declval&lt; typename _Tp::Sequence &gt;())) try_rx_data_t</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00251">i2c.h:251</a></div></div>
  103. <div class="ttc" id="classutl_1_1i2c__i_html_a84375c05d1c40d9992aa1290dd488410"><div class="ttname"><a href="classutl_1_1i2c__i.html#a84375c05d1c40d9992aa1290dd488410">utl::i2c_i::i2c_i</a></div><div class="ttdeci">i2c_i()=default</div><div class="ttdoc">Allow constructor from derived only. </div></div>
  104. <div class="ttc" id="classutl_1_1i2c__i_html_aa6202c6c7c1282071ae962fa6bb0f195"><div class="ttname"><a href="classutl_1_1i2c__i.html#aa6202c6c7c1282071ae962fa6bb0f195">utl::i2c_i::_stop</a></div><div class="ttdeci">void _stop()</div><div class="ttdoc">Send stop functionality. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00077">i2c.h:77</a></div></div>
  105. <div class="ttc" id="classutl_1_1i2c__i_html_a6a07d19db8974ad606031b60a6079957"><div class="ttname"><a href="classutl_1_1i2c__i.html#a6a07d19db8974ad606031b60a6079957">utl::i2c_i::~i2c_i</a></div><div class="ttdeci">~i2c_i()=default</div><div class="ttdoc">Allow destructor from derived only. </div></div>
  106. <div class="ttc" id="namespaceutl_1_1i2c__i__details_html_adaf6b9dbc57caeda1a6a85bd17ac6317"><div class="ttname"><a href="namespaceutl_1_1i2c__i__details.html#adaf6b9dbc57caeda1a6a85bd17ac6317">utl::i2c_i_details::try_clk_t</a></div><div class="ttdeci">decltype(declval&lt; _Tp &gt;().clock(declval&lt; uint32_t &gt;())) try_clk_t</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00247">i2c.h:247</a></div></div>
  107. <div class="ttc" id="namespaceutl_1_1meta_html_a55511dbaa0adb605ce22dcec11f8d22d"><div class="ttname"><a href="namespaceutl_1_1meta.html#a55511dbaa0adb605ce22dcec11f8d22d">utl::meta::false_</a></div><div class="ttdeci">bool_&lt; false &gt; false_</div><div class="ttdoc">The type used as a compile-time boolean with false value. </div><div class="ttdef"><b>Definition:</b> <a href="integral_8h_source.html#l00069">integral.h:69</a></div></div>
  108. <div class="ttc" id="classutl_1_1i2c__i_html_afa0b1552f8fc7c971456fab1ad01242d"><div class="ttname"><a href="classutl_1_1i2c__i.html#afa0b1552f8fc7c971456fab1ad01242d">utl::i2c_i::_clock</a></div><div class="ttdeci">void _clock(uint32_t c)</div><div class="ttdoc">set clock frequency of the bus [Hz] </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00075">i2c.h:75</a></div></div>
  109. <div class="ttc" id="namespaceutl_html"><div class="ttname"><a href="namespaceutl.html">utl</a></div><div class="ttdoc">STL&amp;#39;s core language concepts. </div><div class="ttdef"><b>Definition:</b> <a href="__1wire_8h_source.html#l00030">_1wire.h:30</a></div></div>
  110. <div class="ttc" id="classutl_1_1i2c__i_3_01virtual__tag_01_4_html_a7b905fe7f0878a83d1c08a3fb95ac093"><div class="ttname"><a href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a7b905fe7f0878a83d1c08a3fb95ac093">utl::i2c_i&lt; virtual_tag &gt;::clock</a></div><div class="ttdeci">uint32_t clock() const</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00180">i2c.h:180</a></div></div>
  111. <div class="ttc" id="classutl_1_1i2c__i_3_01virtual__tag_01_4_html_ad7e9c66a85ab55f80bb0977208517603"><div class="ttname"><a href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#ad7e9c66a85ab55f80bb0977208517603">utl::i2c_i&lt; virtual_tag &gt;::start</a></div><div class="ttdeci">void start()</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00189">i2c.h:189</a></div></div>
  112. <div class="ttc" id="classutl_1_1i2c__i_html_a1310b52ac908b8c37059fb253cc3f56e"><div class="ttname"><a href="classutl_1_1i2c__i.html#a1310b52ac908b8c37059fb253cc3f56e">utl::i2c_i::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdoc">Send stop functionality. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00097">i2c.h:97</a></div></div>
  113. <div class="ttc" id="classutl_1_1i2c__i_html_a3591683e5fbf17b582f6ac1f79af871d"><div class="ttname"><a href="classutl_1_1i2c__i.html#a3591683e5fbf17b582f6ac1f79af871d">utl::i2c_i::start</a></div><div class="ttdeci">void start()</div><div class="ttdoc">Send start functionality. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00096">i2c.h:96</a></div></div>
  114. <div class="ttc" id="classutl_1_1i2c__i_html_a7e2dde443c6c9bde4a2293beb22950c5"><div class="ttname"><a href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5">utl::i2c_i&lt; i2c_bb_i&lt; impl_t &gt; &gt;::Sequence</a></div><div class="ttdeci">Sequence</div><div class="ttdoc">I2C transmit/receive sequence. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00049">i2c.h:49</a></div></div>
  115. <div class="ttc" id="classutl_1_1i2c__i_html_aa9267a8602702b78f188e0cf61b68a55"><div class="ttname"><a href="classutl_1_1i2c__i.html#aa9267a8602702b78f188e0cf61b68a55">utl::i2c_i::type</a></div><div class="ttdeci">i2c_i&lt; impl_t &gt; type</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00047">i2c.h:47</a></div></div>
  116. <div class="ttc" id="classutl_1_1i2c__i_html_a7e2dde443c6c9bde4a2293beb22950c5a0fc437bc317835cad5faafc12a83fad5"><div class="ttname"><a href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a0fc437bc317835cad5faafc12a83fad5">utl::i2c_i::Sequence::ACK</a></div><div class="ttdoc">Only send/receive ack [1 clock]. </div></div>
  117. <div class="ttc" id="classutl_1_1i2c__i_html_ae2b164d2c085d5331b627ba711bbb2c9"><div class="ttname"><a href="classutl_1_1i2c__i.html#ae2b164d2c085d5331b627ba711bbb2c9">utl::i2c_i::_tx_data</a></div><div class="ttdeci">bool _tx_data(byte_t byte, Sequence seq)</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00079">i2c.h:79</a></div></div>
  118. <div class="ttc" id="classutl_1_1i2c__i_3_01virtual__tag_01_4_html_a6dccb32f00830226f6782034177c7d8b"><div class="ttname"><a href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a6dccb32f00830226f6782034177c7d8b">utl::i2c_i&lt; virtual_tag &gt;::rx_data</a></div><div class="ttdeci">byte_t rx_data(bool ack, Sequence seq=Sequence::BYTEnACK)</div><div class="ttdoc">Receive a byte from the i2c bus. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00203">i2c.h:203</a></div></div>
  119. <div class="ttc" id="classutl_1_1i2c__i_html_aee83d11e02c3a0639dd3ed1ea440ed24"><div class="ttname"><a href="classutl_1_1i2c__i.html#aee83d11e02c3a0639dd3ed1ea440ed24">utl::i2c_i::operator=</a></div><div class="ttdeci">type &amp; operator=(const type &amp;)=delete</div></div>
  120. <div class="ttc" id="classutl_1_1i2c__i_html_aac5fed816701cc4543acd717ec804ac0"><div class="ttname"><a href="classutl_1_1i2c__i.html#aac5fed816701cc4543acd717ec804ac0">utl::i2c_i::clock</a></div><div class="ttdeci">uint32_t clock() const</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00087">i2c.h:87</a></div></div>
  121. <div class="ttc" id="classutl_1_1i2c__i_3_01virtual__tag_01_4_html_a7a267d84ea677bc2d11b25dc828f67a7"><div class="ttname"><a href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a7a267d84ea677bc2d11b25dc828f67a7">utl::i2c_i&lt; virtual_tag &gt;::clock</a></div><div class="ttdeci">void clock(uint32_t c)</div><div class="ttdoc">set clock frequency of the bus [Hz] </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00181">i2c.h:181</a></div></div>
  122. <div class="ttc" id="classutl_1_1i2c__i_html_ab2f6a579096b4872f5dfd1530e200eda"><div class="ttname"><a href="classutl_1_1i2c__i.html#ab2f6a579096b4872f5dfd1530e200eda">utl::i2c_i::rx_data</a></div><div class="ttdeci">byte_t rx_data(bool ack, Sequence seq=Sequence::BYTEnACK)</div><div class="ttdoc">Receive a byte from the i2c bus. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00111">i2c.h:111</a></div></div>
  123. <div class="ttc" id="classutl_1_1i2c__i_html_a054b6bc43f22e14d4e9feb0772f7ada5"><div class="ttname"><a href="classutl_1_1i2c__i.html#a054b6bc43f22e14d4e9feb0772f7ada5">utl::i2c_i::_CRTP_IMPL</a></div><div class="ttdeci">_CRTP_IMPL(impl_t)</div></div>
  124. <div class="ttc" id="classutl_1_1i2c__i_html_aaf0b0ceec57fd8014ea3e6b58e9bfe3d"><div class="ttname"><a href="classutl_1_1i2c__i.html#aaf0b0ceec57fd8014ea3e6b58e9bfe3d">utl::i2c_i::tx_data</a></div><div class="ttdeci">bool tx_data(byte_t byte, Sequence seq=Sequence::BYTEnACK)</div><div class="ttdoc">Transmit a byte to the i2c bus. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00127">i2c.h:127</a></div></div>
  125. <div class="ttc" id="namespaceutl_html_a1427cb5a2b13313147a902173b91e3c1"><div class="ttname"><a href="namespaceutl.html#a1427cb5a2b13313147a902173b91e3c1">utl::byte_t</a></div><div class="ttdeci">uint8_t byte_t</div><div class="ttdoc">8 bits wide </div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00031">types.h:31</a></div></div>
  126. <div class="ttc" id="structutl_1_1virtual__tag_html"><div class="ttname"><a href="structutl_1_1virtual__tag.html">utl::virtual_tag</a></div><div class="ttdoc">virtual support tag type </div><div class="ttdef"><b>Definition:</b> <a href="crtp_8h_source.html#l00040">crtp.h:40</a></div></div>
  127. <div class="ttc" id="classutl_1_1i2c__i_3_01virtual__tag_01_4_html_a5e60b4bda2d7203aa8f2df35aa6dfa5d"><div class="ttname"><a href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a5e60b4bda2d7203aa8f2df35aa6dfa5d">utl::i2c_i&lt; virtual_tag &gt;::tx_data</a></div><div class="ttdeci">bool tx_data(byte_t byte, Sequence seq=Sequence::BYTEnACK)</div><div class="ttdoc">Transmit a byte to the i2c bus. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00218">i2c.h:218</a></div></div>
  128. <div class="ttc" id="classutl_1_1i2c__i_html_a7e2dde443c6c9bde4a2293beb22950c5a01af7e5aa5863a91810dd4e5d0e383ce"><div class="ttname"><a href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5a01af7e5aa5863a91810dd4e5d0e383ce">utl::i2c_i::Sequence::BYTEnACK</a></div><div class="ttdoc">Read/Write byte and ack [9 clocks]. </div></div>
  129. <div class="ttc" id="classutl_1_1i2c__i_3_01virtual__tag_01_4_html_a86b0da49baf7d149ce5e316db186d65c"><div class="ttname"><a href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a86b0da49baf7d149ce5e316db186d65c">utl::i2c_i&lt; virtual_tag &gt;::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00190">i2c.h:190</a></div></div>
  130. <div class="ttc" id="classutl_1_1i2c__i_html_aefdea61282b9282ae10384951bb4ea51"><div class="ttname"><a href="classutl_1_1i2c__i.html#aefdea61282b9282ae10384951bb4ea51">utl::i2c_i::_clock</a></div><div class="ttdeci">uint32_t _clock() const</div><div class="ttdoc">clock frequency of the bus [Hz] </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00074">i2c.h:74</a></div></div>
  131. <div class="ttc" id="classutl_1_1i2c__i_html_a7e2dde443c6c9bde4a2293beb22950c5ae409eb2ba6eb6801f52763ae370c350e"><div class="ttname"><a href="classutl_1_1i2c__i.html#a7e2dde443c6c9bde4a2293beb22950c5ae409eb2ba6eb6801f52763ae370c350e">utl::i2c_i::Sequence::BYTE</a></div><div class="ttdoc">Only read/write byte [8 clocks]. </div></div>
  132. <div class="ttc" id="classutl_1_1i2c__i_html_af060d656c685c1ab5dd6981c5c88b26d"><div class="ttname"><a href="classutl_1_1i2c__i.html#af060d656c685c1ab5dd6981c5c88b26d">utl::i2c_i::_start</a></div><div class="ttdeci">void _start()</div><div class="ttdoc">Send start functionality. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00076">i2c.h:76</a></div></div>
  133. <div class="ttc" id="classutl_1_1i2c__i_3_01virtual__tag_01_4_html_a260541de452a9a653162b8b109b26c09"><div class="ttname"><a href="classutl_1_1i2c__i_3_01virtual__tag_01_4.html#a260541de452a9a653162b8b109b26c09">utl::i2c_i&lt; virtual_tag &gt;::Sequence</a></div><div class="ttdeci">Sequence</div><div class="ttdoc">I2C transmit/receive sequence. </div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00145">i2c.h:145</a></div></div>
  134. <div class="ttc" id="classutl_1_1i2c__i_html_a03a25367cdec7ceb76f8de9d5b3145fb"><div class="ttname"><a href="classutl_1_1i2c__i.html#a03a25367cdec7ceb76f8de9d5b3145fb">utl::i2c_i::_rx_data</a></div><div class="ttdeci">byte_t _rx_data(bool ack, Sequence seq)</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00078">i2c.h:78</a></div></div>
  135. <div class="ttc" id="namespaceutl_1_1i2c__i__details_html_a173335d0a45cba1b159bf33bcefb3a46"><div class="ttname"><a href="namespaceutl_1_1i2c__i__details.html#a173335d0a45cba1b159bf33bcefb3a46">utl::i2c_i_details::try_start_t</a></div><div class="ttdeci">decltype(declval&lt; _Tp &gt;().start()) try_start_t</div><div class="ttdef"><b>Definition:</b> <a href="i2c_8h_source.html#l00248">i2c.h:248</a></div></div>
  136. <div class="ttc" id="impl_8h_html"><div class="ttname"><a href="impl_8h.html">impl.h</a></div><div class="ttdoc">Implementation detail main forward header. </div></div>
  137. </div><!-- fragment --></div><!-- contents -->
  138. </div><!-- doc-content -->
  139. <!-- start footer part -->
  140. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  141. <ul>
  142. <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_82754f54d9380477ef02477185c1f103.html">utl</a></li><li class="navelem"><a class="el" href="dir_b2ad3c1a6521a4924fa9194d98c323e2.html">com</a></li><li class="navelem"><a class="el" href="i2c_8h.html">i2c.h</a></li>
  143. <li class="footer">Generated by
  144. <a href="http://www.doxygen.org/index.html">
  145. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  146. </ul>
  147. </div>
  148. </body>
  149. </html>