pdsc_apis_pg.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. <title>/package/apis element</title>
  7. <title>CMSIS-Pack: /package/apis element</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <link href="cmsis.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. <script type="text/javascript" src="printComponentTabs.js"></script>
  13. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  14. <script type="text/javascript" src="resize.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(initResizable);
  18. $(window).load(resizeHeight);
  19. </script>
  20. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  21. <script type="text/javascript" src="search/search.js"></script>
  22. <script type="text/javascript">
  23. $(document).ready(function() { searchBox.OnSelectItem(0); });
  24. </script>
  25. </head>
  26. <body>
  27. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  28. <div id="titlearea">
  29. <table cellspacing="0" cellpadding="0">
  30. <tbody>
  31. <tr style="height: 46px;">
  32. <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  33. <td style="padding-left: 0.5em;">
  34. <div id="projectname">CMSIS-Pack
  35. &#160;<span id="projectnumber">Version 1.6.3</span>
  36. </div>
  37. <div id="projectbrief">Delivery Mechanism for Software Packs</div>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. <!-- end header part -->
  44. <div id="CMSISnav" class="tabs1">
  45. <ul class="tablist">
  46. <script type="text/javascript">
  47. <!--
  48. writeComponentTabs.call(this);
  49. //-->
  50. </script>
  51. </ul>
  52. </div>
  53. <!-- Generated by Doxygen 1.8.6 -->
  54. <script type="text/javascript">
  55. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  56. </script>
  57. <div id="navrow1" class="tabs">
  58. <ul class="tablist">
  59. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  60. <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
  61. <li>
  62. <div id="MSearchBox" class="MSearchBoxInactive">
  63. <span class="left">
  64. <img id="MSearchSelect" src="search/mag_sel.png"
  65. onmouseover="return searchBox.OnSearchSelectShow()"
  66. onmouseout="return searchBox.OnSearchSelectHide()"
  67. alt=""/>
  68. <input type="text" id="MSearchField" value="Search" accesskey="S"
  69. onfocus="searchBox.OnSearchFieldFocus(true)"
  70. onblur="searchBox.OnSearchFieldFocus(false)"
  71. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  72. </span><span class="right">
  73. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  74. </span>
  75. </div>
  76. </li>
  77. </ul>
  78. </div>
  79. </div><!-- top -->
  80. <div id="side-nav" class="ui-resizable side-nav-resizable">
  81. <div id="nav-tree">
  82. <div id="nav-tree-contents">
  83. <div id="nav-sync" class="sync"></div>
  84. </div>
  85. </div>
  86. <div id="splitbar" style="-moz-user-select:none;"
  87. class="ui-resizable-handle">
  88. </div>
  89. </div>
  90. <script type="text/javascript">
  91. $(document).ready(function(){initNavTree('pdsc_apis_pg.html','');});
  92. </script>
  93. <div id="doc-content">
  94. <!-- window showing the filter options -->
  95. <div id="MSearchSelectWindow"
  96. onmouseover="return searchBox.OnSearchSelectShow()"
  97. onmouseout="return searchBox.OnSearchSelectHide()"
  98. onkeydown="return searchBox.OnSearchSelectKey(event)">
  99. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  100. <!-- iframe showing the search results (closed by default) -->
  101. <div id="MSearchResultsWindow">
  102. <iframe src="javascript:void(0)" frameborder="0"
  103. name="MSearchResults" id="MSearchResults">
  104. </iframe>
  105. </div>
  106. <div class="header">
  107. <div class="headertitle">
  108. <div class="title">/package/apis element </div> </div>
  109. </div><!--header-->
  110. <div class="contents">
  111. <div class="textblock"><p>Application Programming Interfaces (apis) are C/C++ interface specifications that allow software to be divided into largely independent modules. Such modules can then be developed, tested, and maintained independently, and reused by different projects. One example is the use of device drivers. If device drivers are developed for different devices implementing the same API, the application software itself can be written independent from the device it is build for.</p>
  112. <p>The <b>apis</b> allow to distribute the Application Programming Interface Specifications decoupled from actual implementation. One example is the CMSIS-RTOS API, which is specified as part of CMSIS, however, the actual RTOS implementation is provided by different vendors.</p>
  113. <p>An API consists of a name, a brief description as well as one or more header files, and a document containing a detailed specification of the API.</p>
  114. <p>The API typically defines one or more header files and optionally an include directory. It should have also related documentation that describes the API.</p>
  115. <p><b>Example:</b> </p>
  116. <div class="fragment"><div class="line">&lt;api Cclass=<span class="stringliteral">&quot;ACloud IF&quot;</span> Cgroup=<span class="stringliteral">&quot;TRNG&quot;</span> Capiversion=<span class="stringliteral">&quot;1.2.0&quot;</span>&gt; </div>
  117. <div class="line"> &lt;files&gt; </div>
  118. <div class="line"> &lt;file category=<span class="stringliteral">&quot;header&quot;</span> name=<span class="stringliteral">&quot;include/trng.h&quot;</span>/&gt; </div>
  119. <div class="line"> &lt;file category=<span class="stringliteral">&quot;include&quot;</span> name=<span class="stringliteral">&quot;include/somestuff&quot;</span>/&gt; </div>
  120. <div class="line"> &lt;file category=<span class="stringliteral">&quot;doc&quot;</span> name=<span class="stringliteral">&quot;html/trng.html&quot;</span>/&gt; </div>
  121. <div class="line"> &lt;/files&gt; </div>
  122. <div class="line">&lt;/api&gt; </div>
  123. </div><!-- fragment --><p>The API can be used either in the same software pack or other software packs. Having the API definition in one central software pack provides the benefit that implementations are consistent.</p>
  124. <p>The include file and directory are <b>included in the application project</b> when a <b>component</b> is selected that specifics the same <b>Cclass</b> and <b>Cgroup</b>. The selection of a software component adds therefore both to a project: the files specified by the <a class="el" href="pdsc_components_pg.html#element_component">component element</a> and the files specified by the <a class="el" href="pdsc_apis_pg.html#element_api">api element</a>. Therefore, the component that is based on the API should not contain the header file that defines the API.</p>
  125. <p><b>Example:</b> this component adds also the api header file above</p>
  126. <div class="fragment"><div class="line">&lt;component Cclass=<span class="stringliteral">&quot;ACloud IF&quot;</span> Cgroup=<span class="stringliteral">&quot;TRNG&quot;</span> Csub=<span class="stringliteral">&quot;Emulation&quot;</span> Capiversion=<span class="stringliteral">&quot;1.1.0&quot;</span>&gt; </div>
  127. <div class="line"> &lt;description&gt;Software simulation of random number generator&lt;/description&gt; </div>
  128. <div class="line"> &lt;files&gt; </div>
  129. <div class="line"> &lt;file category=<span class="stringliteral">&quot;sourceC&quot;</span> name=<span class="stringliteral">&quot;source/trng_emulation.c&quot;</span>/&gt; </div>
  130. <div class="line"> &lt;/files&gt; </div>
  131. <div class="line">&lt;/component&gt; </div>
  132. </div><!-- fragment --><p> Optionally, it is possible to request a minimum API version using the <b>Capiversion</b> attribute.</p>
  133. <p>It is also possible to expose a combination of API definitions. An example for that is the CMSIS-Driver for Ethernet that is defined as:</p>
  134. <ul>
  135. <li><b>Ethernet MAC</b> interface</li>
  136. <li><b>Ethernet PHY</b> interface</li>
  137. <li><b>Ethernet</b> interface that defines both MAC and PHY (this defines two API header files)</li>
  138. </ul>
  139. <p>&#160;</p>
  140. <hr/>
  141. <h1><a class="anchor" id="element_apis"></a>
  142. /package/apis</h1>
  143. <p>This element is a grouping element for all application programming interfaces included in the <a class="el" href="cp_SWComponents.html">Software Pack</a>. The element itself is optional. Only one such section can exist in a package.</p>
  144. <p><b>Example:</b> </p>
  145. <div class="fragment"><div class="line">&lt;package&gt;</div>
  146. <div class="line"> &lt;apis&gt;</div>
  147. <div class="line"> ...</div>
  148. <div class="line"> &lt;/apis&gt;</div>
  149. <div class="line">&lt;/package&gt; </div>
  150. </div><!-- fragment --><p>&#160;</p>
  151. <table class="cmtable" summary="Element: APIs">
  152. <tr>
  153. <th>Parents </th><th>Element Chain </th><th>&#160; </th><th>&#160; </th></tr>
  154. <tr>
  155. <td><a class="el" href="pdsc_package_pg.html">package</a> </td><td><a class="el" href="pdsc_package_pg.html">/package</a> </td><td>&#160; </td><td>&#160; </td></tr>
  156. <tr>
  157. <th>Child&#160;Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
  158. <tr>
  159. <td><a class="el" href="pdsc_apis_pg.html#element_api">api</a> </td><td>Named specification of an API containing a brief description, C/C++ header files and documentation </td><td>ApiType </td><td>1..* </td></tr>
  160. </table>
  161. <p>&#160;</p>
  162. <hr/>
  163. <h1><a class="anchor" id="element_api"></a>
  164. /package/apis/api</h1>
  165. <p>Application Programming Interfaces (apis) are C/C++ interface specifications that allow components to inter-work by either implementing or using a set of functions, data types, and definitions. This element is mandatory and can exist multiple times.</p>
  166. <p><b>Example:</b> </p>
  167. <div class="fragment"><div class="line">&lt;apis&gt;</div>
  168. <div class="line"> &lt;api Cclass=<span class="stringliteral">&quot;Device&quot;</span> Cgroup=<span class="stringliteral">&quot;Driver UART&quot;</span> exclusive=<span class="stringliteral">&quot;0&quot;</span>&gt;</div>
  169. <div class="line"> &lt;description&gt;UART Driver API <span class="keywordflow">for</span> the Cortex-M processor based devices&lt;/description&gt;</div>
  170. <div class="line"> &lt;files&gt;</div>
  171. <div class="line"> &lt;file category=<span class="stringliteral">&quot;doc&quot;</span> name=<span class="stringliteral">&quot;Driver/Doc/UART/html/index.html&quot;</span>/&gt;</div>
  172. <div class="line"> &lt;file category=<span class="stringliteral">&quot;header&quot;</span> name=<span class="stringliteral">&quot;Driver/Include/Driver_UART.h&quot;</span>/&gt;</div>
  173. <div class="line"> &lt;/files&gt;</div>
  174. <div class="line"> &lt;/api&gt;</div>
  175. <div class="line"> &lt;api Cclass=<span class="stringliteral">&quot;Device&quot;</span> Cgroup=<span class="stringliteral">&quot;Driver SPI&quot;</span> exclusive=<span class="stringliteral">&quot;0&quot;</span>&gt;</div>
  176. <div class="line"> &lt;description&gt;SPI Driver API <span class="keywordflow">for</span> the Cortex-M processor based devices&lt;/description&gt;</div>
  177. <div class="line"> &lt;files&gt;</div>
  178. <div class="line"> &lt;file category=<span class="stringliteral">&quot;doc&quot;</span> name=<span class="stringliteral">&quot;Driver/Doc/SPI/html/index.html&quot;</span>/&gt;</div>
  179. <div class="line"> &lt;file category=<span class="stringliteral">&quot;header&quot;</span> name=<span class="stringliteral">&quot;Driver/Include/Driver_SPI.h&quot;</span>/&gt;</div>
  180. <div class="line"> &lt;/files&gt;</div>
  181. <div class="line"> &lt;/api&gt;</div>
  182. <div class="line"> ...</div>
  183. <div class="line">&lt;/apis&gt;</div>
  184. </div><!-- fragment --><p>&#160;</p>
  185. <table class="cmtable" summary="Element: api">
  186. <tr>
  187. <th>Parent&#160;Element </th><th colspan="3">Element Chain </th></tr>
  188. <tr>
  189. <td><a class="el" href="pdsc_apis_pg.html#element_apis">apis</a> </td><td colspan="3"><a class="el" href="pdsc_apis_pg.html#element_apis">/package/apis</a> </td></tr>
  190. <tr>
  191. <th>Attributes </th><th>Description </th><th>Type </th><th>Use </th></tr>
  192. <tr>
  193. <td>Cclass </td><td>Defines the component class to which this component belongs. This is a mandatory part of the component ID. Predefined values can be used as listed in the table <a class="el" href="element_taxonomy.html#CclassType">Component Classes</a>. </td><td>CclassType </td><td>required </td></tr>
  194. <tr>
  195. <td>Cgroup </td><td>Defines the component group to which this component belongs. This is a mandatory part of the component ID. Predefined values can be used as listed in the table <a class="el" href="element_taxonomy.html#CgroupType">Component Groups</a>. </td><td>CgroupType </td><td>required </td></tr>
  196. <tr>
  197. <td>exclusive </td><td>Makes the selection of a component implementing the API exclusive. If set to <span class="XML-Token">0</span>, then multiple components implementing the API can be selected. Default is <span class="XML-Token">1</span>. </td><td>xs:boolean </td><td>optional </td></tr>
  198. <tr>
  199. <td>condition </td><td>Enter the identifier (attribute <em><b>id</b></em>) of a <a class="el" href="pdsc_conditions_pg.html#element_condition">condition</a>. The element is used if the condition resolves to <span class="XML-Token">true</span>. If the condition resolves to <span class="XML-Token">false</span>, then the element will be ignored. For example, an API might be specific for a certain toolchain or processor instruction set. </td><td>xs:string </td><td>optional </td></tr>
  200. <tr>
  201. <td>Capiversion </td><td>Version of this component. Is a mandatory part of the component ID. The version format is described in <a class="el" href="pdsc_package_pg.html#VersionType">Version Type</a>. </td><td>VersionType </td><td>optional </td></tr>
  202. <tr>
  203. <th>Child&#160;Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
  204. <tr>
  205. <td>description </td><td>Brief summary about the purpose and scope of an API. </td><td>xs:string </td><td>0..1 </td></tr>
  206. <tr>
  207. <td><a class="el" href="pdsc_components_pg.html#element_files">files</a> </td><td>Grouping element for all file descriptions that are part of this component.. </td><td>group </td><td>0..1 </td></tr>
  208. </table>
  209. <p>&#160;</p>
  210. </div></div><!-- contents -->
  211. </div><!-- doc-content -->
  212. <!-- start footer part -->
  213. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  214. <ul>
  215. <li class="navelem"><a class="el" href="packFormat.html">Pack Description (*.pdsc) Format</a></li>
  216. <li class="footer">Generated on Thu Apr 9 2020 15:49:54 for CMSIS-Pack Version 1.6.3 by Arm Ltd. All rights reserved.
  217. <!--
  218. <a href="http://www.doxygen.org/index.html">
  219. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
  220. -->
  221. </li>
  222. </ul>
  223. </div>
  224. </body>
  225. </html>