diff options
Diffstat (limited to 'thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/CMSIS/Documentation/RTOS/html/group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html')
-rw-r--r-- | thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/CMSIS/Documentation/RTOS/html/group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html | 335 |
1 files changed, 335 insertions, 0 deletions
diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/CMSIS/Documentation/RTOS/html/group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/CMSIS/Documentation/RTOS/html/group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html new file mode 100644 index 0000000..4a46700 --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/CMSIS/Documentation/RTOS/html/group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html @@ -0,0 +1,335 @@ +<!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"/> +<title>Semaphore Management</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<link href="cmsis.css" rel="stylesheet" type="text/css" /> +<link href="navtree.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="resize.js"></script> +<script type="text/javascript" src="navtree.js"></script> +<script type="text/javascript"> + $(document).ready(initResizable); +</script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { searchBox.OnSelectItem(0); }); +</script> + +</head> +<body> +<div id="top"><!-- do not remove this div! --> + +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 46px;"> + <td id="proglogo"><img alt="CMSIS Logo" src="CMSIS_Logo_Final.png"></td> + + <td style="padding-left: 0.5em;"> + <div id="projectname">CMSIS-RTOS +  <span id="projectnumber">Version 1.00</span> + </div> + <div id="projectbrief">CMSIS-RTOS API: Generic RTOS interface for Cortex-M processor-based devices.</div> + </td> + + + + </tr> + </tbody> +</table> +</div> + +<div id="CMSISnav" class="tabs1"> + <ul class="tablist"> + <li><a href="../../General/html/index.html"><span>CMSIS</span></a></li> + <li><a href="../../Core/html/index.html"><span>CORE</span></a></li> + <li><a href="../../DSP/html/index.html"><span>DSP</span></a></li> + <li class="current"><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li> + <li><a href="../../SVD/html/index.html"><span>SVD</span></a></li> + </ul> +</div> +<!-- Generated by Doxygen 1.7.5.1 --> +<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="pages.html"><span>Usage and Description</span></a></li> + <li><a href="modules.html"><span>Reference</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> +<div id="side-nav" class="ui-resizable side-nav-resizable"> + <div id="nav-tree"> + <div id="nav-tree-contents"> + </div> + </div> + <div id="splitbar" style="-moz-user-select:none;" + class="ui-resizable-handle"> + </div> +</div> +<script type="text/javascript"> + initNavTree('group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html',''); +</script> +<div id="doc-content"> +<div class="header"> + <div class="summary"> +<a href="#define-members">Defines</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">Semaphore Management</div> </div> +<div class="ingroups"><a class="el" href="group___c_m_s_i_s___r_t_o_s.html">CMSIS-RTOS API</a></div></div> +<div class="contents"> + +<p>Control access to shared resources. +<a href="#details">More...</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="define-members"></a> +Defines</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga7da4c7bfb340779c9fc7b321f5ab3e3a">osFeature_Semaphore</a>   30</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">maximum count for SemaphoreInit function <a href="#ga7da4c7bfb340779c9fc7b321f5ab3e3a"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga9e66fe361749071e5ab87826c43c2f1b">osSemaphoreDef</a>(name)   <a class="el" href="structos_semaphore_def__t.html">osSemaphoreDef_t</a> os_semaphore_def_##name = { 0 }</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Define a Semaphore object. <a href="#ga9e66fe361749071e5ab87826c43c2f1b"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga03761ee8d2c3cd4544e18364ab301dac">osSemaphore</a>(name)   &os_semaphore_def_##name</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Access a Semaphore definition. <a href="#ga03761ee8d2c3cd4544e18364ab301dac"></a><br/></td></tr> +<tr><td colspan="2"><h2><a name="func-members"></a> +Functions</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cmsis__os_8h.html#aa8968896c84094aa973683c84fa06f84">osSemaphoreId</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga5ede9e5c5c3747cae928ff4f9d13e76d">osSemaphoreCreate</a> (<a class="el" href="structos_semaphore_def__t.html">osSemaphoreDef_t</a> *semaphore_def, int32_t count)</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Create and Initialize a Semaphore object used for managing resources. <a href="#ga5ede9e5c5c3747cae928ff4f9d13e76d"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#gacc15b0fc8ce1167fe43da33042e62098">osSemaphoreWait</a> (<a class="el" href="cmsis__os_8h.html#aa8968896c84094aa973683c84fa06f84">osSemaphoreId</a> semaphore_id, uint32_t millisec)</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait until a Semaphore token becomes available. <a href="#gacc15b0fc8ce1167fe43da33042e62098"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___c_m_s_i_s___r_t_o_s___status.html#gae2e091fefc4c767117727bd5aba4d99e">osStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#gab108914997c49e14d8ff1ae0d1988ca0">osSemaphoreRelease</a> (<a class="el" href="cmsis__os_8h.html#aa8968896c84094aa973683c84fa06f84">osSemaphoreId</a> semaphore_id)</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Release a Semaphore token. <a href="#gab108914997c49e14d8ff1ae0d1988ca0"></a><br/></td></tr> +</table> +<hr/><a name="details" id="details"></a><h2>Description</h2> +<p>The Semaphore Management function group is used to manage and protect access to shared resources. For example, with a Semaphore the access to a group of identical peripherals can be managed. The number of available resources is specified as parameter of the <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga5ede9e5c5c3747cae928ff4f9d13e76d">osSemaphoreCreate</a> function.</p> +<p>Each time a Semaphore token is obtained with <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#gacc15b0fc8ce1167fe43da33042e62098">osSemaphoreWait</a> the semaphore count is decremented. When the semaphore count is 0, no Semaphore token can be obtained. Semaphores are released with <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#gab108914997c49e14d8ff1ae0d1988ca0">osSemaphoreRelease</a>; this function increments the semaphore count.</p> +<div class="image"> +<img src="Semaphore.png" alt="Semaphore.png"/> +<div class="caption"> +CMSIS-RTOS Semaphore</div></div> +<hr/><h2>Define Documentation</h2> +<a class="anchor" id="ga7da4c7bfb340779c9fc7b321f5ab3e3a"></a><!-- doxytag: member="cmsis_os.h::osFeature_Semaphore" ref="ga7da4c7bfb340779c9fc7b321f5ab3e3a" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define osFeature_Semaphore   30</td> + </tr> + </table> +</div> +<div class="memdoc"> +<p>A CMSIS-RTOS implementation may support semaphores. The value <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga7da4c7bfb340779c9fc7b321f5ab3e3a">osFeature_Semaphore</a> indicates the maximum index count for a semaphore. </p> + +</div> +</div> +<a class="anchor" id="ga03761ee8d2c3cd4544e18364ab301dac"></a><!-- doxytag: member="cmsis_os.h::osSemaphore" ref="ga03761ee8d2c3cd4544e18364ab301dac" args="(name)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define osSemaphore</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">name</td><td>)</td> + <td>   &os_semaphore_def_##name</td> + </tr> + </table> +</div> +<div class="memdoc"> +<p>Access to semaphore object for the functions <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga5ede9e5c5c3747cae928ff4f9d13e76d">osSemaphoreCreate</a>.</p> +<dl><dt><b>Parameters:</b></dt><dd> + <table class="params"> + <tr><td class="paramname">name</td><td>name of the semaphore object. </td></tr> + </table> + </dd> +</dl> +<dl class="note"><dt><b>Note:</b></dt><dd>CAN BE CHANGED: The parameter to <b>osSemaphore</b> shall be consistent but the macro body is implementation specific in every CMSIS-RTOS. </dd></dl> + +</div> +</div> +<a class="anchor" id="ga9e66fe361749071e5ab87826c43c2f1b"></a><!-- doxytag: member="cmsis_os.h::osSemaphoreDef" ref="ga9e66fe361749071e5ab87826c43c2f1b" args="(name)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define osSemaphoreDef</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">name</td><td>)</td> + <td>   <a class="el" href="structos_semaphore_def__t.html">osSemaphoreDef_t</a> os_semaphore_def_##name = { 0 }</td> + </tr> + </table> +</div> +<div class="memdoc"> +<p>Define a semaphore object that is referenced by <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga03761ee8d2c3cd4544e18364ab301dac">osSemaphore</a>.</p> +<dl><dt><b>Parameters:</b></dt><dd> + <table class="params"> + <tr><td class="paramname">name</td><td>name of the semaphore object. </td></tr> + </table> + </dd> +</dl> +<dl class="note"><dt><b>Note:</b></dt><dd>CAN BE CHANGED: The parameter to <b>osSemaphoreDef</b> shall be consistent but the macro body is implementation specific in every CMSIS-RTOS. </dd></dl> + +</div> +</div> +<hr/><h2>Function Documentation</h2> +<a class="anchor" id="ga5ede9e5c5c3747cae928ff4f9d13e76d"></a><!-- doxytag: member="cmsis_os.h::osSemaphoreCreate" ref="ga5ede9e5c5c3747cae928ff4f9d13e76d" args="(osSemaphoreDef_t *semaphore_def, int32_t count)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="cmsis__os_8h.html#aa8968896c84094aa973683c84fa06f84">osSemaphoreId</a> osSemaphoreCreate </td> + <td>(</td> + <td class="paramtype"><a class="el" href="structos_semaphore_def__t.html">osSemaphoreDef_t</a> * </td> + <td class="paramname"><em>semaphore_def</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int32_t </td> + <td class="paramname"><em>count</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div> +<div class="memdoc"> +<dl><dt><b>Parameters:</b></dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">semaphore_def</td><td>semaphore definition referenced with <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga03761ee8d2c3cd4544e18364ab301dac">osSemaphore</a>. </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>number of available resources. </td></tr> + </table> + </dd> +</dl> +<dl class="return"><dt><b>Returns:</b></dt><dd>semaphore ID for reference by other functions or NULL in case of error. </dd></dl> +<dl class="note"><dt><b>Note:</b></dt><dd>MUST REMAIN UNCHANGED: <b>osSemaphoreCreate</b> shall be consistent in every CMSIS-RTOS.</dd></dl> +<p>Create and initialize a Semaphore object that is used to manage access to shared resources. The parameter <em>count</em> specifies the number of available resources. The <em>count</em> value 1 creates a binary semaphore. </p> + +</div> +</div> +<a class="anchor" id="gab108914997c49e14d8ff1ae0d1988ca0"></a><!-- doxytag: member="cmsis_os.h::osSemaphoreRelease" ref="gab108914997c49e14d8ff1ae0d1988ca0" args="(osSemaphoreId semaphore_id)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="group___c_m_s_i_s___r_t_o_s___status.html#gae2e091fefc4c767117727bd5aba4d99e">osStatus</a> osSemaphoreRelease </td> + <td>(</td> + <td class="paramtype"><a class="el" href="cmsis__os_8h.html#aa8968896c84094aa973683c84fa06f84">osSemaphoreId</a> </td> + <td class="paramname"><em>semaphore_id</em></td><td>)</td> + <td></td> + </tr> + </table> +</div> +<div class="memdoc"> +<dl><dt><b>Parameters:</b></dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">semaphore_id</td><td>semaphore object referenced with <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga03761ee8d2c3cd4544e18364ab301dac">osSemaphore</a>. </td></tr> + </table> + </dd> +</dl> +<dl class="return"><dt><b>Returns:</b></dt><dd>status code that indicates the execution status of the function. </dd></dl> +<dl class="note"><dt><b>Note:</b></dt><dd>MUST REMAIN UNCHANGED: <b>osSemaphoreRelease</b> shall be consistent in every CMSIS-RTOS.</dd></dl> +<p>Release a Semaphore token. This increments the count of avaiable semaphore tokens.</p> +<dl class="note"><dt><b>Note:</b></dt><dd>osSemaphoreRelease can be called also from interrupt service routines.</dd></dl> +<p><b><a class="el" href="group___c_m_s_i_s___r_t_o_s___status.html">Status and Error Codes</a></b><br/> +</p> +<ul> +<li><em>osOK:</em> the semaphore has been released.</li> +<li><em>osErrorResource:</em> all tokens have already been released.</li> +<li><em>osErrorParameter:</em> the parameter <em>semaphore_id</em> is incorrect. </li> +</ul> + +</div> +</div> +<a class="anchor" id="gacc15b0fc8ce1167fe43da33042e62098"></a><!-- doxytag: member="cmsis_os.h::osSemaphoreWait" ref="gacc15b0fc8ce1167fe43da33042e62098" args="(osSemaphoreId semaphore_id, uint32_t millisec)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int32_t osSemaphoreWait </td> + <td>(</td> + <td class="paramtype"><a class="el" href="cmsis__os_8h.html#aa8968896c84094aa973683c84fa06f84">osSemaphoreId</a> </td> + <td class="paramname"><em>semaphore_id</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">uint32_t </td> + <td class="paramname"><em>millisec</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div> +<div class="memdoc"> +<dl><dt><b>Parameters:</b></dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">semaphore_id</td><td>semaphore object referenced with <a class="el" href="group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html#ga03761ee8d2c3cd4544e18364ab301dac">osSemaphore</a>. </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">millisec</td><td>timeout value or 0 in case of no time-out. </td></tr> + </table> + </dd> +</dl> +<dl class="return"><dt><b>Returns:</b></dt><dd>number of available tokens, or -1 in case of incorrect parameters. </dd></dl> +<dl class="note"><dt><b>Note:</b></dt><dd>MUST REMAIN UNCHANGED: <b>osSemaphoreWait</b> shall be consistent in every CMSIS-RTOS.</dd></dl> +<p>Wait until a Semaphore token becomes available. When no Semaphore token is available, the function waits for the time specified with the parameter <em>millisec</em>. When <em>millisec</em> is set to <b>osWaitForever</b>, the function will wait for an infinite time until a Semaphore token becomes available. The return value indicates the number of available tokens (the semaphore count value). If 0 is returned, then no semaphore was available. </p> + +</div> +</div> +</div> +</div> + <div id="nav-path" class="navpath"> + <ul> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></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> + + + <li class="footer">Generated on Wed Mar 28 2012 15:38:10 for CMSIS-RTOS by ARM Ltd. All rights reserved. + <!-- + <a href="http://www.doxygen.org/index.html"> + <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li> + --> + </li> + </ul> + </div> + + +</body> +</html> |