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<meta name="generator" content="Doxygen 1.8.13"/> 7<meta name="viewport" content="width=device-width, initial-scale=1"/> 8<title>ISSDK: algorithms/pedometer/source/pedometer.c File Reference</title> 9<link href="tabs.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<link href="issdk_stylesheet.css" rel="stylesheet" type="text/css" /> 13</head> 14<body> 15<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 16<div id="titlearea"> 17<table cellspacing="0" cellpadding="0"> 18 <tbody> 19 <tr style="height: 56px;"> 20 <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td> 21 <td id="projectalign" style="padding-left: 0.5em;"> 22 <div id="projectname">ISSDK 23  <span id="projectnumber">1.8</span> 24 </div> 25 <div id="projectbrief">IoT Sensing Software Development Kit</div> 26 </td> 27 </tr> 28 </tbody> 29</table> 30</div> 31<!-- end header part --> 32<!-- Generated by Doxygen 1.8.13 --> 33<script type="text/javascript" src="menudata.js"></script> 34<script type="text/javascript" src="menu.js"></script> 35<script type="text/javascript"> 36$(function() { 37 initMenu('',false,false,'search.php','Search'); 38}); 39</script> 40<div id="main-nav"></div> 41<div id="nav-path" class="navpath"> 42 <ul> 43<li class="navelem"><a class="el" href="dir_c0ce462e37efe0a8d60c01d75f78f8a0.html">algorithms</a></li><li class="navelem"><a class="el" href="dir_fee404f6f831fcfa321ee67f90b1e1c1.html">pedometer</a></li><li class="navelem"><a class="el" href="dir_8691356da0b74e268280f1013043f75b.html">source</a></li> </ul> 44</div> 45</div><!-- top --> 46<div class="header"> 47 <div class="summary"> 48<a href="#define-members">Macros</a> | 49<a href="#func-members">Functions</a> </div> 50 <div class="headertitle"> 51<div class="title">pedometer.c File Reference</div> </div> 52</div><!--header--> 53<div class="contents"> 54 55<p>The <a class="el" href="a00926.html" title="The pedometer.c file contains the interface definitions for pedometer application. ">pedometer.c</a> file contains the interface definitions for pedometer application. 56<a href="#details">More...</a></p> 57<div class="textblock"><code>#include "<a class="el" href="a00956_source.html">pedometer.h</a>"</code><br /> 58</div><div class="textblock"><div class="dynheader"> 59Include dependency graph for pedometer.c:</div> 60<div class="dyncontent"> 61<div class="center"><img src="a00927.png" border="0" usemap="#algorithms_2pedometer_2source_2pedometer_8c" alt=""/></div> 62<map name="algorithms_2pedometer_2source_2pedometer_8c" id="algorithms_2pedometer_2source_2pedometer_8c"> 63<area shape="rect" id="node2" href="a00956.html" title="The pedometer.h file contains the interface and structure definitions for pedometer application..." alt="" coords="31,95,126,121"/> 64</map> 65</div> 66</div> 67<p><a href="a00926_source.html">Go to the source code of this file.</a></p> 68<table class="memberdecls"> 69<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> 70Macros</h2></td></tr> 71<tr class="memitem:a9eab5efe6197a175d923d43c6e9b57d5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a9eab5efe6197a175d923d43c6e9b57d5">PEDOMETER_STATUS_ACTIVITY_BITNUM</a>   0</td></tr> 72<tr class="separator:a9eab5efe6197a175d923d43c6e9b57d5"><td class="memSeparator" colspan="2"> </td></tr> 73<tr class="memitem:acae87033b8ace5856bda1489cde9e55f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#acae87033b8ace5856bda1489cde9e55f">PEDOMETER_STATUS_SUSPEND_BITNUM</a>   3</td></tr> 74<tr class="separator:acae87033b8ace5856bda1489cde9e55f"><td class="memSeparator" colspan="2"> </td></tr> 75<tr class="memitem:ae85ba3a5b1342417a926f4ae7d54397b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#ae85ba3a5b1342417a926f4ae7d54397b">PEDOMETER_STATUS_ACTCHG_BITNUM</a>   4</td></tr> 76<tr class="separator:ae85ba3a5b1342417a926f4ae7d54397b"><td class="memSeparator" colspan="2"> </td></tr> 77<tr class="memitem:a70f91d4ec3d1c940ede399eb7f355bf9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a70f91d4ec3d1c940ede399eb7f355bf9">PEDOMETER_STATUS_STEPCHG_BITNUM</a>   5</td></tr> 78<tr class="separator:a70f91d4ec3d1c940ede399eb7f355bf9"><td class="memSeparator" colspan="2"> </td></tr> 79<tr class="memitem:ada43b47a42793f574f9aeaecf86863df"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#ada43b47a42793f574f9aeaecf86863df">PEDOMETER_STATUS_SUSPCHG_BITNUM</a>   6</td></tr> 80<tr class="separator:ada43b47a42793f574f9aeaecf86863df"><td class="memSeparator" colspan="2"> </td></tr> 81<tr class="memitem:a3ba34d00549dc1e6bd53d4c27cdf115c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a3ba34d00549dc1e6bd53d4c27cdf115c">PEDOMETER_STATUS_MRGFLG_BITNUM</a>   7</td></tr> 82<tr class="separator:a3ba34d00549dc1e6bd53d4c27cdf115c"><td class="memSeparator" colspan="2"> </td></tr> 83<tr class="memitem:ad46eaac8679ad478fb74d51c3f78ed23"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#ad46eaac8679ad478fb74d51c3f78ed23">PEDOMETER_STATUS_ACTIVITY_MASK</a>   (7 << <a class="el" href="a00926.html#a9eab5efe6197a175d923d43c6e9b57d5">PEDOMETER_STATUS_ACTIVITY_BITNUM</a>)</td></tr> 84<tr class="separator:ad46eaac8679ad478fb74d51c3f78ed23"><td class="memSeparator" colspan="2"> </td></tr> 85<tr class="memitem:ac257ef2728cd16f47f860c0e7266092c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#ac257ef2728cd16f47f860c0e7266092c">PEDOMETER_STATUS_SUSPEND_MASK</a>   (1 << <a class="el" href="a00926.html#acae87033b8ace5856bda1489cde9e55f">PEDOMETER_STATUS_SUSPEND_BITNUM</a>)</td></tr> 86<tr class="separator:ac257ef2728cd16f47f860c0e7266092c"><td class="memSeparator" colspan="2"> </td></tr> 87<tr class="memitem:adeeafda7d7bc523470e84dca8e12f6d6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#adeeafda7d7bc523470e84dca8e12f6d6">PEDOMETER_STATUS_ACTCHG_MASK</a>   (1 << <a class="el" href="a00926.html#ae85ba3a5b1342417a926f4ae7d54397b">PEDOMETER_STATUS_ACTCHG_BITNUM</a>)</td></tr> 88<tr class="separator:adeeafda7d7bc523470e84dca8e12f6d6"><td class="memSeparator" colspan="2"> </td></tr> 89<tr class="memitem:a463b24c49f5bb96ea8b05d7541861e1f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a463b24c49f5bb96ea8b05d7541861e1f">PEDOMETER_STATUS_STEPCHG_MASK</a>   (1 << <a class="el" href="a00926.html#a70f91d4ec3d1c940ede399eb7f355bf9">PEDOMETER_STATUS_STEPCHG_BITNUM</a>)</td></tr> 90<tr class="separator:a463b24c49f5bb96ea8b05d7541861e1f"><td class="memSeparator" colspan="2"> </td></tr> 91<tr class="memitem:a9914acab9d20e47b8786047c36a813d2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a9914acab9d20e47b8786047c36a813d2">PEDOMETER_STATUS_SUSPCHG_MASK</a>   (1 << <a class="el" href="a00926.html#ada43b47a42793f574f9aeaecf86863df">PEDOMETER_STATUS_SUSPCHG_BITNUM</a>)</td></tr> 92<tr class="separator:a9914acab9d20e47b8786047c36a813d2"><td class="memSeparator" colspan="2"> </td></tr> 93<tr class="memitem:a9c0193830ee00d081526140807baac64"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a9c0193830ee00d081526140807baac64">PEDOMETER_STATUS_MRGFLG_MASK</a>   (1 << <a class="el" href="a00926.html#a3ba34d00549dc1e6bd53d4c27cdf115c">PEDOMETER_STATUS_MRGFLG_BITNUM</a>)</td></tr> 94<tr class="separator:a9c0193830ee00d081526140807baac64"><td class="memSeparator" colspan="2"> </td></tr> 95<tr class="memitem:a8a105cdee6d7b88c2c6fbf596230ccfb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a8a105cdee6d7b88c2c6fbf596230ccfb">PEDOMETER_STATUS_CHG_MASK</a>   (<a class="el" href="a00926.html#adeeafda7d7bc523470e84dca8e12f6d6">PEDOMETER_STATUS_ACTCHG_MASK</a> | <a class="el" href="a00926.html#a463b24c49f5bb96ea8b05d7541861e1f">PEDOMETER_STATUS_STEPCHG_MASK</a> | <a class="el" href="a00926.html#a9914acab9d20e47b8786047c36a813d2">PEDOMETER_STATUS_SUSPCHG_MASK</a>)</td></tr> 96<tr class="separator:a8a105cdee6d7b88c2c6fbf596230ccfb"><td class="memSeparator" colspan="2"> </td></tr> 97<tr class="memitem:a6205f84a9ef9dc5da8bc39a7d812cd96"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a6205f84a9ef9dc5da8bc39a7d812cd96">SQUARED</a>(x)   ((x) * (x))</td></tr> 98<tr class="separator:a6205f84a9ef9dc5da8bc39a7d812cd96"><td class="memSeparator" colspan="2"> </td></tr> 99</table><table class="memberdecls"> 100<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> 101Functions</h2></td></tr> 102<tr class="memitem:a594d690252fcfc6713fe8374f384fe69"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a594d690252fcfc6713fe8374f384fe69">pedometer_init</a> (<a class="el" href="a04067.html">pedometer_t</a> *pPedometer)</td></tr> 103<tr class="memdesc:a594d690252fcfc6713fe8374f384fe69"><td class="mdescLeft"> </td><td class="mdescRight">The interface function initialize the pedometer. <a href="#a594d690252fcfc6713fe8374f384fe69">More...</a><br /></td></tr> 104<tr class="separator:a594d690252fcfc6713fe8374f384fe69"><td class="memSeparator" colspan="2"> </td></tr> 105<tr class="memitem:a5ea8580b8a07ce9ece550f8b6fd37ced"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a5ea8580b8a07ce9ece550f8b6fd37ced">pedometer_configure</a> (<a class="el" href="a04067.html">pedometer_t</a> *pPedometer, const <a class="el" href="a04059.html">pedometer_config_t</a> *pConfig)</td></tr> 106<tr class="memdesc:a5ea8580b8a07ce9ece550f8b6fd37ced"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to configure the pedometer. <a href="#a5ea8580b8a07ce9ece550f8b6fd37ced">More...</a><br /></td></tr> 107<tr class="separator:a5ea8580b8a07ce9ece550f8b6fd37ced"><td class="memSeparator" colspan="2"> </td></tr> 108<tr class="memitem:a87224a70b303355a416beaca80ed1b2f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00926.html#a87224a70b303355a416beaca80ed1b2f">pedometer_run</a> (<a class="el" href="a04067.html">pedometer_t</a> *pPedometer, <a class="el" href="a04055.html">ped_accel_t</a> *pData)</td></tr> 109<tr class="memdesc:a87224a70b303355a416beaca80ed1b2f"><td class="mdescLeft"> </td><td class="mdescRight">The interface function excutes the pedometer algorithm. <a href="#a87224a70b303355a416beaca80ed1b2f">More...</a><br /></td></tr> 110<tr class="separator:a87224a70b303355a416beaca80ed1b2f"><td class="memSeparator" colspan="2"> </td></tr> 111</table> 112<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> 113<div class="textblock"><p>The <a class="el" href="a00926.html" title="The pedometer.c file contains the interface definitions for pedometer application. ">pedometer.c</a> file contains the interface definitions for pedometer application. </p> 114 115<p class="definition">Definition in file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 116</div><h2 class="groupheader">Macro Definition Documentation</h2> 117<a id="ae85ba3a5b1342417a926f4ae7d54397b"></a> 118<h2 class="memtitle"><span class="permalink"><a href="#ae85ba3a5b1342417a926f4ae7d54397b">◆ </a></span>PEDOMETER_STATUS_ACTCHG_BITNUM</h2> 119 120<div class="memitem"> 121<div class="memproto"> 122 <table class="memname"> 123 <tr> 124 <td class="memname">#define PEDOMETER_STATUS_ACTCHG_BITNUM   4</td> 125 </tr> 126 </table> 127</div><div class="memdoc"> 128 129<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00025">25</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 130 131</div> 132</div> 133<a id="adeeafda7d7bc523470e84dca8e12f6d6"></a> 134<h2 class="memtitle"><span class="permalink"><a href="#adeeafda7d7bc523470e84dca8e12f6d6">◆ </a></span>PEDOMETER_STATUS_ACTCHG_MASK</h2> 135 136<div class="memitem"> 137<div class="memproto"> 138 <table class="memname"> 139 <tr> 140 <td class="memname">#define PEDOMETER_STATUS_ACTCHG_MASK   (1 << <a class="el" href="a00926.html#ae85ba3a5b1342417a926f4ae7d54397b">PEDOMETER_STATUS_ACTCHG_BITNUM</a>)</td> 141 </tr> 142 </table> 143</div><div class="memdoc"> 144 145<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00032">32</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 146 147</div> 148</div> 149<a id="a9eab5efe6197a175d923d43c6e9b57d5"></a> 150<h2 class="memtitle"><span class="permalink"><a href="#a9eab5efe6197a175d923d43c6e9b57d5">◆ </a></span>PEDOMETER_STATUS_ACTIVITY_BITNUM</h2> 151 152<div class="memitem"> 153<div class="memproto"> 154 <table class="memname"> 155 <tr> 156 <td class="memname">#define PEDOMETER_STATUS_ACTIVITY_BITNUM   0</td> 157 </tr> 158 </table> 159</div><div class="memdoc"> 160 161<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00023">23</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 162 163</div> 164</div> 165<a id="ad46eaac8679ad478fb74d51c3f78ed23"></a> 166<h2 class="memtitle"><span class="permalink"><a href="#ad46eaac8679ad478fb74d51c3f78ed23">◆ </a></span>PEDOMETER_STATUS_ACTIVITY_MASK</h2> 167 168<div class="memitem"> 169<div class="memproto"> 170 <table class="memname"> 171 <tr> 172 <td class="memname">#define PEDOMETER_STATUS_ACTIVITY_MASK   (7 << <a class="el" href="a00926.html#a9eab5efe6197a175d923d43c6e9b57d5">PEDOMETER_STATUS_ACTIVITY_BITNUM</a>)</td> 173 </tr> 174 </table> 175</div><div class="memdoc"> 176 177<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00030">30</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 178 179</div> 180</div> 181<a id="a8a105cdee6d7b88c2c6fbf596230ccfb"></a> 182<h2 class="memtitle"><span class="permalink"><a href="#a8a105cdee6d7b88c2c6fbf596230ccfb">◆ </a></span>PEDOMETER_STATUS_CHG_MASK</h2> 183 184<div class="memitem"> 185<div class="memproto"> 186 <table class="memname"> 187 <tr> 188 <td class="memname">#define PEDOMETER_STATUS_CHG_MASK   (<a class="el" href="a00926.html#adeeafda7d7bc523470e84dca8e12f6d6">PEDOMETER_STATUS_ACTCHG_MASK</a> | <a class="el" href="a00926.html#a463b24c49f5bb96ea8b05d7541861e1f">PEDOMETER_STATUS_STEPCHG_MASK</a> | <a class="el" href="a00926.html#a9914acab9d20e47b8786047c36a813d2">PEDOMETER_STATUS_SUSPCHG_MASK</a>)</td> 189 </tr> 190 </table> 191</div><div class="memdoc"> 192 193<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00037">37</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 194 195</div> 196</div> 197<a id="a3ba34d00549dc1e6bd53d4c27cdf115c"></a> 198<h2 class="memtitle"><span class="permalink"><a href="#a3ba34d00549dc1e6bd53d4c27cdf115c">◆ </a></span>PEDOMETER_STATUS_MRGFLG_BITNUM</h2> 199 200<div class="memitem"> 201<div class="memproto"> 202 <table class="memname"> 203 <tr> 204 <td class="memname">#define PEDOMETER_STATUS_MRGFLG_BITNUM   7</td> 205 </tr> 206 </table> 207</div><div class="memdoc"> 208 209<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00028">28</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 210 211</div> 212</div> 213<a id="a9c0193830ee00d081526140807baac64"></a> 214<h2 class="memtitle"><span class="permalink"><a href="#a9c0193830ee00d081526140807baac64">◆ </a></span>PEDOMETER_STATUS_MRGFLG_MASK</h2> 215 216<div class="memitem"> 217<div class="memproto"> 218 <table class="memname"> 219 <tr> 220 <td class="memname">#define PEDOMETER_STATUS_MRGFLG_MASK   (1 << <a class="el" href="a00926.html#a3ba34d00549dc1e6bd53d4c27cdf115c">PEDOMETER_STATUS_MRGFLG_BITNUM</a>)</td> 221 </tr> 222 </table> 223</div><div class="memdoc"> 224 225<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00035">35</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 226 227</div> 228</div> 229<a id="a70f91d4ec3d1c940ede399eb7f355bf9"></a> 230<h2 class="memtitle"><span class="permalink"><a href="#a70f91d4ec3d1c940ede399eb7f355bf9">◆ </a></span>PEDOMETER_STATUS_STEPCHG_BITNUM</h2> 231 232<div class="memitem"> 233<div class="memproto"> 234 <table class="memname"> 235 <tr> 236 <td class="memname">#define PEDOMETER_STATUS_STEPCHG_BITNUM   5</td> 237 </tr> 238 </table> 239</div><div class="memdoc"> 240 241<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00026">26</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 242 243</div> 244</div> 245<a id="a463b24c49f5bb96ea8b05d7541861e1f"></a> 246<h2 class="memtitle"><span class="permalink"><a href="#a463b24c49f5bb96ea8b05d7541861e1f">◆ </a></span>PEDOMETER_STATUS_STEPCHG_MASK</h2> 247 248<div class="memitem"> 249<div class="memproto"> 250 <table class="memname"> 251 <tr> 252 <td class="memname">#define PEDOMETER_STATUS_STEPCHG_MASK   (1 << <a class="el" href="a00926.html#a70f91d4ec3d1c940ede399eb7f355bf9">PEDOMETER_STATUS_STEPCHG_BITNUM</a>)</td> 253 </tr> 254 </table> 255</div><div class="memdoc"> 256 257<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00033">33</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 258 259</div> 260</div> 261<a id="ada43b47a42793f574f9aeaecf86863df"></a> 262<h2 class="memtitle"><span class="permalink"><a href="#ada43b47a42793f574f9aeaecf86863df">◆ </a></span>PEDOMETER_STATUS_SUSPCHG_BITNUM</h2> 263 264<div class="memitem"> 265<div class="memproto"> 266 <table class="memname"> 267 <tr> 268 <td class="memname">#define PEDOMETER_STATUS_SUSPCHG_BITNUM   6</td> 269 </tr> 270 </table> 271</div><div class="memdoc"> 272 273<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00027">27</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 274 275</div> 276</div> 277<a id="a9914acab9d20e47b8786047c36a813d2"></a> 278<h2 class="memtitle"><span class="permalink"><a href="#a9914acab9d20e47b8786047c36a813d2">◆ </a></span>PEDOMETER_STATUS_SUSPCHG_MASK</h2> 279 280<div class="memitem"> 281<div class="memproto"> 282 <table class="memname"> 283 <tr> 284 <td class="memname">#define PEDOMETER_STATUS_SUSPCHG_MASK   (1 << <a class="el" href="a00926.html#ada43b47a42793f574f9aeaecf86863df">PEDOMETER_STATUS_SUSPCHG_BITNUM</a>)</td> 285 </tr> 286 </table> 287</div><div class="memdoc"> 288 289<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00034">34</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 290 291</div> 292</div> 293<a id="acae87033b8ace5856bda1489cde9e55f"></a> 294<h2 class="memtitle"><span class="permalink"><a href="#acae87033b8ace5856bda1489cde9e55f">◆ </a></span>PEDOMETER_STATUS_SUSPEND_BITNUM</h2> 295 296<div class="memitem"> 297<div class="memproto"> 298 <table class="memname"> 299 <tr> 300 <td class="memname">#define PEDOMETER_STATUS_SUSPEND_BITNUM   3</td> 301 </tr> 302 </table> 303</div><div class="memdoc"> 304 305<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00024">24</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 306 307</div> 308</div> 309<a id="ac257ef2728cd16f47f860c0e7266092c"></a> 310<h2 class="memtitle"><span class="permalink"><a href="#ac257ef2728cd16f47f860c0e7266092c">◆ </a></span>PEDOMETER_STATUS_SUSPEND_MASK</h2> 311 312<div class="memitem"> 313<div class="memproto"> 314 <table class="memname"> 315 <tr> 316 <td class="memname">#define PEDOMETER_STATUS_SUSPEND_MASK   (1 << <a class="el" href="a00926.html#acae87033b8ace5856bda1489cde9e55f">PEDOMETER_STATUS_SUSPEND_BITNUM</a>)</td> 317 </tr> 318 </table> 319</div><div class="memdoc"> 320 321<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00031">31</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 322 323</div> 324</div> 325<a id="a6205f84a9ef9dc5da8bc39a7d812cd96"></a> 326<h2 class="memtitle"><span class="permalink"><a href="#a6205f84a9ef9dc5da8bc39a7d812cd96">◆ </a></span>SQUARED</h2> 327 328<div class="memitem"> 329<div class="memproto"> 330 <table class="memname"> 331 <tr> 332 <td class="memname">#define SQUARED</td> 333 <td>(</td> 334 <td class="paramtype"> </td> 335 <td class="paramname">x</td><td>)</td> 336 <td>   ((x) * (x))</td> 337 </tr> 338 </table> 339</div><div class="memdoc"> 340 341<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00039">39</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 342 343</div> 344</div> 345<h2 class="groupheader">Function Documentation</h2> 346<a id="a5ea8580b8a07ce9ece550f8b6fd37ced"></a> 347<h2 class="memtitle"><span class="permalink"><a href="#a5ea8580b8a07ce9ece550f8b6fd37ced">◆ </a></span>pedometer_configure()</h2> 348 349<div class="memitem"> 350<div class="memproto"> 351 <table class="memname"> 352 <tr> 353 <td class="memname">void pedometer_configure </td> 354 <td>(</td> 355 <td class="paramtype"><a class="el" href="a04067.html">pedometer_t</a> * </td> 356 <td class="paramname"><em>pPedometer</em>, </td> 357 </tr> 358 <tr> 359 <td class="paramkey"></td> 360 <td></td> 361 <td class="paramtype">const <a class="el" href="a04059.html">pedometer_config_t</a> * </td> 362 <td class="paramname"><em>pConfig</em> </td> 363 </tr> 364 <tr> 365 <td></td> 366 <td>)</td> 367 <td></td><td></td> 368 </tr> 369 </table> 370</div><div class="memdoc"> 371 372<p>The interface function to configure the pedometer. </p> 373<dl class="params"><dt>Parameters</dt><dd> 374 <table class="params"> 375 <tr><td class="paramdir">[in]</td><td class="paramname"><a class="el" href="a04067.html" title="This defines the pedometer instance. ">pedometer_t</a></td><td>handle to the pedometer. </td></tr> 376 <tr><td class="paramdir">[in]</td><td class="paramname">config</td><td>configuration value.</td></tr> 377 </table> 378 </dd> 379</dl> 380<dl class="section return"><dt>Returns</dt><dd>void.</dd></dl> 381<dl class="section user"><dt>Constraints:</dt><dd>None</dd></dl> 382<dl class="section user"><dt>Reentrant: Yes</dt><dd></dd></dl> 383 384<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00111">111</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 385 386<p class="reference">References <a class="el" href="a00956_source.html#l00097">pedometer_t::config</a>, <a class="el" href="a00956_source.html#l00067">pedometer_config_t::frequency</a>, <a class="el" href="a00956_source.html#l00061">pedometer_config_t::keynetik</a>, <a class="el" href="a00956_source.html#l00064">pedometer_config_t::oneG</a>, <a class="el" href="a04067.html#aa49c2e033986e920aff4252b22d1a137">pedometer_t::private</a>, and <a class="el" href="a00956_source.html#l00101">pedometer_t::pedometer_private_tag::stepchg_stepcount</a>.</p> 387 388<p class="reference">Referenced by <a class="el" href="a00929_source.html#l00103">main()</a>.</p> 389<div class="dynheader"> 390Here is the caller graph for this function:</div> 391<div class="dyncontent"> 392<div class="center"><img src="a00926_a5ea8580b8a07ce9ece550f8b6fd37ced_icgraph.png" border="0" usemap="#a00926_a5ea8580b8a07ce9ece550f8b6fd37ced_icgraph" alt=""/></div> 393<map name="a00926_a5ea8580b8a07ce9ece550f8b6fd37ced_icgraph" id="a00926_a5ea8580b8a07ce9ece550f8b6fd37ced_icgraph"> 394<area shape="rect" id="node2" href="a00929.html#a840291bc02cba5474a4cb46a9b9566fe" title="This is the The main function implementation. " alt="" coords="196,5,247,32"/> 395</map> 396</div> 397 398</div> 399</div> 400<a id="a594d690252fcfc6713fe8374f384fe69"></a> 401<h2 class="memtitle"><span class="permalink"><a href="#a594d690252fcfc6713fe8374f384fe69">◆ </a></span>pedometer_init()</h2> 402 403<div class="memitem"> 404<div class="memproto"> 405 <table class="memname"> 406 <tr> 407 <td class="memname">void pedometer_init </td> 408 <td>(</td> 409 <td class="paramtype"><a class="el" href="a04067.html">pedometer_t</a> * </td> 410 <td class="paramname"><em>pPedometer</em></td><td>)</td> 411 <td></td> 412 </tr> 413 </table> 414</div><div class="memdoc"> 415 416<p>The interface function initialize the pedometer. </p> 417<p>This function initialize the pedometer structure and return the handle.</p> 418<dl class="params"><dt>Parameters</dt><dd> 419 <table class="params"> 420 <tr><td class="paramdir">[in]</td><td class="paramname">pPedometer</td><td>handle to the pedometer.</td></tr> 421 </table> 422 </dd> 423</dl> 424<dl class="section return"><dt>Returns</dt><dd>void.</dd></dl> 425<dl class="section user"><dt>Constraints:</dt><dd>None</dd></dl> 426<dl class="section user"><dt>Reentrant: Yes</dt><dd></dd></dl> 427 428<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00097">97</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 429 430<p class="reference">Referenced by <a class="el" href="a00929_source.html#l00103">main()</a>.</p> 431<div class="dynheader"> 432Here is the caller graph for this function:</div> 433<div class="dyncontent"> 434<div class="center"><img src="a00926_a594d690252fcfc6713fe8374f384fe69_icgraph.png" border="0" usemap="#a00926_a594d690252fcfc6713fe8374f384fe69_icgraph" alt=""/></div> 435<map name="a00926_a594d690252fcfc6713fe8374f384fe69_icgraph" id="a00926_a594d690252fcfc6713fe8374f384fe69_icgraph"> 436<area shape="rect" id="node2" href="a00929.html#a840291bc02cba5474a4cb46a9b9566fe" title="This is the The main function implementation. " alt="" coords="160,5,211,32"/> 437</map> 438</div> 439 440</div> 441</div> 442<a id="a87224a70b303355a416beaca80ed1b2f"></a> 443<h2 class="memtitle"><span class="permalink"><a href="#a87224a70b303355a416beaca80ed1b2f">◆ </a></span>pedometer_run()</h2> 444 445<div class="memitem"> 446<div class="memproto"> 447 <table class="memname"> 448 <tr> 449 <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> pedometer_run </td> 450 <td>(</td> 451 <td class="paramtype"><a class="el" href="a04067.html">pedometer_t</a> * </td> 452 <td class="paramname"><em>pPedometer</em>, </td> 453 </tr> 454 <tr> 455 <td class="paramkey"></td> 456 <td></td> 457 <td class="paramtype"><a class="el" href="a04055.html">ped_accel_t</a> * </td> 458 <td class="paramname"><em>pData</em> </td> 459 </tr> 460 <tr> 461 <td></td> 462 <td>)</td> 463 <td></td><td></td> 464 </tr> 465 </table> 466</div><div class="memdoc"> 467 468<p>The interface function excutes the pedometer algorithm. </p> 469<p>Call this function the rate at which accelerometer runs.</p> 470<dl class="params"><dt>Parameters</dt><dd> 471 <table class="params"> 472 <tr><td class="paramdir">[in]</td><td class="paramname">pPedometer</td><td>handle to the pedometer. </td></tr> 473 <tr><td class="paramdir">[in]</td><td class="paramname">accel_data</td><td>acceleration data. </td></tr> 474 </table> 475 </dd> 476</dl> 477<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00956.html#a87224a70b303355a416beaca80ed1b2f" title="The interface function excutes the pedometer algorithm. ">pedometer_run()</a> returns the status .</dd></dl> 478<dl class="section user"><dt>Constraints:</dt><dd>None</dd></dl> 479<dl class="section user"><dt>Reentrant: Yes</dt><dd></dd></dl> 480 481<p class="definition">Definition at line <a class="el" href="a00926_source.html#l00125">125</a> of file <a class="el" href="a00926_source.html">pedometer.c</a>.</p> 482 483<p class="reference">Referenced by <a class="el" href="a00929_source.html#l00103">main()</a>.</p> 484<div class="dynheader"> 485Here is the caller graph for this function:</div> 486<div class="dyncontent"> 487<div class="center"><img src="a00926_a87224a70b303355a416beaca80ed1b2f_icgraph.png" border="0" usemap="#a00926_a87224a70b303355a416beaca80ed1b2f_icgraph" alt=""/></div> 488<map name="a00926_a87224a70b303355a416beaca80ed1b2f_icgraph" id="a00926_a87224a70b303355a416beaca80ed1b2f_icgraph"> 489<area shape="rect" id="node2" href="a00929.html#a840291bc02cba5474a4cb46a9b9566fe" title="This is the The main function implementation. " alt="" coords="161,5,212,32"/> 490</map> 491</div> 492 493</div> 494</div> 495</div><!-- contents --> 496 497<hr class="footer"/><address class="footer"><small> 498© Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause 499</small></address> 500</body> 501</html> 502