1<!-- HTML header for doxygen 1.8.13--> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4<head> 5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 6<meta http-equiv="X-UA-Compatible" content="IE=9"/> 7<meta name="generator" content="Doxygen 1.8.14"/> 8<meta name="viewport" content="width=device-width, initial-scale=1"/> 9<title>Core Library (core-lib)</title> 10<link href="tabs.css" rel="stylesheet" type="text/css"/> 11<script type="text/javascript" src="jquery.js"></script> 12<script type="text/javascript" src="dynsections.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="navtreedata.js"></script> 16<script type="text/javascript" src="navtree.js"></script> 17<script type="text/javascript"> 18/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 19 $(document).ready(initResizable); 20/* @license-end */</script> 21<link href="search/search.css" rel="stylesheet" type="text/css"/> 22<script type="text/javascript" src="search/searchdata.js"></script> 23<script type="text/javascript" src="search/search.js"></script> 24<link href="doxygen_style.css" rel="stylesheet" type="text/css" /> 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: 56px;"> 32 <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td> 33 <td id="projectalign" style="padding-left: 0.5em;"> 34 <div id="projectname">Core Library (core-lib)</div> 35 </td> 36 </tr> 37 </tbody> 38</table> 39</div> 40<!-- end header part --> 41<!-- Generated by Doxygen 1.8.14 --> 42<script type="text/javascript"> 43/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 44var searchBox = new SearchBox("searchBox", "search",false,'Search'); 45/* @license-end */ 46</script> 47<script type="text/javascript" src="menudata.js"></script> 48<script type="text/javascript" src="menu.js"></script> 49<script type="text/javascript"> 50/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 51$(function() { 52 initMenu('',true,false,'search.php','Search'); 53 $(document).ready(function() { init_search(); }); 54}); 55/* @license-end */</script> 56<div id="main-nav"></div> 57</div><!-- top --> 58<div id="side-nav" class="ui-resizable side-nav-resizable"> 59 <div id="nav-tree"> 60 <div id="nav-tree-contents"> 61 <div id="nav-sync" class="sync"></div> 62 </div> 63 </div> 64 <div id="splitbar" style="-moz-user-select:none;" 65 class="ui-resizable-handle"> 66 </div> 67</div> 68<script type="text/javascript"> 69/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 70$(document).ready(function(){initNavTree('index.html','');}); 71/* @license-end */ 72</script> 73<div id="doc-content"> 74<!-- window showing the filter options --> 75<div id="MSearchSelectWindow" 76 onmouseover="return searchBox.OnSearchSelectShow()" 77 onmouseout="return searchBox.OnSearchSelectHide()" 78 onkeydown="return searchBox.OnSearchSelectKey(event)"> 79</div> 80 81<!-- iframe showing the search results (closed by default) --> 82<div id="MSearchResultsWindow"> 83<iframe src="javascript:void(0)" frameborder="0" 84 name="MSearchResults" id="MSearchResults"> 85</iframe> 86</div> 87 88<div class="header"> 89 <div class="headertitle"> 90<div class="title">Core Library </div> </div> 91</div><!--header--> 92<div class="contents"> 93<div class="textblock"><h2>Overview</h2> 94<p>The Core Library provides basic types and utilities that can be used between different devices. This allows different libraries to share common items between themselves to avoid reimplementation and promote consistency.</p> 95<h2>Features</h2> 96<ul> 97<li>Common result type (<a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>) for reporting errors or status</li> 98<li>Common utility MACROs for<ul> 99<li><code>CY_ASSERT</code>: Verifies a value and halts if invalid (if not NDEBUG)</li> 100<li><code>CY_HALT</code>: Halts the application</li> 101<li><code>CY_UNUSED_PARAMETER</code>: Avoid warnings if a function argument isn't used</li> 102<li><code>CY_LO8</code>: Gets the lower 8 bits of a 16-bit value</li> 103<li><code>CY_HI8</code>: Gets the upper 8 bits of a 16-bit value</li> 104<li><code>CY_LO16</code>: Gets the lower 16 bits of a 32-bit value</li> 105<li><code>CY_HI16</code>: Gets the upper 16 bits of a 32-bit value</li> 106<li><code>CY_SWAP_ENDIAN16</code>: Swaps the byte ordering of a 16-bit value</li> 107<li><code>CY_SWAP_ENDIAN32</code>: Swaps the byte ordering of a 32-bit value</li> 108<li><code>CY_SWAP_ENDIAN64</code>: Swaps the byte ordering of a 64-bit value</li> 109<li><code>CY_GET_REG8</code>: Reads the 8-bit value from the specified address</li> 110<li><code>CY_SET_REG8</code>: Writes an 8-bit value to the specified address</li> 111<li><code>CY_GET_REG16</code>: Reads the 16-bit value from the specified address</li> 112<li><code>CY_SET_REG16</code>: Writes the 16-bit value to the specified address</li> 113<li><code>CY_GET_REG24</code>: Reads the 24-bit value from the specified address</li> 114<li><code>CY_SET_REG24</code>: Writes the 24-bit value to the specified address</li> 115<li><code>CY_GET_REG32</code>: Reads the 32-bit value from the specified register</li> 116<li><code>CY_SET_REG32</code>: Writes the 32-bit value to the specified register</li> 117<li><code>_CLR_SET_FLD32U</code>: The macro for setting a register with a name field and value for providing get-clear-modify-write operations</li> 118<li><code>CY_REG32_CLR_SET</code>: Uses _CLR_SET_FLD32U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 32-bit register</li> 119<li><code>_CLR_SET_FLD16U</code>: The macro for setting a 16-bit register with a name field and value for providing get-clear-modify-write operations</li> 120<li><code>CY_REG16_CLR_SET</code>: Uses _CLR_SET_FLD16U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 16-bit register</li> 121<li><code>_CLR_SET_FLD8U</code>: The macro for setting a 8-bit register with a name field and value for providing get-clear-modify-write operations</li> 122<li><code>CY_REG8_CLR_SET</code>: Uses _CLR_SET_FLD8U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 8-bit register</li> 123<li><code>_BOOL2FLD</code>: Returns a field mask if the value is not false</li> 124<li><code>_FLD2BOOL</code>: Returns true, if the value includes the field mask</li> 125<li><code>CY_SYSLIB_DIV_ROUND</code>: Calculates a / b with rounding to the nearest integer, a and b must have the same sign.</li> 126<li><code>CY_SYSLIB_DIV_ROUNDUP</code>: Calculates a / b with rounding up if remainder != 0, both a and b must be positive.</li> 127</ul> 128</li> 129<li>MACROs to create cross compiler compatible code. Use the CY_NOINIT, CY_SECTION, CY_UNUSED, CY_ALIGN attributes at the first place of declaration/definition. For example: CY_NOINIT uint32_t noinitVar;<ul> 130<li><code>CY_NOINIT</code></li> 131<li><code>CY_SECTION</code></li> 132<li><code>CY_UNUSED</code></li> 133<li><code>CY_NOINLINE</code></li> 134<li><code>CY_ALIGN</code></li> 135<li><code>CY_RAMFUNC_BEGIN</code></li> 136<li><code>CY_RAMFUNC_END</code></li> 137</ul> 138</li> 139</ul> 140<h2>More information</h2> 141<ul> 142<li><a href="https://cypresssemiconductorco.github.io/core-lib/html/modules.html">API Reference Guide</a></li> 143<li><a href="http://www.cypress.com">Cypress Semiconductor, an Infineon Technologies Company</a></li> 144<li><a href="https://github.com/cypresssemiconductorco">Cypress Semiconductor GitHub</a></li> 145<li><a href="https://www.cypress.com/products/modustoolbox-software-environment">ModusToolbox</a> <hr/> 146 © Cypress Semiconductor Corporation, 2019-2020. </li> 147</ul> 148</div></div><!-- contents --> 149</div><!-- doc-content --> 150<!-- start footer part 151<div id="nav-path" class="navpath"> 152 <ul> 153 <li class="footer"> 154 Generated for <b>Core Library (core-lib)</b> by <b>Cypress Semiconductor Corporation</b>. 155 All rights reserved. 156 </li> 157 </ul> 158</div> 159--> 160</body> 161</html> 162