]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1_GCC/freedom-metal/doc/html/apiref/timer.html
Added the "full" demo to the RISC-V_RV32_SiFive_HiFive1_GCC demo - backup check in...
[freertos] / FreeRTOS / Demo / RISC-V_RV32_SiFive_HiFive1_GCC / freedom-metal / doc / html / apiref / timer.html
1
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5 <html xmlns="http://www.w3.org/1999/xhtml">
6   <head>
7     <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
8     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9     <title>Timer API &#8212; Freedom Metal v201905 documentation</title>
10     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
11     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
12     <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
13     <script type="text/javascript" src="../_static/jquery.js"></script>
14     <script type="text/javascript" src="../_static/underscore.js"></script>
15     <script type="text/javascript" src="../_static/doctools.js"></script>
16     <link rel="index" title="Index" href="../genindex.html" />
17     <link rel="search" title="Search" href="../search.html" />
18     <link rel="next" title="TTY" href="tty.html" />
19     <link rel="prev" title="Switches" href="switch.html" />
20    
21   <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
22   
23   
24   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
25
26   </head><body>
27   
28
29     <div class="document">
30       <div class="documentwrapper">
31         <div class="bodywrapper">
32           
33
34           <div class="body" role="main">
35             
36   <div class="section" id="timer-api">
37 <h1>Timer API<a class="headerlink" href="#timer-api" title="Permalink to this headline">¶</a></h1>
38 <p>API for reading and manipulating the machine timer. </p>
39 <div class="breathe-sectiondef docutils container">
40 <p class="breathe-sectiondef-title rubric">Functions</p>
41 <dl class="function">
42 <dt id="_CPPv326metal_timer_get_cyclecountiPy">
43 <span id="_CPPv226metal_timer_get_cyclecountiPy"></span><span id="metal_timer_get_cyclecount__i.unsigned-l-lP"></span><span class="target" id="timer_8h_1a588c4745871b6422c92a0de543473278"></span>int <code class="descname">metal_timer_get_cyclecount</code><span class="sig-paren">(</span>int <em>hartid</em>, unsigned long long *<em>cyclecount</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv326metal_timer_get_cyclecountiPy" title="Permalink to this definition">¶</a><br /></dt>
44 <dd><p>Read the machine cycle count. </p>
45 <p><dl class="docutils">
46 <dt><strong>Return</strong></dt>
47 <dd>0 upon success </dd>
48 <dt><strong>Parameters</strong></dt>
49 <dd><ul class="breatheparameterlist first last simple">
50 <li><code class="docutils literal notranslate"><span class="pre">hartid</span></code>: The hart ID to read the cycle count of </li>
51 <li><code class="docutils literal notranslate"><span class="pre">cyclecount</span></code>: The variable to hold the value </li>
52 </ul>
53 </dd>
54 </dl>
55 </p>
56 </dd></dl>
57
58 <dl class="function">
59 <dt id="_CPPv334metal_timer_get_timebase_frequencyiPy">
60 <span id="_CPPv234metal_timer_get_timebase_frequencyiPy"></span><span id="metal_timer_get_timebase_frequency__i.unsigned-l-lP"></span><span class="target" id="timer_8h_1aa98ddd44b788bd7ba2a132035692eacb"></span>int <code class="descname">metal_timer_get_timebase_frequency</code><span class="sig-paren">(</span>int <em>hartid</em>, unsigned long long *<em>timebase</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv334metal_timer_get_timebase_frequencyiPy" title="Permalink to this definition">¶</a><br /></dt>
61 <dd><p>Get the machine timebase frequency. </p>
62 <p><dl class="docutils">
63 <dt><strong>Return</strong></dt>
64 <dd>0 upon success </dd>
65 <dt><strong>Parameters</strong></dt>
66 <dd><ul class="breatheparameterlist first last simple">
67 <li><code class="docutils literal notranslate"><span class="pre">hartid</span></code>: The hart ID to read the timebase of </li>
68 <li><code class="docutils literal notranslate"><span class="pre">timebase</span></code>: The variable to hold the value </li>
69 </ul>
70 </dd>
71 </dl>
72 </p>
73 </dd></dl>
74
75 <dl class="function">
76 <dt id="_CPPv320metal_timer_set_tickii">
77 <span id="_CPPv220metal_timer_set_tickii"></span><span id="metal_timer_set_tick__i.i"></span><span class="target" id="timer_8h_1ad06b0a0e3e2379194b3bbaafb1a95753"></span>int <code class="descname">metal_timer_set_tick</code><span class="sig-paren">(</span>int <em>hartid</em>, int <em>second</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv320metal_timer_set_tickii" title="Permalink to this definition">¶</a><br /></dt>
78 <dd><p>Set the machine timer tick interval in seconds. </p>
79 <p><dl class="docutils">
80 <dt><strong>Return</strong></dt>
81 <dd>0 upon success </dd>
82 <dt><strong>Parameters</strong></dt>
83 <dd><ul class="breatheparameterlist first last simple">
84 <li><code class="docutils literal notranslate"><span class="pre">hartid</span></code>: The hart ID to read the timebase of </li>
85 <li><code class="docutils literal notranslate"><span class="pre">second</span></code>: The number of seconds to set the tick interval to </li>
86 </ul>
87 </dd>
88 </dl>
89 </p>
90 </dd></dl>
91
92 </div>
93 </div>
94
95
96           </div>
97           
98         </div>
99       </div>
100       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
101         <div class="sphinxsidebarwrapper">
102 <h1 class="logo"><a href="../index.html">Freedom Metal</a></h1>
103
104
105
106
107
108
109
110
111 <h3>Navigation</h3>
112 <ul class="current">
113 <li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction to Freedom Metal</a></li>
114 <li class="toctree-l1"><a class="reference internal" href="../devguide.html">Developer Guide</a></li>
115 <li class="toctree-l1 current"><a class="reference internal" href="../api.html">API Reference</a><ul class="current">
116 <li class="toctree-l2"><a class="reference internal" href="button.html">Buttons</a></li>
117 <li class="toctree-l2"><a class="reference internal" href="cache.html">Caches</a></li>
118 <li class="toctree-l2"><a class="reference internal" href="clock.html">Clocks</a></li>
119 <li class="toctree-l2"><a class="reference internal" href="cpu.html">CPU</a></li>
120 <li class="toctree-l2"><a class="reference internal" href="gpio.html">GPIO</a></li>
121 <li class="toctree-l2"><a class="reference internal" href="interrupt.html">Interrupts</a></li>
122 <li class="toctree-l2"><a class="reference internal" href="itim.html">ITIM</a></li>
123 <li class="toctree-l2"><a class="reference internal" href="led.html">LEDs</a></li>
124 <li class="toctree-l2"><a class="reference internal" href="lock.html">Locks</a></li>
125 <li class="toctree-l2"><a class="reference internal" href="memory.html">Memory Enumeration</a></li>
126 <li class="toctree-l2"><a class="reference internal" href="pmp.html">PMPs</a></li>
127 <li class="toctree-l2"><a class="reference internal" href="shutdown.html">Shutdown</a></li>
128 <li class="toctree-l2"><a class="reference internal" href="spi.html">SPIs</a></li>
129 <li class="toctree-l2"><a class="reference internal" href="switch.html">Switches</a></li>
130 <li class="toctree-l2 current"><a class="current reference internal" href="#">Timer API</a></li>
131 <li class="toctree-l2"><a class="reference internal" href="tty.html">TTY</a></li>
132 <li class="toctree-l2"><a class="reference internal" href="uart.html">UARTs</a></li>
133 </ul>
134 </li>
135 </ul>
136
137 <div class="relations">
138 <h3>Related Topics</h3>
139 <ul>
140   <li><a href="../index.html">Documentation overview</a><ul>
141   <li><a href="../api.html">API Reference</a><ul>
142       <li>Previous: <a href="switch.html" title="previous chapter">Switches</a></li>
143       <li>Next: <a href="tty.html" title="next chapter">TTY</a></li>
144   </ul></li>
145   </ul></li>
146 </ul>
147 </div>
148 <div id="searchbox" style="display: none" role="search">
149   <h3>Quick search</h3>
150     <div class="searchformwrapper">
151     <form class="search" action="../search.html" method="get">
152       <input type="text" name="q" />
153       <input type="submit" value="Go" />
154       <input type="hidden" name="check_keywords" value="yes" />
155       <input type="hidden" name="area" value="default" />
156     </form>
157     </div>
158 </div>
159 <script type="text/javascript">$('#searchbox').show(0);</script>
160         </div>
161       </div>
162       <div class="clearer"></div>
163     </div>
164     <div class="footer">
165       &copy;2019, SiFive Inc..
166       
167       |
168       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.7.5</a>
169       &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.11</a>
170       
171       |
172       <a href="../_sources/apiref/timer.rst.txt"
173           rel="nofollow">Page source</a>
174     </div>
175
176     
177
178     
179   </body>
180 </html>