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: driverexamples/fxls896xaf/fxls896xaf_motion_wakeup.c Source File</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   &#160;<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_63958a0a083234c4c5a126855d7f4594.html">driverexamples</a></li><li class="navelem"><a class="el" href="dir_6f74bf24a5866cea1e449032c0e2f302.html">fxls896xaf</a></li>  </ul>
44</div>
45</div><!-- top -->
46<div class="header">
47  <div class="headertitle">
48<div class="title">fxls896xaf_motion_wakeup.c</div>  </div>
49</div><!--header-->
50<div class="contents">
51<a href="a00368.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright 2021 NXP</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">/**</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * @file  fxls896x_motion_wakeup.c</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *  @brief The fxls896x_motion_wakeup.c file implements the ISSDK FXLS896xAF I2C sensor driver</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *         example demonstrating motion detection and Auto-Wake/Sleep features.</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">// SDK Includes</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;pin_mux.h&quot;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;clock_config.h&quot;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;board.h&quot;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;fsl_debug_console.h&quot;</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">// ISSDK Includes</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;issdk_hal.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;gpio_driver.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00068.html">fxls896x_drv.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00533.html">systick_utils.h</a>&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">// CMSIS Includes</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;Driver_I2C.h&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">// Macros</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="a00368.html#aba3457bcd021ecb2cc91ea61e421c1b3">   38</a></span>&#160;<span class="preprocessor">#define FXLS8964_DATA_SIZE      6</span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="a00368.html#ac9afbf06be14942647b50332eb3ad7ec">   39</a></span>&#160;<span class="preprocessor">#define FXLS8964_STANDBY_MODE   0</span></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="a00368.html#a47fded6e55d7281366d46f54415a458b">   40</a></span>&#160;<span class="preprocessor">#define FXLS8964_ACTIVE_MODE    1</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">// Constants</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span><span class="comment"></span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">/*! @brief Register settings for configuring SDCD-OT for tap-detection and Auto-Wake/Sleep in interrupt mode. */</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="a00368.html#a7a14a0618a27c2316924d97abc521d9f">   45</a></span>&#160;<span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> <a class="code" href="a00368.html#a7a14a0618a27c2316924d97abc521d9f">cFxls896xAwsConfig</a>[] = {</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="comment">/* Set Full-scale range as 4G. */</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#ae5d4e2a78a310472c242cb313e400620">FXLS896x_SENS_CONFIG1_FSR_4G</a>, <a class="code" href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a>},</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="comment">/* Set Wake ODR as 400Hz &amp; Sleep Mode ODR as 6.25Hz. */</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1abf1ecb7df2b170c64227ffe80c14ef2b">FXLS896x_SENS_CONFIG3</a>, <a class="code" href="a00062.html#ac906cf830ae871a8f3b678b4da62fe9d">FXLS896x_SENS_CONFIG3_WAKE_ODR_400HZ</a> | <a class="code" href="a00062.html#ae087fef14231e8d89fe10ed38d7e0881">FXLS896x_SENS_CONFIG3_SLEEP_ODR_6_25HZ</a>, <a class="code" href="a00062.html#ac78215de6488539f9a6741883739f4c1">FXLS896x_SENS_CONFIG3_WAKE_ODR_MASK</a> | <a class="code" href="a00062.html#af6f480f3072bfffd6e8db57e9b485eab">FXLS896x_SENS_CONFIG3_SLEEP_ODR_MASK</a>},</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="comment">/* Enable SDCD OT for all 3 axes X, Y &amp; Z and within-thresholds event latch disabled. */</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1aebac5ec12a6a2e0470ce4c313f66b081">FXLS896x_SDCD_CONFIG1</a>, <a class="code" href="a00062.html#a6e67f2aaf62ec14dfed253c9a96ca673">FXLS896x_SDCD_CONFIG1_X_OT_EN_EN</a> | <a class="code" href="a00062.html#aaf486470362e16558022ed0578a7633f">FXLS896x_SDCD_CONFIG1_Y_OT_EN_EN</a> | <a class="code" href="a00062.html#a8025f55dc676bfd81d183b3fd98fa9f8">FXLS896x_SDCD_CONFIG1_Z_OT_EN_EN</a> | <a class="code" href="a00062.html#a965f6e391abbfdac81316e85e7f1b284">FXLS896x_SDCD_CONFIG1_OT_ELE_DIS</a>,</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                                <a class="code" href="a00062.html#a6d6ed1dca43867c7fcd29960f3fba604">FXLS896x_SDCD_CONFIG1_X_OT_EN_MASK</a> | <a class="code" href="a00062.html#a6e2af1122b063ecfcb9a2368475c6e8a">FXLS896x_SDCD_CONFIG1_Y_OT_EN_MASK</a> | <a class="code" href="a00062.html#a553539863d11a45d8d1c1d232fd4fef5">FXLS896x_SDCD_CONFIG1_Z_OT_EN_MASK</a> | <a class="code" href="a00062.html#a55859f06f0f36d4107d10efda0c39f7e">FXLS896x_SDCD_CONFIG1_OT_ELE_MASK</a>},</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="comment">/* Enabling SDCD and Relative Data (N) � Data (N-1) mode for transient detection */</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a02fdc5ed7f58173579b0ab9451054455">FXLS896x_SDCD_CONFIG2</a>, <a class="code" href="a00062.html#a813956ddf5068f4da833a7247ec7b95a">FXLS896x_SDCD_CONFIG2_SDCD_EN_EN</a> | <a class="code" href="a00062.html#a185d5ef7e0f9e2a67e2a234769c555ca">FXLS896x_SDCD_CONFIG2_REF_UPDM_SDCD_REF</a>, <a class="code" href="a00062.html#a78d75a749948860444e3d6e5feb7d8fc">FXLS896x_SDCD_CONFIG2_SDCD_EN_MASK</a> | <a class="code" href="a00062.html#ae20937b4ae0cce890f00081436f26284">FXLS896x_SDCD_CONFIG2_REF_UPDM_MASK</a>},</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="comment">/* Set the SDCD_OT debounce count to 0 */</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a1feb976d7d36c29ec2d85294cda85c18">FXLS896x_SDCD_OT_DBCNT</a>, 0, 0},</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="comment">/* Set the SDCD lower and upper thresholds to +/-100mg*/</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a5758234766c3349caeac3ff6232529fd">FXLS896x_SDCD_LTHS_LSB</a>, 0xCC, 0},</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a409fd69f2e93939536265ccaadbda95f">FXLS896x_SDCD_LTHS_MSB</a>, 0xFF, 0},</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1ae95b19144da3d80e03a79ef741b64752">FXLS896x_SDCD_UTHS_LSB</a>, 0x34, 0},</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1af6642821c882c3d0d3c5bf8a2ba77539">FXLS896x_SDCD_UTHS_MSB</a>, 0x00, 0},</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="comment">/* Enable SDCD outside of thresholds event Auto-WAKE/SLEEP transition source enable. */</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1aa4d3b8664c8483d927da7c1d402efcb6">FXLS896x_SENS_CONFIG4</a>, <a class="code" href="a00062.html#a62a44d01a5708a17f158ec816188253f">FXLS896x_SENS_CONFIG4_WK_SDCD_OT_EN</a> | <a class="code" href="a00062.html#a9a874b2d2aaf43722e0e5f2f26f2a7ac">FXLS896x_SENS_CONFIG4_INT_POL_ACT_HIGH</a>, <a class="code" href="a00062.html#ae390cccc9da7f83785eb211e57189ac2">FXLS896x_SENS_CONFIG4_WK_SDCD_OT_MASK</a> | <a class="code" href="a00062.html#aad6625a746b8e35b7f3786b1059c2de9">FXLS896x_SENS_CONFIG4_INT_POL_MASK</a>},</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="comment">/* Set the ASLP count to 5sec */</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a928ab3635c72ba5f4c98b87b7bdaee58">FXLS896x_ASLP_COUNT_LSB</a>, 0xD0, 0},</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a2113c6f4af5aed53885ad71b6bb23dbd">FXLS896x_ASLP_COUNT_MSB</a>, 0x07, 0},</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="comment">/* Enable Interrupts for WAKE mode. */</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a01fefb1f0918f5fe07ee5ce496bbe64f">FXLS896x_INT_EN</a>, <a class="code" href="a00062.html#a04589a02aad42e33c5747d1549d4e264">FXLS896x_INT_EN_WAKE_OUT_EN_EN</a>, <a class="code" href="a00062.html#aecf4abfeb4dcc9649fec615082ffa881">FXLS896x_INT_EN_WAKE_OUT_EN_MASK</a>},</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a37cb03aa4eedce3e8847917a0b4bee28">FXLS896x_INT_PIN_SEL</a>, <a class="code" href="a00062.html#a487e75804aa057351685243fc6ca342b">FXLS896x_INT_PIN_SEL_WK_OUT_INT2_DIS</a>, <a class="code" href="a00062.html#af649ecc22ed4eabc13105d18606e8e11">FXLS896x_INT_PIN_SEL_WK_OUT_INT2_MASK</a>},</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment">/*! @brief Read register list to read SysMode Register. */</span></div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="a00368.html#a55dd3f29b36c588375707a6f51ad1f8e">   73</a></span>&#160;<span class="keyword">const</span> <a class="code" href="a03811.html">registerreadlist_t</a> <a class="code" href="a00368.html#a55dd3f29b36c588375707a6f51ad1f8e">cFxls896xReadSysMode</a>[] = {{.<a class="code" href="a03811.html#a5fe82375de174c0511ca301fec78e441">readFrom</a> = <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a8141ae3483ff9b2c78306244be426b48">FXLS896x_SYS_MODE</a>, .numBytes = 1}, <a class="code" href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a>};</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment">/*! @brief Read register list to read INT_STATUS Register. */</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="a00368.html#a6aad54b5efa0b71590464d866be41c5b">   76</a></span>&#160;<span class="keyword">const</span> <a class="code" href="a03811.html">registerreadlist_t</a> <a class="code" href="a00368.html#a6aad54b5efa0b71590464d866be41c5b">cFxls896xReadIntStatus</a>[] = {{.<a class="code" href="a03811.html#a5fe82375de174c0511ca301fec78e441">readFrom</a> = <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a2735a5a46423052c12cadba4c867a85c">FXLS896x_INT_STATUS</a>, .numBytes = 1}, <a class="code" href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a>};</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment">// Global Variables</span></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="a00368.html#a96aa5a5b5a988cd510f43dc5c8979e3b">   81</a></span>&#160;<span class="keyword">volatile</span> <span class="keywordtype">bool</span> <a class="code" href="a00368.html#a96aa5a5b5a988cd510f43dc5c8979e3b">gFxls896xIntFlag</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="a00368.html#a3c22bed16a7c769894081222aa6107d8">   83</a></span>&#160;    ARM_DRIVER_I2C *<a class="code" href="a00368.html#a3c22bed16a7c769894081222aa6107d8">I2Cdrv</a> = &amp;<a class="code" href="a04343.html#ad6a14737695a4218d07182b86b21f570">I2C_S_DRIVER</a>;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="a00368.html#ab62e4262c23c0ce0850b32ffa1253d44">   84</a></span>&#160;    <a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> <a class="code" href="a00368.html#ab62e4262c23c0ce0850b32ffa1253d44">fxls896xDriver</a>;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="a00368.html#ac61bf859f26cd2541c3958bff34e2bda">   85</a></span>&#160;    <a class="code" href="a03903.html">GENERIC_DRIVER_GPIO</a> *<a class="code" href="a00368.html#ac61bf859f26cd2541c3958bff34e2bda">pGpioDriver</a> = &amp;<a class="code" href="a04841.html#a2c39f234913855fad752a8f96f245b27">Driver_GPIO_KSDK</a>;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="comment">// Functions</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="comment">//-----------------------------------------------------------------------</span><span class="comment"></span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="comment">/*! -----------------------------------------------------------------------</span></div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="comment"> *  @brief       This is the Sensor Data Ready ISR implementation.</span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="comment"> *  @details     This function sets the flag which indicates if a new sample(s) is available for reading.</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="comment"> *  @param[in]   pUserData This is a void pointer to the instance of the user specific data structure for the ISR.</span></div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="comment"> *  @return      void  There is no return value.</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="comment"> *  -----------------------------------------------------------------------*/</span></div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="a00368.html#a53209e9d89d5b13299d26f6e73a9e1f5">   95</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00368.html#a53209e9d89d5b13299d26f6e73a9e1f5">fxls896x_int_callback</a>(<span class="keywordtype">void</span> *pUserData)</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;{ <span class="comment">/*! @brief Set flag to indicate Sensor has signalled data ready. */</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                <a class="code" href="a00368.html#a96aa5a5b5a988cd510f43dc5c8979e3b">gFxls896xIntFlag</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="comment">/*! -----------------------------------------------------------------------</span></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="comment"> *  @brief       This is the The main function implementation.</span></div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="comment"> *  @details     This function invokes board initializes routines, then then brings up the sensor and</span></div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="comment"> *               finally enters an endless loop to continuously read available samples.</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="comment"> *  @param[in]   void This is no input parameter.</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="comment"> *  @return      void  There is no return value.</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="comment"> *  -----------------------------------------------------------------------*/</span></div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="a00368.html#a840291bc02cba5474a4cb46a9b9566fe">  107</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00368.html#a840291bc02cba5474a4cb46a9b9566fe">main</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;{</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    uint8_t whoami;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    uint8_t intStatus, eventStatus = 0;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    uint8_t sleeptowake = 0;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                uint8_t waketosleep = 0;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    uint8_t firsttransition = 1;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    uint8_t onetime_modetransition = 1;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="comment">    /*! Initialize the MCU hardware. */</span></div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <a class="code" href="a00959.html#ga2c9fe54b6b84723fbaa590a6f4576966">BOARD_InitPins</a>();</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <a class="code" href="a04292.html#a8d81431cbbc4b01da56afbff0f766379">BOARD_BootClockRUN</a>();</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <a class="code" href="a00530.html#ad43629969994e92bd3620e630bda24c8">BOARD_SystickEnable</a>();</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <a class="code" href="a04109.html#a4c84ccb952cb083367d7040cf9de3db8">BOARD_InitDebugConsole</a>();</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    PRINTF(<span class="stringliteral">&quot;\r\n ISSDK FXLS896xAF sensor driver example to detect motion event &amp; AWS\r\n&quot;</span>);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="comment">    /*! Initialize FXLS8964 pin used by FRDM board */</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    pGpioDriver-&gt;<a class="code" href="a03903.html#a0c1e5657ab29e57116a57c7b22f4c630">pin_init</a>(&amp;<a class="code" href="a04088.html#a323b5df5f16c87a33e92f0a63618437b">FXLS896x_INT1</a>, <a class="code" href="a00482.html#a631d09668ec8f40a64ff69613cdbbba5aea9c54895635603d054830602ba5fb4e">GPIO_DIRECTION_IN</a>, NULL, &amp;<a class="code" href="a00368.html#a53209e9d89d5b13299d26f6e73a9e1f5">fxls896x_int_callback</a>, NULL);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="comment">    /*! Initialize RGB LED pin used by FRDM board */</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    pGpioDriver-&gt;<a class="code" href="a03903.html#a0c1e5657ab29e57116a57c7b22f4c630">pin_init</a>(&amp;<a class="code" href="a00575.html#a02a28175122c7e060eeb1411dc5ac171">GREEN_LED</a>, <a class="code" href="a00482.html#a631d09668ec8f40a64ff69613cdbbba5a869f710c2bafc06d7ef192861b8358ab">GPIO_DIRECTION_OUT</a>, NULL, NULL, NULL);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="comment">    /*! Initialize the I2C driver. */</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    status = <a class="code" href="a00368.html#a3c22bed16a7c769894081222aa6107d8">I2Cdrv</a>-&gt;Initialize(<a class="code" href="a04343.html#a60ac2e3bb32ae33e2fd542f607a58ac4">I2C_S_SIGNAL_EVENT</a>);</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    {</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        PRINTF(<span class="stringliteral">&quot;\r\n I2C Initialization Failed\r\n&quot;</span>);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    }</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="comment">    /*! Set the I2C Power mode. */</span></div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    status = <a class="code" href="a00368.html#a3c22bed16a7c769894081222aa6107d8">I2Cdrv</a>-&gt;PowerControl(ARM_POWER_FULL);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    {</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        PRINTF(<span class="stringliteral">&quot;\r\n I2C Power Mode setting Failed\r\n&quot;</span>);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    }</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="comment">    /*! Set the I2C bus speed. */</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    status = <a class="code" href="a00368.html#a3c22bed16a7c769894081222aa6107d8">I2Cdrv</a>-&gt;Control(ARM_I2C_BUS_SPEED, ARM_I2C_BUS_SPEED_FAST);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    {</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        PRINTF(<span class="stringliteral">&quot;\r\n I2C Control Mode setting Failed\r\n&quot;</span>);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    }</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;<span class="comment">    /*! Initialize FXLS896x sensor driver. */</span></div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    status = <a class="code" href="a00065.html#ac6e9e086c62c58d5a225a89a7abbe9ce">FXLS896x_I2C_Initialize</a>(&amp;fxls896xDriver, &amp;<a class="code" href="a04343.html#ad6a14737695a4218d07182b86b21f570">I2C_S_DRIVER</a>, <a class="code" href="a04343.html#ab0c7969a7fffaabe78d43db2b12ad840">I2C_S_DEVICE_INDEX</a>, <a class="code" href="a04088.html#a8cdfe997dc1391190e45084feb03ffa5">FXLS896x_I2C_ADDR</a>,</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                                     &amp;whoami);</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    {</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        PRINTF(<span class="stringliteral">&quot;\r\n Sensor Initialization Failed\r\n&quot;</span>);</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    }</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordflow">if</span> ((<a class="code" href="a00053.html#a0e2813efc663c73cf197440dc777449e">FXLS8964_WHOAMI_VALUE</a> == whoami) || (<a class="code" href="a00053.html#a2e3073191f679038dab97710177d8dbb">FXLS8967_WHOAMI_VALUE</a> == whoami))</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    {</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                PRINTF(<span class="stringliteral">&quot;\r\n Successfully Initialized Gemini with WHO_AM_I = 0x%X\r\n&quot;</span>, whoami);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    }</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((<a class="code" href="a00053.html#a223547efc151de478d3fc1aaa84e4370">FXLS8974_WHOAMI_VALUE</a> == whoami) || (<a class="code" href="a00062.html#aef9d2e92781983e278303c4de7e75600">FXLS8968_WHOAMI_VALUE</a> == whoami))</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    {</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                PRINTF(<span class="stringliteral">&quot;\r\n Successfully Initialized Timandra with WHO_AM_I = 0x%X\r\n&quot;</span>, whoami);</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    }</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a00053.html#a827f1c265a5d5c1bb4b037f9c5d0b8ca">FXLS8962_WHOAMI_VALUE</a> == whoami)</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    {</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                PRINTF(<span class="stringliteral">&quot;\r\n Successfully Initialized Newstein with WHO_AM_I = 0x%X\r\n&quot;</span>, whoami);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    }</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                PRINTF(<span class="stringliteral">&quot;\r\n Bad WHO_AM_I = 0x%X\r\n&quot;</span>, whoami);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    }</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="comment">    /*!  Set the task to be executed while waiting for I2C transactions to complete. */</span></div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <a class="code" href="a00065.html#a95b274e5f8a7c15cfa87b872b3a411ab">FXLS896x_I2C_SetIdleTask</a>(&amp;fxls896xDriver, (<a class="code" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a>)<a class="code" href="a00638.html#a82cb114bb9a5ea2f235a0216709d70f8">SMC_SetPowerModeVlpr</a>, <a class="code" href="a00641.html#a6667e81e5b32250febd3d46511d9309d">SMC</a>);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="comment">    /*! Configure the FXLS896x sensor. */</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&amp;fxls896xDriver, cFxls896xAwsConfig);</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    {</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        PRINTF(<span class="stringliteral">&quot;\r\n FXLS8964 Sensor Configuration Failed, Err = %d\r\n&quot;</span>, status);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    }</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    PRINTF(<span class="stringliteral">&quot;\r\n Successfully Applied FXLS8964 Sensor Configuration\r\n&quot;</span>);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="keywordflow">for</span> (;;) <span class="comment">/* Forever loop */</span></div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    {</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;                eventStatus = 0;<span class="comment"></span></div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="comment">        /*! Read new raw sensor data from the FXLS8964. */</span></div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        status = <a class="code" href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a>(&amp;fxls896xDriver, cFxls896xReadSysMode, &amp;eventStatus);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        {</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        }</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <span class="keywordflow">if</span> (eventStatus == <a class="code" href="a00062.html#ae63dd4ba03fc0ef1cb5c650fb1ec679b">FXLS896x_SYS_MODE_SYS_MODE_WAKE</a>)</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        {</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;            <span class="keywordflow">if</span> (<span class="keyword">true</span> == <a class="code" href="a00368.html#a96aa5a5b5a988cd510f43dc5c8979e3b">gFxls896xIntFlag</a>)</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            {</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;              <span class="keywordflow">if</span> (sleeptowake == 1)</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;              {<span class="comment"></span></div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="comment">                /*! Wake Mode Detected. */</span></div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;                PRINTF(<span class="stringliteral">&quot;\r\n Motion Detected....\r\n&quot;</span>);</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;                PRINTF(<span class="stringliteral">&quot;\r\n Motion Wake Mode Detected....SYSMODE = %d\r\n&quot;</span>, eventStatus);</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;                PRINTF(<span class="stringliteral">&quot;\r\n MCU woke-up on sensor motion event\r\n&quot;</span>);</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;                PRINTF(<span class="stringliteral">&quot;\r\n Will enter sleep mode after expiration of ASLP counter = ~5sec\r\n\r\n&quot;</span>);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;                sleeptowake = 0;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;              }</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;                pGpioDriver-&gt;<a class="code" href="a03903.html#ac3e094122adb91dc940bc7c033b47baa">set_pin</a>(&amp;<a class="code" href="a00575.html#a0708abafae354c60ffb72a4a3a407efc">RED_LED</a>);</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                pGpioDriver-&gt;<a class="code" href="a03903.html#aa59efe0989ad47737f368819d5dae141">clr_pin</a>(&amp;<a class="code" href="a00575.html#a02a28175122c7e060eeb1411dc5ac171">GREEN_LED</a>);</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                waketosleep = 1;</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            }</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        }</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        {</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;           <span class="keywordflow">if</span> ((waketosleep == 1) || (firsttransition == 1))</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;           {</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;             <span class="keywordflow">if</span> (1 == onetime_modetransition)</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;             {</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;               onetime_modetransition = 0;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;             }</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;             </div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;             status = <a class="code" href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a>(&amp;fxls896xDriver, cFxls896xReadIntStatus, &amp;intStatus);</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;             <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;             {</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;               <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;             }</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;             PRINTF(<span class="stringliteral">&quot;\r\n ASLP counter expired....\r\n&quot;</span>);</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;             PRINTF(<span class="stringliteral">&quot;\r\n Going to Sleep Mode....SYSMODE = %d\r\n&quot;</span>, eventStatus);</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;             PRINTF(<span class="stringliteral">&quot;\r\n Putting MCU in low power sleep\r\n\r\n&quot;</span>);</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;             waketosleep = 0;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;             firsttransition = 0;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;           }</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;           pGpioDriver-&gt;<a class="code" href="a03903.html#ac3e094122adb91dc940bc7c033b47baa">set_pin</a>(&amp;<a class="code" href="a00575.html#a02a28175122c7e060eeb1411dc5ac171">GREEN_LED</a>);</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;           pGpioDriver-&gt;<a class="code" href="a03903.html#aa59efe0989ad47737f368819d5dae141">clr_pin</a>(&amp;<a class="code" href="a00575.html#a0708abafae354c60ffb72a4a3a407efc">RED_LED</a>);</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;           sleeptowake = 1;</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;           <a class="code" href="a00368.html#a96aa5a5b5a988cd510f43dc5c8979e3b">gFxls896xIntFlag</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;           <a class="code" href="a00638.html#a5423cac017d1d1a8ac8bba8e91e80e29">SMC_SetPowerModeWait</a>(<a class="code" href="a00641.html#a6667e81e5b32250febd3d46511d9309d">SMC</a>);</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;          <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        }</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    }</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;}</div><div class="ttc" id="a03903_html_ac3e094122adb91dc940bc7c033b47baa"><div class="ttname"><a href="a03903.html#ac3e094122adb91dc940bc7c033b47baa">GENERIC_DRIVER_GPIO::set_pin</a></div><div class="ttdeci">void(* set_pin)(pinID_t aPinId)</div><div class="ttdef"><b>Definition:</b> <a href="a00482_source.html#l00046">Driver_GPIO.h:46</a></div></div>
52<div class="ttc" id="a04088_html_a8cdfe997dc1391190e45084feb03ffa5"><div class="ttname"><a href="a04088.html#a8cdfe997dc1391190e45084feb03ffa5">FXLS896x_I2C_ADDR</a></div><div class="ttdeci">#define FXLS896x_I2C_ADDR</div><div class="ttdef"><b>Definition:</b> <a href="a04088_source.html#l00019">frdm_stba_a896x_shield.h:19</a></div></div>
53<div class="ttc" id="a00068_html"><div class="ttname"><a href="a00068.html">fxls896x_drv.h</a></div><div class="ttdoc">The fxls896x_drv.h file describes the FXLS8964/67AF driver interface and structures. </div></div>
54<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1abf1ecb7df2b170c64227ffe80c14ef2b"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1abf1ecb7df2b170c64227ffe80c14ef2b">FXLS896x_SENS_CONFIG3</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00049">fxls896x.h:49</a></div></div>
55<div class="ttc" id="a03807_html"><div class="ttname"><a href="a03807.html">registerwritelist_t</a></div><div class="ttdoc">This structure defines the Write command List. </div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00068">sensor_drv.h:68</a></div></div>
56<div class="ttc" id="a00062_html_ae5d4e2a78a310472c242cb313e400620"><div class="ttname"><a href="a00062.html#ae5d4e2a78a310472c242cb313e400620">FXLS896x_SENS_CONFIG1_FSR_4G</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_FSR_4G</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00455">fxls896x.h:455</a></div></div>
57<div class="ttc" id="a00359_html_a369536ebfe385731562c0b55dd6f3a7c"><div class="ttname"><a href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a></div><div class="ttdeci">int32_t status</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00248">fxls896xaf_freemaster_demo.c:248</a></div></div>
58<div class="ttc" id="a00062_html_ae63dd4ba03fc0ef1cb5c650fb1ec679b"><div class="ttname"><a href="a00062.html#ae63dd4ba03fc0ef1cb5c650fb1ec679b">FXLS896x_SYS_MODE_SYS_MODE_WAKE</a></div><div class="ttdeci">#define FXLS896x_SYS_MODE_SYS_MODE_WAKE</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00385">fxls896x.h:385</a></div></div>
59<div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00033">sensor_drv.h:33</a></div></div>
60<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1aa4d3b8664c8483d927da7c1d402efcb6"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1aa4d3b8664c8483d927da7c1d402efcb6">FXLS896x_SENS_CONFIG4</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00050">fxls896x.h:50</a></div></div>
61<div class="ttc" id="a04343_html_a60ac2e3bb32ae33e2fd542f607a58ac4"><div class="ttname"><a href="a04343.html#a60ac2e3bb32ae33e2fd542f607a58ac4">I2C_S_SIGNAL_EVENT</a></div><div class="ttdeci">#define I2C_S_SIGNAL_EVENT</div><div class="ttdef"><b>Definition:</b> <a href="a04343_source.html#l00034">issdk_hal.h:34</a></div></div>
62<div class="ttc" id="a00638_html_a82cb114bb9a5ea2f235a0216709d70f8"><div class="ttname"><a href="a00638.html#a82cb114bb9a5ea2f235a0216709d70f8">SMC_SetPowerModeVlpr</a></div><div class="ttdeci">status_t SMC_SetPowerModeVlpr(void *arg)</div><div class="ttdoc">Configures the system to VLPR power mode. API name used from Kinetis family to maintain compatibility...</div><div class="ttdef"><b>Definition:</b> <a href="a00638_source.html#l00169">lpc54114.c:169</a></div></div>
63<div class="ttc" id="a00062_html_ac906cf830ae871a8f3b678b4da62fe9d"><div class="ttname"><a href="a00062.html#ac906cf830ae871a8f3b678b4da62fe9d">FXLS896x_SENS_CONFIG3_WAKE_ODR_400HZ</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG3_WAKE_ODR_400HZ</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00560">fxls896x.h:560</a></div></div>
64<div class="ttc" id="a00575_html_a0708abafae354c60ffb72a4a3a407efc"><div class="ttname"><a href="a00575.html#a0708abafae354c60ffb72a4a3a407efc">RED_LED</a></div><div class="ttdeci">gpioHandleKSDK_t RED_LED</div><div class="ttdef"><b>Definition:</b> <a href="a00575_source.html#l00181">frdm_k64f.c:181</a></div></div>
65<div class="ttc" id="a00368_html_a6aad54b5efa0b71590464d866be41c5b"><div class="ttname"><a href="a00368.html#a6aad54b5efa0b71590464d866be41c5b">cFxls896xReadIntStatus</a></div><div class="ttdeci">const registerreadlist_t cFxls896xReadIntStatus[]</div><div class="ttdoc">Read register list to read INT_STATUS Register. </div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00076">fxls896xaf_motion_wakeup.c:76</a></div></div>
66<div class="ttc" id="a00062_html_a813956ddf5068f4da833a7247ec7b95a"><div class="ttname"><a href="a00062.html#a813956ddf5068f4da833a7247ec7b95a">FXLS896x_SDCD_CONFIG2_SDCD_EN_EN</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG2_SDCD_EN_EN</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01628">fxls896x.h:1628</a></div></div>
67<div class="ttc" id="a04292_html_a8d81431cbbc4b01da56afbff0f766379"><div class="ttname"><a href="a04292.html#a8d81431cbbc4b01da56afbff0f766379">BOARD_BootClockRUN</a></div><div class="ttdeci">#define BOARD_BootClockRUN</div><div class="ttdef"><b>Definition:</b> <a href="a04292_source.html#l00019">clock_config.h:19</a></div></div>
68<div class="ttc" id="a00065_html_ac6e9e086c62c58d5a225a89a7abbe9ce"><div class="ttname"><a href="a00065.html#ac6e9e086c62c58d5a225a89a7abbe9ce">FXLS896x_I2C_Initialize</a></div><div class="ttdeci">int32_t FXLS896x_I2C_Initialize(fxls896x_i2c_sensorhandle_t *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t *whoami)</div><div class="ttdoc">The interface function to initialize the sensor. </div><div class="ttdef"><b>Definition:</b> <a href="a00065_source.html#l00239">fxls896x_drv.c:239</a></div></div>
69<div class="ttc" id="a03903_html"><div class="ttname"><a href="a03903.html">GENERIC_DRIVER_GPIO</a></div><div class="ttdoc">Access structure of the GPIO Driver. </div><div class="ttdef"><b>Definition:</b> <a href="a00482_source.html#l00038">Driver_GPIO.h:38</a></div></div>
70<div class="ttc" id="a00641_html_a6667e81e5b32250febd3d46511d9309d"><div class="ttname"><a href="a00641.html#a6667e81e5b32250febd3d46511d9309d">SMC</a></div><div class="ttdeci">#define SMC</div><div class="ttdef"><b>Definition:</b> <a href="a00641_source.html#l00118">lpc54114.h:118</a></div></div>
71<div class="ttc" id="a00062_html_a487e75804aa057351685243fc6ca342b"><div class="ttname"><a href="a00062.html#a487e75804aa057351685243fc6ca342b">FXLS896x_INT_PIN_SEL_WK_OUT_INT2_DIS</a></div><div class="ttdeci">#define FXLS896x_INT_PIN_SEL_WK_OUT_INT2_DIS</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00968">fxls896x.h:968</a></div></div>
72<div class="ttc" id="a00062_html_aad6625a746b8e35b7f3786b1059c2de9"><div class="ttname"><a href="a00062.html#aad6625a746b8e35b7f3786b1059c2de9">FXLS896x_SENS_CONFIG4_INT_POL_MASK</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG4_INT_POL_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00618">fxls896x.h:618</a></div></div>
73<div class="ttc" id="a00179_html_a2cedde333a6373a3ee274bde6af145d0"><div class="ttname"><a href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a></div><div class="ttdeci">#define __END_WRITE_DATA__</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00045">sensor_drv.h:45</a></div></div>
74<div class="ttc" id="a03903_html_aa59efe0989ad47737f368819d5dae141"><div class="ttname"><a href="a03903.html#aa59efe0989ad47737f368819d5dae141">GENERIC_DRIVER_GPIO::clr_pin</a></div><div class="ttdeci">void(* clr_pin)(pinID_t aPinId)</div><div class="ttdef"><b>Definition:</b> <a href="a00482_source.html#l00047">Driver_GPIO.h:47</a></div></div>
75<div class="ttc" id="a00521_html_a5d7069350a7d7e65686c77a8038f462f"><div class="ttname"><a href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a></div><div class="ttdeci">typedef int32_t(DATA_FORMAT_Append_t))(void *pData</div><div class="ttdoc">The interface function to append the data on the formated stream. </div></div>
76<div class="ttc" id="a00482_html_a631d09668ec8f40a64ff69613cdbbba5aea9c54895635603d054830602ba5fb4e"><div class="ttname"><a href="a00482.html#a631d09668ec8f40a64ff69613cdbbba5aea9c54895635603d054830602ba5fb4e">GPIO_DIRECTION_IN</a></div><div class="ttdef"><b>Definition:</b> <a href="a00482_source.html#l00023">Driver_GPIO.h:23</a></div></div>
77<div class="ttc" id="a04109_html_a4c84ccb952cb083367d7040cf9de3db8"><div class="ttname"><a href="a04109.html#a4c84ccb952cb083367d7040cf9de3db8">BOARD_InitDebugConsole</a></div><div class="ttdeci">void BOARD_InitDebugConsole(void)</div><div class="ttdef"><b>Definition:</b> <a href="a04109_source.html#l00015">board.c:15</a></div></div>
78<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a37cb03aa4eedce3e8847917a0b4bee28"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a37cb03aa4eedce3e8847917a0b4bee28">FXLS896x_INT_PIN_SEL</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00059">fxls896x.h:59</a></div></div>
79<div class="ttc" id="a00062_html_aecf4abfeb4dcc9649fec615082ffa881"><div class="ttname"><a href="a00062.html#aecf4abfeb4dcc9649fec615082ffa881">FXLS896x_INT_EN_WAKE_OUT_EN_MASK</a></div><div class="ttdeci">#define FXLS896x_INT_EN_WAKE_OUT_EN_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00829">fxls896x.h:829</a></div></div>
80<div class="ttc" id="a00053_html_a2e3073191f679038dab97710177d8dbb"><div class="ttname"><a href="a00053.html#a2e3073191f679038dab97710177d8dbb">FXLS8967_WHOAMI_VALUE</a></div><div class="ttdeci">#define FXLS8967_WHOAMI_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="a00053_source.html#l00089">fxls8962.h:89</a></div></div>
81<div class="ttc" id="a00062_html_a78d75a749948860444e3d6e5feb7d8fc"><div class="ttname"><a href="a00062.html#a78d75a749948860444e3d6e5feb7d8fc">FXLS896x_SDCD_CONFIG2_SDCD_EN_MASK</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG2_SDCD_EN_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01621">fxls896x.h:1621</a></div></div>
82<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1aebac5ec12a6a2e0470ce4c313f66b081"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1aebac5ec12a6a2e0470ce4c313f66b081">FXLS896x_SDCD_CONFIG1</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00072">fxls896x.h:72</a></div></div>
83<div class="ttc" id="a00368_html_a55dd3f29b36c588375707a6f51ad1f8e"><div class="ttname"><a href="a00368.html#a55dd3f29b36c588375707a6f51ad1f8e">cFxls896xReadSysMode</a></div><div class="ttdeci">const registerreadlist_t cFxls896xReadSysMode[]</div><div class="ttdoc">Read register list to read SysMode Register. </div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00073">fxls896xaf_motion_wakeup.c:73</a></div></div>
84<div class="ttc" id="a00062_html_a6d6ed1dca43867c7fcd29960f3fba604"><div class="ttname"><a href="a00062.html#a6d6ed1dca43867c7fcd29960f3fba604">FXLS896x_SDCD_CONFIG1_X_OT_EN_MASK</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG1_X_OT_EN_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01526">fxls896x.h:1526</a></div></div>
85<div class="ttc" id="a00062_html_aaf486470362e16558022ed0578a7633f"><div class="ttname"><a href="a00062.html#aaf486470362e16558022ed0578a7633f">FXLS896x_SDCD_CONFIG1_Y_OT_EN_EN</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG1_Y_OT_EN_EN</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01552">fxls896x.h:1552</a></div></div>
86<div class="ttc" id="a00062_html_a55859f06f0f36d4107d10efda0c39f7e"><div class="ttname"><a href="a00062.html#a55859f06f0f36d4107d10efda0c39f7e">FXLS896x_SDCD_CONFIG1_OT_ELE_MASK</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG1_OT_ELE_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01532">fxls896x.h:1532</a></div></div>
87<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a01fefb1f0918f5fe07ee5ce496bbe64f"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a01fefb1f0918f5fe07ee5ce496bbe64f">FXLS896x_INT_EN</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00058">fxls896x.h:58</a></div></div>
88<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1ae95b19144da3d80e03a79ef741b64752"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1ae95b19144da3d80e03a79ef741b64752">FXLS896x_SDCD_UTHS_LSB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00078">fxls896x.h:78</a></div></div>
89<div class="ttc" id="a00062_html_af6f480f3072bfffd6e8db57e9b485eab"><div class="ttname"><a href="a00062.html#af6f480f3072bfffd6e8db57e9b485eab">FXLS896x_SENS_CONFIG3_SLEEP_ODR_MASK</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG3_SLEEP_ODR_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00548">fxls896x.h:548</a></div></div>
90<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a1feb976d7d36c29ec2d85294cda85c18"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a1feb976d7d36c29ec2d85294cda85c18">FXLS896x_SDCD_OT_DBCNT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00074">fxls896x.h:74</a></div></div>
91<div class="ttc" id="a04088_html_a323b5df5f16c87a33e92f0a63618437b"><div class="ttname"><a href="a04088.html#a323b5df5f16c87a33e92f0a63618437b">FXLS896x_INT1</a></div><div class="ttdeci">#define FXLS896x_INT1</div><div class="ttdef"><b>Definition:</b> <a href="a04088_source.html#l00024">frdm_stba_a896x_shield.h:24</a></div></div>
92<div class="ttc" id="a00179_html_a5deff6bd688b60b97b84fc7e78d3ea63"><div class="ttname"><a href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a></div><div class="ttdeci">void(* registeridlefunction_t)(void *userParam)</div><div class="ttdoc">This is the register idle function type. </div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00097">sensor_drv.h:97</a></div></div>
93<div class="ttc" id="a00062_html_a4be837ee453474213394bf34a10ba959"><div class="ttname"><a href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_FSR_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00423">fxls896x.h:423</a></div></div>
94<div class="ttc" id="a00368_html_a840291bc02cba5474a4cb46a9b9566fe"><div class="ttname"><a href="a00368.html#a840291bc02cba5474a4cb46a9b9566fe">main</a></div><div class="ttdeci">int main(void)</div><div class="ttdoc">This is the The main function implementation. </div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00107">fxls896xaf_motion_wakeup.c:107</a></div></div>
95<div class="ttc" id="a00062_html_a6e2af1122b063ecfcb9a2368475c6e8a"><div class="ttname"><a href="a00062.html#a6e2af1122b063ecfcb9a2368475c6e8a">FXLS896x_SDCD_CONFIG1_Y_OT_EN_MASK</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG1_Y_OT_EN_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01523">fxls896x.h:1523</a></div></div>
96<div class="ttc" id="a00062_html_ae390cccc9da7f83785eb211e57189ac2"><div class="ttname"><a href="a00062.html#ae390cccc9da7f83785eb211e57189ac2">FXLS896x_SENS_CONFIG4_WK_SDCD_OT_MASK</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG4_WK_SDCD_OT_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00633">fxls896x.h:633</a></div></div>
97<div class="ttc" id="a00062_html_a185d5ef7e0f9e2a67e2a234769c555ca"><div class="ttname"><a href="a00062.html#a185d5ef7e0f9e2a67e2a234769c555ca">FXLS896x_SDCD_CONFIG2_REF_UPDM_SDCD_REF</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG2_REF_UPDM_SDCD_REF</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01633">fxls896x.h:1633</a></div></div>
98<div class="ttc" id="a02043_html"><div class="ttname"><a href="a02043.html">fxls896x_i2c_sensorhandle_t</a></div><div class="ttdoc">This defines the sensor specific information for I2C. </div><div class="ttdef"><b>Definition:</b> <a href="a00068_source.html#l00043">fxls896x_drv.h:43</a></div></div>
99<div class="ttc" id="a00062_html_a62a44d01a5708a17f158ec816188253f"><div class="ttname"><a href="a00062.html#a62a44d01a5708a17f158ec816188253f">FXLS896x_SENS_CONFIG4_WK_SDCD_OT_EN</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG4_WK_SDCD_OT_EN</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00655">fxls896x.h:655</a></div></div>
100<div class="ttc" id="a00062_html_ae087fef14231e8d89fe10ed38d7e0881"><div class="ttname"><a href="a00062.html#ae087fef14231e8d89fe10ed38d7e0881">FXLS896x_SENS_CONFIG3_SLEEP_ODR_6_25HZ</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG3_SLEEP_ODR_6_25HZ</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00579">fxls896x.h:579</a></div></div>
101<div class="ttc" id="a00368_html_a53209e9d89d5b13299d26f6e73a9e1f5"><div class="ttname"><a href="a00368.html#a53209e9d89d5b13299d26f6e73a9e1f5">fxls896x_int_callback</a></div><div class="ttdeci">void fxls896x_int_callback(void *pUserData)</div><div class="ttdoc">This is the Sensor Data Ready ISR implementation. </div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00095">fxls896xaf_motion_wakeup.c:95</a></div></div>
102<div class="ttc" id="a00065_html_adc8ae229a44c0a20d100948b37627f55"><div class="ttname"><a href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a></div><div class="ttdeci">int32_t FXLS896x_I2C_Configure(fxls896x_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)</div><div class="ttdoc">The interface function to configure he sensor. </div><div class="ttdef"><b>Definition:</b> <a href="a00065_source.html#l00285">fxls896x_drv.c:285</a></div></div>
103<div class="ttc" id="a00179_html_aebb58a1bb3df30b7df4f6f14d0f1a81d"><div class="ttname"><a href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a></div><div class="ttdeci">#define __END_READ_DATA__</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00051">sensor_drv.h:51</a></div></div>
104<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a409fd69f2e93939536265ccaadbda95f"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a409fd69f2e93939536265ccaadbda95f">FXLS896x_SDCD_LTHS_MSB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00077">fxls896x.h:77</a></div></div>
105<div class="ttc" id="a00065_html_ad01e593a8d907f415e370c4dbb8b85c6"><div class="ttname"><a href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a></div><div class="ttdeci">int32_t FXLS896x_I2C_ReadData(fxls896x_i2c_sensorhandle_t *pSensorHandle, const registerreadlist_t *pReadList, uint8_t *pBuffer)</div><div class="ttdoc">The interface function to read the sensor data. </div><div class="ttdef"><b>Definition:</b> <a href="a00065_source.html#l00330">fxls896x_drv.c:330</a></div></div>
106<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a02fdc5ed7f58173579b0ab9451054455"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a02fdc5ed7f58173579b0ab9451054455">FXLS896x_SDCD_CONFIG2</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00073">fxls896x.h:73</a></div></div>
107<div class="ttc" id="a00062_html_a6e67f2aaf62ec14dfed253c9a96ca673"><div class="ttname"><a href="a00062.html#a6e67f2aaf62ec14dfed253c9a96ca673">FXLS896x_SDCD_CONFIG1_X_OT_EN_EN</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG1_X_OT_EN_EN</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01548">fxls896x.h:1548</a></div></div>
108<div class="ttc" id="a00062_html_af649ecc22ed4eabc13105d18606e8e11"><div class="ttname"><a href="a00062.html#af649ecc22ed4eabc13105d18606e8e11">FXLS896x_INT_PIN_SEL_WK_OUT_INT2_MASK</a></div><div class="ttdeci">#define FXLS896x_INT_PIN_SEL_WK_OUT_INT2_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00913">fxls896x.h:913</a></div></div>
109<div class="ttc" id="a04343_html_ad6a14737695a4218d07182b86b21f570"><div class="ttname"><a href="a04343.html#ad6a14737695a4218d07182b86b21f570">I2C_S_DRIVER</a></div><div class="ttdeci">#define I2C_S_DRIVER</div><div class="ttdef"><b>Definition:</b> <a href="a04343_source.html#l00033">issdk_hal.h:33</a></div></div>
110<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a8141ae3483ff9b2c78306244be426b48"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a8141ae3483ff9b2c78306244be426b48">FXLS896x_SYS_MODE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00046">fxls896x.h:46</a></div></div>
111<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a2113c6f4af5aed53885ad71b6bb23dbd"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a2113c6f4af5aed53885ad71b6bb23dbd">FXLS896x_ASLP_COUNT_MSB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00057">fxls896x.h:57</a></div></div>
112<div class="ttc" id="a00368_html_ac61bf859f26cd2541c3958bff34e2bda"><div class="ttname"><a href="a00368.html#ac61bf859f26cd2541c3958bff34e2bda">pGpioDriver</a></div><div class="ttdeci">GENERIC_DRIVER_GPIO * pGpioDriver</div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00085">fxls896xaf_motion_wakeup.c:85</a></div></div>
113<div class="ttc" id="a00368_html_a3c22bed16a7c769894081222aa6107d8"><div class="ttname"><a href="a00368.html#a3c22bed16a7c769894081222aa6107d8">I2Cdrv</a></div><div class="ttdeci">ARM_DRIVER_I2C * I2Cdrv</div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00083">fxls896xaf_motion_wakeup.c:83</a></div></div>
114<div class="ttc" id="a00062_html_ae20937b4ae0cce890f00081436f26284"><div class="ttname"><a href="a00062.html#ae20937b4ae0cce890f00081436f26284">FXLS896x_SDCD_CONFIG2_REF_UPDM_MASK</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG2_REF_UPDM_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01618">fxls896x.h:1618</a></div></div>
115<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a928ab3635c72ba5f4c98b87b7bdaee58"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a928ab3635c72ba5f4c98b87b7bdaee58">FXLS896x_ASLP_COUNT_LSB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00056">fxls896x.h:56</a></div></div>
116<div class="ttc" id="a03811_html_a5fe82375de174c0511ca301fec78e441"><div class="ttname"><a href="a03811.html#a5fe82375de174c0511ca301fec78e441">registerreadlist_t::readFrom</a></div><div class="ttdeci">uint16_t readFrom</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00080">sensor_drv.h:80</a></div></div>
117<div class="ttc" id="a00368_html_ab62e4262c23c0ce0850b32ffa1253d44"><div class="ttname"><a href="a00368.html#ab62e4262c23c0ce0850b32ffa1253d44">fxls896xDriver</a></div><div class="ttdeci">fxls896x_i2c_sensorhandle_t fxls896xDriver</div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00084">fxls896xaf_motion_wakeup.c:84</a></div></div>
118<div class="ttc" id="a00065_html_a95b274e5f8a7c15cfa87b872b3a411ab"><div class="ttname"><a href="a00065.html#a95b274e5f8a7c15cfa87b872b3a411ab">FXLS896x_I2C_SetIdleTask</a></div><div class="ttdeci">void FXLS896x_I2C_SetIdleTask(fxls896x_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)</div><div class="ttdoc">: The interface function to set the I2C Idle Task. </div><div class="ttdef"><b>Definition:</b> <a href="a00065_source.html#l00277">fxls896x_drv.c:277</a></div></div>
119<div class="ttc" id="a00368_html_a96aa5a5b5a988cd510f43dc5c8979e3b"><div class="ttname"><a href="a00368.html#a96aa5a5b5a988cd510f43dc5c8979e3b">gFxls896xIntFlag</a></div><div class="ttdeci">volatile bool gFxls896xIntFlag</div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00081">fxls896xaf_motion_wakeup.c:81</a></div></div>
120<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a2735a5a46423052c12cadba4c867a85c"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a2735a5a46423052c12cadba4c867a85c">FXLS896x_INT_STATUS</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00027">fxls896x.h:27</a></div></div>
121<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00047">fxls896x.h:47</a></div></div>
122<div class="ttc" id="a00062_html_a553539863d11a45d8d1c1d232fd4fef5"><div class="ttname"><a href="a00062.html#a553539863d11a45d8d1c1d232fd4fef5">FXLS896x_SDCD_CONFIG1_Z_OT_EN_MASK</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG1_Z_OT_EN_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01520">fxls896x.h:1520</a></div></div>
123<div class="ttc" id="a00062_html_a9a874b2d2aaf43722e0e5f2f26f2a7ac"><div class="ttname"><a href="a00062.html#a9a874b2d2aaf43722e0e5f2f26f2a7ac">FXLS896x_SENS_CONFIG4_INT_POL_ACT_HIGH</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG4_INT_POL_ACT_HIGH</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00680">fxls896x.h:680</a></div></div>
124<div class="ttc" id="a00530_html_ad43629969994e92bd3620e630bda24c8"><div class="ttname"><a href="a00530.html#ad43629969994e92bd3620e630bda24c8">BOARD_SystickEnable</a></div><div class="ttdeci">void BOARD_SystickEnable(void)</div><div class="ttdoc">Function to enable systicks framework. </div><div class="ttdef"><b>Definition:</b> <a href="a00530_source.html#l00035">systick_utils.c:35</a></div></div>
125<div class="ttc" id="a00368_html_a7a14a0618a27c2316924d97abc521d9f"><div class="ttname"><a href="a00368.html#a7a14a0618a27c2316924d97abc521d9f">cFxls896xAwsConfig</a></div><div class="ttdeci">const registerwritelist_t cFxls896xAwsConfig[]</div><div class="ttdoc">Register settings for configuring SDCD-OT for tap-detection and Auto-Wake/Sleep in interrupt mode...</div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00045">fxls896xaf_motion_wakeup.c:45</a></div></div>
126<div class="ttc" id="a00638_html_a5423cac017d1d1a8ac8bba8e91e80e29"><div class="ttname"><a href="a00638.html#a5423cac017d1d1a8ac8bba8e91e80e29">SMC_SetPowerModeWait</a></div><div class="ttdeci">status_t SMC_SetPowerModeWait(void *arg)</div><div class="ttdoc">Configures the system to WAIT power mode. API name used from Kinetis family to maintain compatibility...</div><div class="ttdef"><b>Definition:</b> <a href="a00638_source.html#l00155">lpc54114.c:155</a></div></div>
127<div class="ttc" id="a03903_html_a0c1e5657ab29e57116a57c7b22f4c630"><div class="ttname"><a href="a03903.html#a0c1e5657ab29e57116a57c7b22f4c630">GENERIC_DRIVER_GPIO::pin_init</a></div><div class="ttdeci">void(* pin_init)(pinID_t aPinId, gpio_direction_t dir, void *apPinConfig, gpio_isr_handler_t aIsrHandler, void *apUserData)</div><div class="ttdef"><b>Definition:</b> <a href="a00482_source.html#l00041">Driver_GPIO.h:41</a></div></div>
128<div class="ttc" id="a04841_html_a2c39f234913855fad752a8f96f245b27"><div class="ttname"><a href="a04841.html#a2c39f234913855fad752a8f96f245b27">Driver_GPIO_KSDK</a></div><div class="ttdeci">GENERIC_DRIVER_GPIO Driver_GPIO_KSDK</div><div class="ttdef"><b>Definition:</b> <a href="a04841_source.html#l00177">gpio_driver.c:177</a></div></div>
129<div class="ttc" id="a00062_html_a8025f55dc676bfd81d183b3fd98fa9f8"><div class="ttname"><a href="a00062.html#a8025f55dc676bfd81d183b3fd98fa9f8">FXLS896x_SDCD_CONFIG1_Z_OT_EN_EN</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG1_Z_OT_EN_EN</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01556">fxls896x.h:1556</a></div></div>
130<div class="ttc" id="a03811_html"><div class="ttname"><a href="a03811.html">registerreadlist_t</a></div><div class="ttdoc">This structure defines the Read command List. </div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00078">sensor_drv.h:78</a></div></div>
131<div class="ttc" id="a00533_html"><div class="ttname"><a href="a00533.html">systick_utils.h</a></div><div class="ttdoc">ARM Systick Utilities. </div></div>
132<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1af6642821c882c3d0d3c5bf8a2ba77539"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1af6642821c882c3d0d3c5bf8a2ba77539">FXLS896x_SDCD_UTHS_MSB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00079">fxls896x.h:79</a></div></div>
133<div class="ttc" id="a00575_html_a02a28175122c7e060eeb1411dc5ac171"><div class="ttname"><a href="a00575.html#a02a28175122c7e060eeb1411dc5ac171">GREEN_LED</a></div><div class="ttdeci">gpioHandleKSDK_t GREEN_LED</div><div class="ttdef"><b>Definition:</b> <a href="a00575_source.html#l00188">frdm_k64f.c:188</a></div></div>
134<div class="ttc" id="a00053_html_a223547efc151de478d3fc1aaa84e4370"><div class="ttname"><a href="a00053.html#a223547efc151de478d3fc1aaa84e4370">FXLS8974_WHOAMI_VALUE</a></div><div class="ttdeci">#define FXLS8974_WHOAMI_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="a00053_source.html#l00090">fxls8962.h:90</a></div></div>
135<div class="ttc" id="a00062_html_aef9d2e92781983e278303c4de7e75600"><div class="ttname"><a href="a00062.html#aef9d2e92781983e278303c4de7e75600">FXLS8968_WHOAMI_VALUE</a></div><div class="ttdeci">#define FXLS8968_WHOAMI_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00089">fxls896x.h:89</a></div></div>
136<div class="ttc" id="a00062_html_a965f6e391abbfdac81316e85e7f1b284"><div class="ttname"><a href="a00062.html#a965f6e391abbfdac81316e85e7f1b284">FXLS896x_SDCD_CONFIG1_OT_ELE_DIS</a></div><div class="ttdeci">#define FXLS896x_SDCD_CONFIG1_OT_ELE_DIS</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l01538">fxls896x.h:1538</a></div></div>
137<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a5758234766c3349caeac3ff6232529fd"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a5758234766c3349caeac3ff6232529fd">FXLS896x_SDCD_LTHS_LSB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00076">fxls896x.h:76</a></div></div>
138<div class="ttc" id="a00053_html_a827f1c265a5d5c1bb4b037f9c5d0b8ca"><div class="ttname"><a href="a00053.html#a827f1c265a5d5c1bb4b037f9c5d0b8ca">FXLS8962_WHOAMI_VALUE</a></div><div class="ttdeci">#define FXLS8962_WHOAMI_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="a00053_source.html#l00087">fxls8962.h:87</a></div></div>
139<div class="ttc" id="a04343_html_ab0c7969a7fffaabe78d43db2b12ad840"><div class="ttname"><a href="a04343.html#ab0c7969a7fffaabe78d43db2b12ad840">I2C_S_DEVICE_INDEX</a></div><div class="ttdeci">#define I2C_S_DEVICE_INDEX</div><div class="ttdef"><b>Definition:</b> <a href="a04343_source.html#l00035">issdk_hal.h:35</a></div></div>
140<div class="ttc" id="a00482_html_a631d09668ec8f40a64ff69613cdbbba5a869f710c2bafc06d7ef192861b8358ab"><div class="ttname"><a href="a00482.html#a631d09668ec8f40a64ff69613cdbbba5a869f710c2bafc06d7ef192861b8358ab">GPIO_DIRECTION_OUT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00482_source.html#l00024">Driver_GPIO.h:24</a></div></div>
141<div class="ttc" id="a00959_html_ga2c9fe54b6b84723fbaa590a6f4576966"><div class="ttname"><a href="a00959.html#ga2c9fe54b6b84723fbaa590a6f4576966">BOARD_InitPins</a></div><div class="ttdeci">void BOARD_InitPins(void)</div><div class="ttdoc">Configures pin routing and optionally pin electrical features. </div><div class="ttdef"><b>Definition:</b> <a href="a04541_source.html#l00047">pin_mux.c:47</a></div></div>
142<div class="ttc" id="a00062_html_ac78215de6488539f9a6741883739f4c1"><div class="ttname"><a href="a00062.html#ac78215de6488539f9a6741883739f4c1">FXLS896x_SENS_CONFIG3_WAKE_ODR_MASK</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG3_WAKE_ODR_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00551">fxls896x.h:551</a></div></div>
143<div class="ttc" id="a00053_html_a0e2813efc663c73cf197440dc777449e"><div class="ttname"><a href="a00053.html#a0e2813efc663c73cf197440dc777449e">FXLS8964_WHOAMI_VALUE</a></div><div class="ttdeci">#define FXLS8964_WHOAMI_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="a00053_source.html#l00088">fxls8962.h:88</a></div></div>
144<div class="ttc" id="a00062_html_a04589a02aad42e33c5747d1549d4e264"><div class="ttname"><a href="a00062.html#a04589a02aad42e33c5747d1549d4e264">FXLS896x_INT_EN_WAKE_OUT_EN_EN</a></div><div class="ttdeci">#define FXLS896x_INT_EN_WAKE_OUT_EN_EN</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00876">fxls896x.h:876</a></div></div>
145</div><!-- fragment --></div><!-- contents -->
146
147<hr class="footer"/><address class="footer"><small>
148&copy; Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause
149</small></address>
150</body>
151</html>
152