159 lines
11 KiB
HTML
159 lines
11 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.13.2"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>LibSpindle-C-Library: FreeRTOS Spindle Library</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>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></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>
|
|
<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 id="projectrow">
|
|
<td id="projectlogo"><img alt="Logo" src="banner.png"/></td>
|
|
<td id="projectalign">
|
|
<div id="projectname">LibSpindle-C-Library<span id="projectnumber"> 1.0</span>
|
|
</div>
|
|
<div id="projectbrief">Library Code documentation</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.13.2 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search',true);
|
|
$(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></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">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function(){initNavTree('index.html',''); initResizable(true); });
|
|
/* @license-end */
|
|
</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">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div><div class="header">
|
|
<div class="headertitle"><div class="title">FreeRTOS Spindle Library </div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><h1><a class="anchor" id="intro_sec"></a>
|
|
Introduction</h1>
|
|
<p>The following code documentation is a set of tipps and diagramms as well as function and structure descriptions which help when using the library. It is used to increase the implementation speed. Some examples are attached in this documentation as well</p>
|
|
<h1><a class="anchor" id="static_sec"></a>
|
|
static compile flags of the library</h1>
|
|
<p>There are no additional static compile flags or DEFINES which the user can configure</p>
|
|
<h1><a class="anchor" id="instantiation"></a>
|
|
library instantiation</h1>
|
|
<p>The library is implemented as a singleton pattern. This means that only one instance can be created at runtime. Calling the SPINDLE_CreateInstance multiple times will succeed but always the pointer of the first instance will be returned.</p>
|
|
<h1><a class="anchor" id="state_example"></a>
|
|
Examples</h1>
|
|
<p>The following example shows how to create a instance of the spindle controller library.</p>
|
|
<div class="fragment"><div class="line"><span class="comment">// set parameters for the physical system</span></div>
|
|
<div class="line"><a class="code hl_typedef" href="Spindle_8h.html#a668bd557de626b1ef65f4d756d58146c">SpindlePhysicalParams_t</a> s;</div>
|
|
<div class="line">s.<a class="code hl_variable" href="structSpindlePhysicalParams.html#adfaf8529f3786ebbbdf35ac5f82378c9">maxRPM</a> = 9000.0f;</div>
|
|
<div class="line">s.<a class="code hl_variable" href="structSpindlePhysicalParams.html#ab4bdae3ef239883e33e869386af2539c">minRPM</a> = -9000.0f;</div>
|
|
<div class="line">s.<a class="code hl_variable" href="structSpindlePhysicalParams.html#a7c87b88b1401fb6b3ec633a6b10ae00a">absMinRPM</a> = 1600.0f;</div>
|
|
<div class="line">s.setDirection = SPINDLE_SetDirection;</div>
|
|
<div class="line">s.<a class="code hl_variable" href="structSpindlePhysicalParams.html#a58a62895bf4d12b4b2c443431fb3cf38">setDutyCycle</a> = SPINDLE_SetDutyCycle;</div>
|
|
<div class="line">s.<a class="code hl_variable" href="structSpindlePhysicalParams.html#a53f799f4576e8bc616374a30f074a9a9">enaPWM</a> = SPINDLE_EnaPWM;</div>
|
|
<div class="line">s.<a class="code hl_variable" href="structSpindlePhysicalParams.html#a0bca5167d854343844b69767dfd05d1b">context</a> = NULL;</div>
|
|
<div class="line"><a class="code hl_function" href="Spindle_8c.html#ac853c2ad50f0e661cd06c2c68fe465d3">SPINDLE_CreateInstance</a>( 4*configMINIMAL_STACK_SIZE, configMAX_PRIORITIES - 3, c, &s);</div>
|
|
<div class="line"> </div>
|
|
<div class="line">...</div>
|
|
<div class="ttc" id="aSpindle_8c_html_ac853c2ad50f0e661cd06c2c68fe465d3"><div class="ttname"><a href="Spindle_8c.html#ac853c2ad50f0e661cd06c2c68fe465d3">SPINDLE_CreateInstance</a></div><div class="ttdeci">SpindleHandle_t SPINDLE_CreateInstance(unsigned int uxStackDepth, int xPrio, ConsoleHandle_t cH, SpindlePhysicalParams_t *p)</div><div class="ttdef"><b>Definition</b> Spindle.c:357</div></div>
|
|
<div class="ttc" id="aSpindle_8h_html_a668bd557de626b1ef65f4d756d58146c"><div class="ttname"><a href="Spindle_8h.html#a668bd557de626b1ef65f4d756d58146c">SpindlePhysicalParams_t</a></div><div class="ttdeci">struct SpindlePhysicalParams SpindlePhysicalParams_t</div></div>
|
|
<div class="ttc" id="astructSpindlePhysicalParams_html_a0bca5167d854343844b69767dfd05d1b"><div class="ttname"><a href="structSpindlePhysicalParams.html#a0bca5167d854343844b69767dfd05d1b">SpindlePhysicalParams::context</a></div><div class="ttdeci">void * context</div><div class="ttdef"><b>Definition</b> Spindle.h:107</div></div>
|
|
<div class="ttc" id="astructSpindlePhysicalParams_html_a53f799f4576e8bc616374a30f074a9a9"><div class="ttname"><a href="structSpindlePhysicalParams.html#a53f799f4576e8bc616374a30f074a9a9">SpindlePhysicalParams::enaPWM</a></div><div class="ttdeci">void(* enaPWM)(SpindleHandle_t h, void *context, int ena)</div><div class="ttdef"><b>Definition</b> Spindle.h:82</div></div>
|
|
<div class="ttc" id="astructSpindlePhysicalParams_html_a58a62895bf4d12b4b2c443431fb3cf38"><div class="ttname"><a href="structSpindlePhysicalParams.html#a58a62895bf4d12b4b2c443431fb3cf38">SpindlePhysicalParams::setDutyCycle</a></div><div class="ttdeci">void(* setDutyCycle)(SpindleHandle_t h, void *context, int backwards, float dutyCycle)</div><div class="ttdef"><b>Definition</b> Spindle.h:51</div></div>
|
|
<div class="ttc" id="astructSpindlePhysicalParams_html_a7c87b88b1401fb6b3ec633a6b10ae00a"><div class="ttname"><a href="structSpindlePhysicalParams.html#a7c87b88b1401fb6b3ec633a6b10ae00a">SpindlePhysicalParams::absMinRPM</a></div><div class="ttdeci">float absMinRPM</div><div class="ttdef"><b>Definition</b> Spindle.h:96</div></div>
|
|
<div class="ttc" id="astructSpindlePhysicalParams_html_ab4bdae3ef239883e33e869386af2539c"><div class="ttname"><a href="structSpindlePhysicalParams.html#ab4bdae3ef239883e33e869386af2539c">SpindlePhysicalParams::minRPM</a></div><div class="ttdeci">float minRPM</div><div class="ttdef"><b>Definition</b> Spindle.h:102</div></div>
|
|
<div class="ttc" id="astructSpindlePhysicalParams_html_adfaf8529f3786ebbbdf35ac5f82378c9"><div class="ttname"><a href="structSpindlePhysicalParams.html#adfaf8529f3786ebbbdf35ac5f82378c9">SpindlePhysicalParams::maxRPM</a></div><div class="ttdeci">float maxRPM</div><div class="ttdef"><b>Definition</b> Spindle.h:88</div></div>
|
|
</div><!-- fragment --><p>The following example shows the usage of the spindle library via console. With the spindle command the user can start or stop the spindle and it can also change the spindle speed with the start command The command returns OK or FAIL in the given cases of failure or success. There is also a status command. It returns the state of the spindle (turning) and the RPM which has been set. It also terminates with "OK" or "FAIL"</p>
|
|
<div class="fragment"><div class="line"><span class="comment">// starts the spindle</span></div>
|
|
<div class="line">$> spindle start <RPM></div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="comment">// sets another spped of the spindle</span></div>
|
|
<div class="line">$> spindle start <RPM></div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="comment">// stops the spindle</span></div>
|
|
<div class="line">$> spindle stop</div>
|
|
</div><!-- fragment --><div class="fragment"><div class="line"><span class="comment">// get the status the spindle</span></div>
|
|
<div class="line">$> spindle status</div>
|
|
</div><!-- fragment --> </div></div><!-- PageDoc -->
|
|
<a href="doxygen_crawl.html"></a>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="footer">Generated on Thu Oct 30 2025 19:28:48 for LibSpindle-C-Library by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|