<!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"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.20"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Labor04: semphr.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <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 style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Labor04 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.20 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('semphr_8h.html',''); initResizable(); }); /* @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"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#define-members">Macros</a> | <a href="#typedef-members">Typedefs</a> </div> <div class="headertitle"> <div class="title">semphr.h File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include "<a class="el" href="queue_8h_source.html">queue.h</a>"</code><br /> </div><div class="textblock"><div class="dynheader"> Include dependency graph for semphr.h:</div> <div class="dyncontent"> <div class="center"><img src="semphr_8h__incl.png" border="0" usemap="#asemphr_8h" alt=""/></div> <map name="semphr_8h" id="asemphr_8h"> <area shape="rect" title=" " alt="" coords="5,5,81,32"/> <area shape="rect" href="queue_8h.html" title=" " alt="" coords="9,80,77,107"/> </map> </div> </div> <p><a href="semphr_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> Macros</h2></td></tr> <tr class="memitem:a73cfd14cf25a13f8dd4dc1d74b7fc04a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#a73cfd14cf25a13f8dd4dc1d74b7fc04a">semBINARY_SEMAPHORE_QUEUE_LENGTH</a>   ( ( uint8_t ) 1U )</td></tr> <tr class="separator:a73cfd14cf25a13f8dd4dc1d74b7fc04a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a93bd07e28aed3084bdafa1f4e99700b2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#a93bd07e28aed3084bdafa1f4e99700b2">semSEMAPHORE_QUEUE_ITEM_LENGTH</a>   ( ( uint8_t ) 0U )</td></tr> <tr class="separator:a93bd07e28aed3084bdafa1f4e99700b2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a124bb5bd7805baa06fbd3239840d6803"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#a124bb5bd7805baa06fbd3239840d6803">semGIVE_BLOCK_TIME</a>   ( ( <a class="el" href="portmacro_8h.html#aa69c48c6e902ce54f70886e6573c92a9">TickType_t</a> ) 0U )</td></tr> <tr class="separator:a124bb5bd7805baa06fbd3239840d6803"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af116e436d2a5ae5bd72dbade2b5ea930"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#af116e436d2a5ae5bd72dbade2b5ea930">xSemaphoreTake</a>(xSemaphore, xBlockTime)   <a class="el" href="queue_8h.html#a124567e9fc3a37b99f7e184ae98de9f8">xQueueSemaphoreTake</a>( ( xSemaphore ), ( xBlockTime ) )</td></tr> <tr class="separator:af116e436d2a5ae5bd72dbade2b5ea930"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aae55761cabfa9bf85c8f4430f78c0953"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#aae55761cabfa9bf85c8f4430f78c0953">xSemaphoreGive</a>(xSemaphore)   <a class="el" href="queue_8h.html#a7ce86d1026e0c3055a523935bf53c0b3">xQueueGenericSend</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ), NULL, <a class="el" href="semphr_8h.html#a124bb5bd7805baa06fbd3239840d6803">semGIVE_BLOCK_TIME</a>, <a class="el" href="queue_8h.html#a4d78fa863fbeb90425a2dda08fae8b12">queueSEND_TO_BACK</a> )</td></tr> <tr class="separator:aae55761cabfa9bf85c8f4430f78c0953"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a68aa43df8b2a0dbe17d05fad74670ef0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#a68aa43df8b2a0dbe17d05fad74670ef0">xSemaphoreGiveFromISR</a>(xSemaphore, pxHigherPriorityTaskWoken)   <a class="el" href="queue_8h.html#ad14ae1174c2772cffc9e0c2c45dc55a6">xQueueGiveFromISR</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ), ( pxHigherPriorityTaskWoken ) )</td></tr> <tr class="separator:a68aa43df8b2a0dbe17d05fad74670ef0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a076419b58e072655686939016e7ca3c5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#a076419b58e072655686939016e7ca3c5">xSemaphoreTakeFromISR</a>(xSemaphore, pxHigherPriorityTaskWoken)   <a class="el" href="queue_8h.html#acdf528f5c91131ae2f31c669cfd65758">xQueueReceiveFromISR</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ), NULL, ( pxHigherPriorityTaskWoken ) )</td></tr> <tr class="separator:a076419b58e072655686939016e7ca3c5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acd7d0eda0923d7caeeaaee9202c43eab"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#acd7d0eda0923d7caeeaaee9202c43eab">vSemaphoreDelete</a>(xSemaphore)   <a class="el" href="queue_8h.html#a707cbcfe3aed6b877b6aa6d9d75a3f22">vQueueDelete</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ) )</td></tr> <tr class="separator:acd7d0eda0923d7caeeaaee9202c43eab"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7403bfbc06fb8449b2334f55d939a4c4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#a7403bfbc06fb8449b2334f55d939a4c4">xSemaphoreGetMutexHolder</a>(xSemaphore)   <a class="el" href="queue_8h.html#ac0db78cd3f300adcf29d618d7a0ec6fa">xQueueGetMutexHolder</a>( ( xSemaphore ) )</td></tr> <tr class="separator:a7403bfbc06fb8449b2334f55d939a4c4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac3db48a47d2030b535651f306b44191b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#ac3db48a47d2030b535651f306b44191b">xSemaphoreGetMutexHolderFromISR</a>(xSemaphore)   <a class="el" href="queue_8h.html#a2bab773f100e4945e6ba8a7924b85f50">xQueueGetMutexHolderFromISR</a>( ( xSemaphore ) )</td></tr> <tr class="separator:ac3db48a47d2030b535651f306b44191b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa26a3d7cf9b5595a652daeb7f81229f3"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#aa26a3d7cf9b5595a652daeb7f81229f3">uxSemaphoreGetCount</a>(xSemaphore)   <a class="el" href="queue_8h.html#add7ee0701ba35904d190811b9e5a4eda">uxQueueMessagesWaiting</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ) )</td></tr> <tr class="separator:aa26a3d7cf9b5595a652daeb7f81229f3"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> Typedefs</h2></td></tr> <tr class="memitem:ad88c6df4a04beedeac782918c8a332f5"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="semphr_8h.html#ad88c6df4a04beedeac782918c8a332f5">SemaphoreHandle_t</a></td></tr> <tr class="separator:ad88c6df4a04beedeac782918c8a332f5"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Macro Definition Documentation</h2> <a id="a73cfd14cf25a13f8dd4dc1d74b7fc04a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a73cfd14cf25a13f8dd4dc1d74b7fc04a">◆ </a></span>semBINARY_SEMAPHORE_QUEUE_LENGTH</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define semBINARY_SEMAPHORE_QUEUE_LENGTH   ( ( uint8_t ) 1U )</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a124bb5bd7805baa06fbd3239840d6803"></a> <h2 class="memtitle"><span class="permalink"><a href="#a124bb5bd7805baa06fbd3239840d6803">◆ </a></span>semGIVE_BLOCK_TIME</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define semGIVE_BLOCK_TIME   ( ( <a class="el" href="portmacro_8h.html#aa69c48c6e902ce54f70886e6573c92a9">TickType_t</a> ) 0U )</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a93bd07e28aed3084bdafa1f4e99700b2"></a> <h2 class="memtitle"><span class="permalink"><a href="#a93bd07e28aed3084bdafa1f4e99700b2">◆ </a></span>semSEMAPHORE_QUEUE_ITEM_LENGTH</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define semSEMAPHORE_QUEUE_ITEM_LENGTH   ( ( uint8_t ) 0U )</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="aa26a3d7cf9b5595a652daeb7f81229f3"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa26a3d7cf9b5595a652daeb7f81229f3">◆ </a></span>uxSemaphoreGetCount</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define uxSemaphoreGetCount</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">xSemaphore</td><td>)</td> <td>   <a class="el" href="queue_8h.html#add7ee0701ba35904d190811b9e5a4eda">uxQueueMessagesWaiting</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ) )</td> </tr> </table> </div><div class="memdoc"> <p><a class="el" href="semphr_8h.html">semphr.h</a> </p><pre>UBaseType_t <a class="el" href="semphr_8h.html#aa26a3d7cf9b5595a652daeb7f81229f3">uxSemaphoreGetCount( SemaphoreHandle_t xSemaphore )</a>;</pre><p>If the semaphore is a counting semaphore then <a class="el" href="semphr_8h.html#aa26a3d7cf9b5595a652daeb7f81229f3">uxSemaphoreGetCount()</a> returns its current count value. If the semaphore is a binary semaphore then <a class="el" href="semphr_8h.html#aa26a3d7cf9b5595a652daeb7f81229f3">uxSemaphoreGetCount()</a> returns 1 if the semaphore is available, and 0 if the semaphore is not available. </p> </div> </div> <a id="acd7d0eda0923d7caeeaaee9202c43eab"></a> <h2 class="memtitle"><span class="permalink"><a href="#acd7d0eda0923d7caeeaaee9202c43eab">◆ </a></span>vSemaphoreDelete</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define vSemaphoreDelete</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">xSemaphore</td><td>)</td> <td>   <a class="el" href="queue_8h.html#a707cbcfe3aed6b877b6aa6d9d75a3f22">vQueueDelete</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ) )</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a7403bfbc06fb8449b2334f55d939a4c4"></a> <h2 class="memtitle"><span class="permalink"><a href="#a7403bfbc06fb8449b2334f55d939a4c4">◆ </a></span>xSemaphoreGetMutexHolder</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define xSemaphoreGetMutexHolder</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">xSemaphore</td><td>)</td> <td>   <a class="el" href="queue_8h.html#ac0db78cd3f300adcf29d618d7a0ec6fa">xQueueGetMutexHolder</a>( ( xSemaphore ) )</td> </tr> </table> </div><div class="memdoc"> <p><a class="el" href="semphr_8h.html">semphr.h</a> </p><pre>TaskHandle_t <a class="el" href="semphr_8h.html#a7403bfbc06fb8449b2334f55d939a4c4">xSemaphoreGetMutexHolder( SemaphoreHandle_t xMutex )</a>;</pre><p>If xMutex is indeed a mutex type semaphore, return the current mutex holder. If xMutex is not a mutex type semaphore, or the mutex is available (not held by a task), return NULL.</p> <p>Note: This is a good way of determining if the calling task is the mutex holder, but not a good way of determining the identity of the mutex holder as the holder may change between the function exiting and the returned value being tested. </p> </div> </div> <a id="ac3db48a47d2030b535651f306b44191b"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac3db48a47d2030b535651f306b44191b">◆ </a></span>xSemaphoreGetMutexHolderFromISR</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define xSemaphoreGetMutexHolderFromISR</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">xSemaphore</td><td>)</td> <td>   <a class="el" href="queue_8h.html#a2bab773f100e4945e6ba8a7924b85f50">xQueueGetMutexHolderFromISR</a>( ( xSemaphore ) )</td> </tr> </table> </div><div class="memdoc"> <p><a class="el" href="semphr_8h.html">semphr.h</a> </p><pre>TaskHandle_t <a class="el" href="semphr_8h.html#ac3db48a47d2030b535651f306b44191b">xSemaphoreGetMutexHolderFromISR( SemaphoreHandle_t xMutex )</a>;</pre><p>If xMutex is indeed a mutex type semaphore, return the current mutex holder. If xMutex is not a mutex type semaphore, or the mutex is available (not held by a task), return NULL. </p> </div> </div> <a id="aae55761cabfa9bf85c8f4430f78c0953"></a> <h2 class="memtitle"><span class="permalink"><a href="#aae55761cabfa9bf85c8f4430f78c0953">◆ </a></span>xSemaphoreGive</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define xSemaphoreGive</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">xSemaphore</td><td>)</td> <td>   <a class="el" href="queue_8h.html#a7ce86d1026e0c3055a523935bf53c0b3">xQueueGenericSend</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ), NULL, <a class="el" href="semphr_8h.html#a124bb5bd7805baa06fbd3239840d6803">semGIVE_BLOCK_TIME</a>, <a class="el" href="queue_8h.html#a4d78fa863fbeb90425a2dda08fae8b12">queueSEND_TO_BACK</a> )</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a68aa43df8b2a0dbe17d05fad74670ef0"></a> <h2 class="memtitle"><span class="permalink"><a href="#a68aa43df8b2a0dbe17d05fad74670ef0">◆ </a></span>xSemaphoreGiveFromISR</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define xSemaphoreGiveFromISR</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">xSemaphore, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">pxHigherPriorityTaskWoken </td> </tr> <tr> <td></td> <td>)</td> <td></td><td>   <a class="el" href="queue_8h.html#ad14ae1174c2772cffc9e0c2c45dc55a6">xQueueGiveFromISR</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ), ( pxHigherPriorityTaskWoken ) )</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="af116e436d2a5ae5bd72dbade2b5ea930"></a> <h2 class="memtitle"><span class="permalink"><a href="#af116e436d2a5ae5bd72dbade2b5ea930">◆ </a></span>xSemaphoreTake</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define xSemaphoreTake</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">xSemaphore, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">xBlockTime </td> </tr> <tr> <td></td> <td>)</td> <td></td><td>   <a class="el" href="queue_8h.html#a124567e9fc3a37b99f7e184ae98de9f8">xQueueSemaphoreTake</a>( ( xSemaphore ), ( xBlockTime ) )</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a076419b58e072655686939016e7ca3c5"></a> <h2 class="memtitle"><span class="permalink"><a href="#a076419b58e072655686939016e7ca3c5">◆ </a></span>xSemaphoreTakeFromISR</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define xSemaphoreTakeFromISR</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">xSemaphore, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">pxHigherPriorityTaskWoken </td> </tr> <tr> <td></td> <td>)</td> <td></td><td>   <a class="el" href="queue_8h.html#acdf528f5c91131ae2f31c669cfd65758">xQueueReceiveFromISR</a>( ( <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> ) ( xSemaphore ), NULL, ( pxHigherPriorityTaskWoken ) )</td> </tr> </table> </div><div class="memdoc"> <p>semphr. h </p><pre> xSemaphoreTakeFromISR( SemaphoreHandle_t xSemaphore, BaseType_t *pxHigherPriorityTaskWoken )</pre><p><em>Macro</em> to take a semaphore from an ISR. The semaphore must have previously been created with a call to xSemaphoreCreateBinary() or xSemaphoreCreateCounting().</p> <p>Mutex type semaphores (those created using a call to xSemaphoreCreateMutex()) must not be used with this macro.</p> <p>This macro can be used from an ISR, however taking a semaphore from an ISR is not a common operation. It is likely to only be useful when taking a counting semaphore when an interrupt is obtaining an object from a resource pool (when the semaphore count indicates the number of resources available).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">xSemaphore</td><td>A handle to the semaphore being taken. This is the handle returned when the semaphore was created.</td></tr> <tr><td class="paramname">pxHigherPriorityTaskWoken</td><td><a class="el" href="semphr_8h.html#a076419b58e072655686939016e7ca3c5">xSemaphoreTakeFromISR()</a> will set *pxHigherPriorityTaskWoken to pdTRUE if taking the semaphore caused a task to unblock, and the unblocked task has a priority higher than the currently running task. If <a class="el" href="semphr_8h.html#a076419b58e072655686939016e7ca3c5">xSemaphoreTakeFromISR()</a> sets this value to pdTRUE then a context switch should be requested before the interrupt is exited.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pdTRUE if the semaphore was successfully taken, otherwise pdFALSE </dd></dl> </div> </div> <h2 class="groupheader">Typedef Documentation</h2> <a id="ad88c6df4a04beedeac782918c8a332f5"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad88c6df4a04beedeac782918c8a332f5">◆ </a></span>SemaphoreHandle_t</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="queue_8h.html#aaf19d499892a4ce1409326ece00f5264">QueueHandle_t</a> <a class="el" href="semphr_8h.html#ad88c6df4a04beedeac782918c8a332f5">SemaphoreHandle_t</a></td> </tr> </table> </div><div class="memdoc"> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="semphr_8h.html">semphr.h</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li> </ul> </div> </body> </html>