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_freemaster_demo.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  <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_freemaster_demo.c</div> </div> 49</div><!--header--> 50<div class="contents"> 51<a href="a00359.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright 2021 NXP</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">/**</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * @file fxls896xaf_freemaster_demo.c</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * @brief The fxls896xaf_freemaster_demo.c file implements FreeMASTER demo using the ISSDK</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * FXLS896xAF sensor driver example demonstration with interrupt mode.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> */</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// SDK Includes</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "pin_mux.h"</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "clock_config.h"</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "board.h"</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "fsl_debug_console.h"</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "math.h"</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#ifndef CPU_LPC55S16JBD100</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "fsl_uart.h"</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "fsl_usart.h"</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "fsl_common.h"</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "freemaster.h"</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "freemaster_serial_uart.h"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">// CMSIS Includes</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "Driver_I2C.h"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// ISSDK Includes</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include "issdk_hal.h"</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include "gpio_driver.h"</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#include "<a class="code" href="a00068.html">fxls896x_drv.h</a>"</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#include "<a class="code" href="a00533.html">systick_utils.h</a>"</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">// Macros</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="a00359.html#a90223f60cd8615444070702909389cb5"> 46</a></span> <span class="preprocessor">#define FXLS896x_NUM_REGISTERS (FXLS896x_SELF_TEST_CONFIG2 + 1)</span></div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="a00359.html#ae08826b534e6815fb0b4066c6ffa79b6"> 47</a></span> <span class="preprocessor">#define FF_A_FFMT_THS (0x08) </span><span class="comment">/* FreeFall Threshold Value. */</span><span class="preprocessor"></span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="a00359.html#a1c611e397ac2c8e1772b5c60e7659bd1"> 48</a></span> <span class="preprocessor">#define A_FFMT_COUNT (0x18) </span><span class="comment">/* Freefall/motion debounce count value. */</span><span class="preprocessor"></span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="a00359.html#a058094e0bab74ee0f65e6a81f9ba95c9"> 49</a></span> <span class="preprocessor">#define PL_COUNT (0x15) </span><span class="comment">/* Pulse debounce count value. */</span><span class="preprocessor"></span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="a00359.html#ac1de58f19be26d0d484cf2fa338c9eb5"> 50</a></span> <span class="preprocessor">#define ASLP_COUNTER (0x07) </span><span class="comment">/* Auto Sleep after ~5s. */</span><span class="preprocessor"></span></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="a00359.html#a655f856881e2748838614d8ebe75b9b3"> 51</a></span> <span class="preprocessor">#define ACCEL_2G_SENS (0.000976) </span><span class="comment">/* Sensitivity factor for 2G FS */</span><span class="preprocessor"></span></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="a00359.html#a08e287e51783ab8f90158352e6fc3af8"> 52</a></span> <span class="preprocessor">#define ACCEL_4G_SENS (0.001953) </span><span class="comment">/* Sensitivity factor for 4G FS */</span><span class="preprocessor"></span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="a00359.html#a05b1ee83bf8f0e4f3d8ddcd5b6bdcf89"> 53</a></span> <span class="preprocessor">#define ACCEL_8G_SENS (0.003906) </span><span class="comment">/* Sensitivity factor for 8G FS */</span><span class="preprocessor"></span></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="a00359.html#a496885152e5f45fd5bee40d8e928f71e"> 54</a></span> <span class="preprocessor">#define ACCEL_16G_SENS (0.007813) </span><span class="comment">/* Sensitivity factor for 16G FS */</span><span class="preprocessor"></span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="a00359.html#a0240ac851181b84ac374872dc5434ee4"> 55</a></span> <span class="preprocessor">#define N (100U) </span><span class="comment">/* Number of samples used to measure offset/noise */</span><span class="preprocessor"></span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="a00359.html#a6c7104c3d05de6cc4bdd733d187d2c6b"> 56</a></span> <span class="preprocessor">#define RAW_ACCEL_DATA_SIZE (6U) </span><span class="comment">/* Accel Data Size */</span><span class="preprocessor"></span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="a00359.html#a1ea66d33b5f8e9fda77f8dd865ef0408"> 57</a></span> <span class="preprocessor">#define MAX8BITSTORAGE (255U)</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="a00359.html#ada35b1a82828143d21a8a1faec25ec45"> 58</a></span> <span class="preprocessor">#define FXLS896x_DATA_SIZE 6</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="comment">// Constants</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment">//-----------------------------------------------------------------------</span><span class="comment"></span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment">/*! @brief Defines the register write list to configure FXLS896x in Interrupt mode. */</span></div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="a00359.html#afd6c5d92ad71c39bdcba4ff33ddebf38"> 63</a></span> <span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> <a class="code" href="a00359.html#afd6c5d92ad71c39bdcba4ff33ddebf38">cFxls896xConfigNormal</a>[] = {<span class="comment"></span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"> /*! Set Full-scale range as 4G. */</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {<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>},<span class="comment"></span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment"> /*! Clear SENS_CONFIG2 */</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a8665c64ade737b2dd21fdf54d5593718">FXLS896x_SENS_CONFIG2</a>, 0x00, 0x00},<span class="comment"></span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment"> /*! Disable Self-Test. */</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a43563e521aa1a1cf7a6995932b6d9d06">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_DISABLED</a>, <a class="code" href="a00062.html#aced51c74b8233108164a30a1ba7fe3b7">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</a>},<span class="comment"></span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> /*! Set Wake Mode ODR Rate as 12.5Hz. */</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1abf1ecb7df2b170c64227ffe80c14ef2b">FXLS896x_SENS_CONFIG3</a>, <a class="code" href="a00062.html#a21503192b42209cdfa1f6af8320aad45">FXLS896x_SENS_CONFIG3_WAKE_ODR_12_5HZ</a>, <a class="code" href="a00062.html#ac78215de6488539f9a6741883739f4c1">FXLS896x_SENS_CONFIG3_WAKE_ODR_MASK</a>},<span class="comment"></span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"> /*! Enable Interrupts for Data Ready Events. */</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a01fefb1f0918f5fe07ee5ce496bbe64f">FXLS896x_INT_EN</a>, <a class="code" href="a00062.html#a33bdb75664bf9eb59353b77ebed8b41a">FXLS896x_INT_EN_DRDY_EN_EN</a>, <a class="code" href="a00062.html#ae301ed84ab3b305fadb39dc1d87d0a22">FXLS896x_INT_EN_DRDY_EN_MASK</a>},<span class="comment"></span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment"> /*! Enable Temperature sensor. */</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a8665c64ade737b2dd21fdf54d5593718">FXLS896x_SENS_CONFIG2</a>,<a class="code" href="a00062.html#a8b138f818acb28f323be8cf04addd4d3">FXLS896x_SENS_CONFIG2_ANIC_TEMP_EN</a>,<a class="code" href="a00062.html#a601e61d4c9c1c11b028d8419f7a00b54">FXLS896x_SENS_CONFIG2_ANIC_TEMP_MASK</a>},<span class="comment"></span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"> /*! Set Self-Test ODR to 100 Hz. */</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  {0x38,0x05,0x00},</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  {0x2F,0x38,0x00},</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  {0x30,0xD8,0x00},</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  {0x33,0xC0,0x00},</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {0x34,0xFF,0x00},</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  {0x35,0x40,0x00},</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"></span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment">/*! @brief Register settings for Self-Test in X Axis (Positive polarity). */</span></div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="a00359.html#aa6f2c7026ae9f8266895040f39ff965b"> 86</a></span> <span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> <a class="code" href="a00359.html#aa6f2c7026ae9f8266895040f39ff965b">cFxls896xSTXP</a>[] = {</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">/* Set Self Test Axis. */</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a960f4072b72d8e6be90871a2669c8b69">FXLS896x_SENS_CONFIG1_FSR_16G</a>, <a class="code" href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a>},</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#ad8a0b14a4cb5d475a714eb0f7937e86d">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_X</a>, <a class="code" href="a00062.html#aced51c74b8233108164a30a1ba7fe3b7">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</a>},</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#aa02ac2e9055ae01605c3dfa9c732c0ab">FXLS896x_SENS_CONFIG1_ST_POL_POSITIVE</a>, <a class="code" href="a00062.html#ab549af61dce6f7688114586cfdfba732">FXLS896x_SENS_CONFIG1_ST_POL_MASK</a>},</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"></span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment">/*! @brief Register settings for Self-Test in X Axis (Negative polarity). */</span></div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="a00359.html#a3e75d7cfb5c37c636f1408b8c88233e4"> 94</a></span> <span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> <a class="code" href="a00359.html#a3e75d7cfb5c37c636f1408b8c88233e4">cFxls896xSTXN</a>[] = {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="comment">/* Set Self Test Axis. */</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a960f4072b72d8e6be90871a2669c8b69">FXLS896x_SENS_CONFIG1_FSR_16G</a>, <a class="code" href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a>},</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#ad8a0b14a4cb5d475a714eb0f7937e86d">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_X</a>, <a class="code" href="a00062.html#aced51c74b8233108164a30a1ba7fe3b7">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</a>},</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a0680aea1d90ca4389c6b9f49382db0ea">FXLS896x_SENS_CONFIG1_ST_POL_NEGATIVE</a>, <a class="code" href="a00062.html#ab549af61dce6f7688114586cfdfba732">FXLS896x_SENS_CONFIG1_ST_POL_MASK</a>},</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"></span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment">/*! @brief Register settings for Self-Test in Y Axis (Positive polarity). */</span></div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="a00359.html#aa518defbb3f5cd79418b9bc504e74eae"> 102</a></span> <span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> <a class="code" href="a00359.html#aa518defbb3f5cd79418b9bc504e74eae">cFxls896xSTYP</a>[] = {</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="comment">/* Set Self Test Axis. */</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a960f4072b72d8e6be90871a2669c8b69">FXLS896x_SENS_CONFIG1_FSR_16G</a>, <a class="code" href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a>},</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a1aed3b2128901e3e473acb7772c93ac8">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_Y</a>, <a class="code" href="a00062.html#aced51c74b8233108164a30a1ba7fe3b7">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</a>},</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#aa02ac2e9055ae01605c3dfa9c732c0ab">FXLS896x_SENS_CONFIG1_ST_POL_POSITIVE</a>,<a class="code" href="a00062.html#ab549af61dce6f7688114586cfdfba732">FXLS896x_SENS_CONFIG1_ST_POL_MASK</a>},</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"></span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment">/*! @brief Register settings for Self-Test in Y Axis (Negative polarity). */</span></div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="a00359.html#a58a93b162ab858a9883f8736178bb6f6"> 110</a></span> <span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> <a class="code" href="a00359.html#a58a93b162ab858a9883f8736178bb6f6">cFxls896xSTYN</a>[] = {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="comment">/* Set Self Test Axis. */</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a960f4072b72d8e6be90871a2669c8b69">FXLS896x_SENS_CONFIG1_FSR_16G</a>, <a class="code" href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a>},</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a1aed3b2128901e3e473acb7772c93ac8">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_Y</a>, <a class="code" href="a00062.html#aced51c74b8233108164a30a1ba7fe3b7">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</a>},</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a0680aea1d90ca4389c6b9f49382db0ea">FXLS896x_SENS_CONFIG1_ST_POL_NEGATIVE</a>, <a class="code" href="a00062.html#ab549af61dce6f7688114586cfdfba732">FXLS896x_SENS_CONFIG1_ST_POL_MASK</a>},</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"></span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment">/*! @brief Register settings for Self-Test in Z Axis (Positive polarity). */</span></div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="a00359.html#a8df6e68b9ba4b99ccc0b8367ef8af1fb"> 118</a></span> <span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> <a class="code" href="a00359.html#a8df6e68b9ba4b99ccc0b8367ef8af1fb">cFxls896xSTZP</a>[] = {</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="comment">/* Set Self Test Axis. */</span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a960f4072b72d8e6be90871a2669c8b69">FXLS896x_SENS_CONFIG1_FSR_16G</a>, <a class="code" href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a>},</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a685a40a684b7d48d84ed706fdda0c883">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_Z</a>, <a class="code" href="a00062.html#aced51c74b8233108164a30a1ba7fe3b7">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</a>},</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#aa02ac2e9055ae01605c3dfa9c732c0ab">FXLS896x_SENS_CONFIG1_ST_POL_POSITIVE</a>, <a class="code" href="a00062.html#ab549af61dce6f7688114586cfdfba732">FXLS896x_SENS_CONFIG1_ST_POL_MASK</a>},</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"></span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment">/*! @brief Register settings for Self-Test in Z Axis (Negative polarity). */</span></div><div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="a00359.html#a2e768d76639b21d158bec335dbf5a992"> 126</a></span> <span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> <a class="code" href="a00359.html#a2e768d76639b21d158bec335dbf5a992">cFxls896xSTZN</a>[] = {</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="comment">/* Set Self Test Axis. */</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a960f4072b72d8e6be90871a2669c8b69">FXLS896x_SENS_CONFIG1_FSR_16G</a>, <a class="code" href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a>},</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a685a40a684b7d48d84ed706fdda0c883">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_Z</a>, <a class="code" href="a00062.html#aced51c74b8233108164a30a1ba7fe3b7">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</a>},</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  {<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, <a class="code" href="a00062.html#a0680aea1d90ca4389c6b9f49382db0ea">FXLS896x_SENS_CONFIG1_ST_POL_NEGATIVE</a>, <a class="code" href="a00062.html#ab549af61dce6f7688114586cfdfba732">FXLS896x_SENS_CONFIG1_ST_POL_MASK</a>},</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"></span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment">/*! @brief Address of Raw Accel Data in Normal Mode. */</span></div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="a00359.html#a6232a93da43a507858e0af5e3d1f01f7"> 134</a></span> <span class="keyword">const</span> <a class="code" href="a03811.html">registerreadlist_t</a> <a class="code" href="a00359.html#a6232a93da43a507858e0af5e3d1f01f7">cFxls896xOutputNormal</a>[] = {{.<a class="code" href="a03811.html#a5fe82375de174c0511ca301fec78e441">readFrom</a> = <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1aaa1c118459c7da84fdb5a43c45585e5d">FXLS896x_OUT_X_LSB</a>, .numBytes = <a class="code" href="a00359.html#ada35b1a82828143d21a8a1faec25ec45">FXLS896x_DATA_SIZE</a>},</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <a class="code" href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a>};</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  </div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="a00359.html#a157c430197a92d368847129ccf7f526e"> 137</a></span> <span class="keyword">const</span> <a class="code" href="a03811.html">registerreadlist_t</a> <a class="code" href="a00359.html#a157c430197a92d368847129ccf7f526e">cFXLS896x_whoami</a>[] = {</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  {.<a class="code" href="a03811.html#a5fe82375de174c0511ca301fec78e441">readFrom</a> = <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a68baed6c90c4e8e9649cac781309c090">FXLS896x_WHO_AM_I</a>, .numBytes = 1}, <a class="code" href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a>};</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment"></span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="comment">/*! @brief Prepare the register read for INT Status Register. */</span></div><div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="a00359.html#a3250563719acc5aa91f797aeca5b2926"> 141</a></span> <span class="keyword">const</span> <a class="code" href="a03811.html">registerreadlist_t</a> <a class="code" href="a00359.html#a3250563719acc5aa91f797aeca5b2926">cFXLS896x_int_src</a>[] = {</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  {.<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="l00143"></a><span class="lineno"> 143</span> <span class="comment"></span></div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment">/*! @brief Prepare the register read for FullScale range Register. */</span></div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="a00359.html#a18423c8efe9d6bc4b29f654298765930"> 145</a></span> <span class="keyword">const</span> <a class="code" href="a03811.html">registerreadlist_t</a> <a class="code" href="a00359.html#a18423c8efe9d6bc4b29f654298765930">cFXLS896x_fs_src</a>[] = {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  {.<a class="code" href="a03811.html#a5fe82375de174c0511ca301fec78e441">readFrom</a> = <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>, .numBytes = 1}, <a class="code" href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a>};</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="comment"></span></div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="comment">/*! @brief FXLS896x register list to read all registers */</span></div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="a00359.html#af2e71fcdd968c3370772341a10410fa8"> 149</a></span> <span class="keyword">const</span> <a class="code" href="a03811.html">registerreadlist_t</a> <a class="code" href="a00359.html#af2e71fcdd968c3370772341a10410fa8">FXLS896x_ALL_REG_READ</a>[] = {{.<a class="code" href="a03811.html#a5fe82375de174c0511ca301fec78e441">readFrom</a> = <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a2735a5a46423052c12cadba4c867a85c">FXLS896x_INT_STATUS</a>, .numBytes = <a class="code" href="a00359.html#a90223f60cd8615444070702909389cb5">FXLS896x_NUM_REGISTERS</a>},</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <a class="code" href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a>};</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> </div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment">// Global Variables</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment">//-----------------------------------------------------------------------</span><span class="comment"></span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment">/*! @brief This structure defines the fxls896x all registers metadata.*/</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span> {</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  uint8_t offset;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  uint8_t value;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  uint8_t trigger;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  uint8_t read_offset;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  uint8_t read_value;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  uint8_t read_trigger;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  uint8_t readall_value[<a class="code" href="a00359.html#a90223f60cd8615444070702909389cb5">FXLS896x_NUM_REGISTERS</a>];</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  uint8_t readall_size;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  uint8_t readall_trigger;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  uint8_t toggle;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  uint8_t trigger_accel_offnoise;</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  uint8_t trigger_selftest;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  uint8_t fs_value;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  uint8_t mods_value;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  uint8_t odr_value;</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  uint8_t reg_addr[<a class="code" href="a00359.html#a90223f60cd8615444070702909389cb5">FXLS896x_NUM_REGISTERS</a>];</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  uint8_t dataready_cntr;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordtype">float</span> accel[3];</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="a03839.html#a754f61663feb9d0ffc46376fca33ca51"> 176</a></span>  int16_t accelraw[3];</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  uint8_t sdcd;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  int8_t temp;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  int16_t <a class="code" href="a00359.html#a2f69cd2dc81c3a7769cc8280ce11e389">selftest</a>[3];</div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="a03839.html#ab20b0c7772544cf5d318507f34231fbe"> 180</a></span>  uint32_t <a class="code" href="a03839.html#ab20b0c7772544cf5d318507f34231fbe">timestamp</a>;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span> } <a class="code" href="a03839.html">fxls896x_allregs_t</a>;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="comment">//-----------------------------------------------------------------------</span><span class="comment"></span></div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="comment">/*! @brief This structure defines the fxls896x offset and noise calculation parameters. */</span></div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> {</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordtype">float</span> offx;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keywordtype">float</span> offy;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordtype">float</span> offz;</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordtype">float</span> rmsx;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordtype">float</span> rmsy;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordtype">float</span> rmsz;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  uint8_t complete_accel_offnoise;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> } <a class="code" href="a03843.html">fxls896x_offset_noise_t</a>;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="comment"></span></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span> <span class="comment">/*! @brief This structure defines variables to compute self-test output change (STOC) and self-test offset (STOF). */</span></div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span> <span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> {</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  int16_t x_stoc;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  int16_t y_stoc;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  int16_t z_stoc;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  int16_t x_stof;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  int16_t y_stof;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  int16_t z_stof;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  uint8_t complete_selftest;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span> } <a class="code" href="a03847.html">fxls896x_selftest_t</a>;</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> <span class="comment"></span></div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> <span class="comment">/*! @brief This structure defines the fxls896x raw data buffer.*/</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> <span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span> {</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  int16_t xdata; <span class="comment">/*!< The x accel data */</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  int16_t ydata; <span class="comment">/*!< The y accel data */</span></div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  int16_t zdata; <span class="comment">/*!< The z accel data */</span></div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span> } <a class="code" href="a03851.html">sensor_data</a>;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> </div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> </div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span> <span class="keyword">typedef</span> <span class="keyword">union </span><a class="code" href="a03855.html">rawdata</a></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span> {</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  uint8_t <a class="code" href="a03855.html#ad45402f947ba7d432250ff3a8d5feebc">byte_data</a>[<span class="keyword">sizeof</span>(<a class="code" href="a03851.html">sensor_data</a>)];</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="a03851.html">sensor_data</a> <a class="code" href="a03855.html#aafebae50b85a100d669b2a8d3ec7c0fe">dat</a>;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span> }<a class="code" href="a00359.html#ab40827f3b6e4ac3980920b66820b1718">RAW_DATA</a>;</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="comment"></span></div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> <span class="comment">/*! @brief This structure defines the fxls896x host operation type.*/</span></div><div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2"> 223</a></span> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="a00338.html#abe10602a509294f3dd2e11a445fdefa2">fxls896x_operation_type</a></div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span> {</div><div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a79466919081835049eceb8e501dcd479"> 225</a></span>  <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a79466919081835049eceb8e501dcd479">FXLS896x_REG_WRITE</a> = 1U,</div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a8ea6cd4b2126d70e1faf58be1e96cd21"> 226</a></span>  <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a8ea6cd4b2126d70e1faf58be1e96cd21">FXLS896x_REG_READ</a> = 2U,</div><div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a3307d286251e5956eb38bcb0cf935426"> 227</a></span>  <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a3307d286251e5956eb38bcb0cf935426">FXLS896x_ALLREG_READ</a> = 3U,</div><div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a4103fd3da4e8587e836c00f7d68976d2"> 228</a></span>  <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a4103fd3da4e8587e836c00f7d68976d2">FXLS896x_ACCEL_CONFIG_END</a></div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span> </div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> } <a class="code" href="a00359.html#a55b6d038f2e5dd77a328811e201ddfd3">fxls896x_operation_type_t</a>;</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span> </div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span> <span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> <span class="comment"> * Globals</span></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="comment"> ******************************************************************************/</span></div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span> </div><div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="a00359.html#ac12154473f3339c69dbdfda649d6fe3a"> 236</a></span> <a class="code" href="a02047.html">fxls896x_acceldata_t</a> <a class="code" href="a00359.html#ac12154473f3339c69dbdfda649d6fe3a">rawData</a>;</div><div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="a00359.html#a5d2ce68c8ff5052aa713270c33e6d3f2"> 237</a></span> <a class="code" href="a03839.html">fxls896x_allregs_t</a> <a class="code" href="a00359.html#a5d2ce68c8ff5052aa713270c33e6d3f2">registers</a>;</div><div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="a00359.html#aa86223122baa38aa63a2fbfba105e7af"> 238</a></span> <a class="code" href="a03843.html">fxls896x_offset_noise_t</a> <a class="code" href="a00359.html#aa86223122baa38aa63a2fbfba105e7af">offnoise_data</a>;</div><div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="a00359.html#a2f69cd2dc81c3a7769cc8280ce11e389"> 239</a></span> <a class="code" href="a03847.html">fxls896x_selftest_t</a> <a class="code" href="a00359.html#a2f69cd2dc81c3a7769cc8280ce11e389">selftest</a>;</div><div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="a00359.html#a6aa7a1a86aa031539466bf44d884ef39"> 240</a></span> uint8_t <a class="code" href="a00359.html#a6aa7a1a86aa031539466bf44d884ef39">prev_toggle</a> = 1;</div><div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="a00359.html#abed21723f86be731e66be8868a8732b4"> 241</a></span> <span class="keyword">volatile</span> <span class="keywordtype">bool</span> <a class="code" href="a00359.html#abed21723f86be731e66be8868a8732b4">bFxls896xIntFlag</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> </div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="keyword">static</span> FMSTR_U8 recBuffer[1024*10];</div><div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="a00359.html#ad162871b835f5bcb36700a35673419f0"> 244</a></span> FMSTR_REC_BUFF <a class="code" href="a00359.html#ad162871b835f5bcb36700a35673419f0">recBuffCfg</a>;</div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="a00359.html#a02a7f812c6f2feab3aa25c1a34e3322b"> 245</a></span> FMSTR_REC_VAR <a class="code" href="a00359.html#a02a7f812c6f2feab3aa25c1a34e3322b">recVar</a>;</div><div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="a00359.html#a04985d175bb78cb94c9b193af34402fd"> 246</a></span> FMSTR_REC_CFG <a class="code" href="a00359.html#a04985d175bb78cb94c9b193af34402fd">recCfg</a>;</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span> </div><div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c"> 248</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>, <a class="code" href="a00359.html#aafa5fcc299fb9a0db111332f5111b7df">gSystick</a>;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> pipe3_rxb[512];</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> pipe3_txb[0x1000];</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> </div><div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="a00359.html#aae90d1d0f77fce4ac9dc55e071f04b97"> 252</a></span> uint8_t <a class="code" href="a00359.html#aae90d1d0f77fce4ac9dc55e071f04b97">axis</a>=0;</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span> <span class="comment">/* variables to store self-test values (Positive(P) + / Negative(N) -) */</span></div><div class="line"><a name="l00254"></a><span class="lineno"><a class="line" href="a00359.html#a9aad2156b5de8c3f4e79f3bf5828dfe5"> 254</a></span> int16_t <a class="code" href="a00359.html#a25d26f00322a223c03a97e979526334c">XSTP</a>[2]={0,0},<a class="code" href="a00359.html#a5dc6c4717d01d664bf34e640ac8baa84">YSTP</a>[2]={0,0},<a class="code" href="a00359.html#a9aad2156b5de8c3f4e79f3bf5828dfe5">ZSTP</a>[2]={0,0},<a class="code" href="a00359.html#aa85abdbcaf058baebd134eba2a8a28de">XSTN</a>[2]={0,0},<a class="code" href="a00359.html#afe41430ebe7135f3297c0c6cbe9b122c">YSTN</a>[2]={0,0},<a class="code" href="a00359.html#a3a4bfaecc864019458f930517d2f64d9">ZSTN</a>[2]={0,0};</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span> </div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span> </div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span> <span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> <span class="comment"> * Local functions</span></div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span> <span class="comment"> ******************************************************************************/</span><span class="comment"></span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span> <span class="comment"> /*! @brief Function to initialize target communication to FreeMASTER host.</span></div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="comment"> * @details This function initializes FreeMASTER UART communication.</span></div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <span class="comment"> * @param[in] void.</span></div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span> <span class="comment"> * @return void.</span></div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span> <span class="comment"> */</span></div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span> <span class="keyword">static</span> <span class="keywordtype">void</span> init_freemaster_uart(<span class="keywordtype">void</span>);<span class="comment"></span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <span class="comment">/*! @brief ISR for FXLS896x interrupt source event.</span></div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="comment"> * @details This function implements ISR for FXLS896x INT source.</span></div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="comment"> * @param[in] void *.</span></div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span> <span class="comment"> * @return void.</span></div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> <span class="comment"> */</span></div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#ab4c148858207e08ce9fc7b1f7cdf7a5e">fxls896x_isr_callback</a>(<span class="keywordtype">void</span> *pUserData);<span class="comment"></span></div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span> <span class="comment">/*! @brief Function to apply FXLS896x register write operation.</span></div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span> <span class="comment"> * @details This function apply FXLS896x register write based on write trigger from host.</span></div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span> <span class="comment"> * @param[in] fxls896x_i2c_sensorhandle_t fxls896xDriver, FXLS896x sensor I2C handle.</span></div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="comment"> * @param[in] uint8_t offset, the address of the register to start writing from.</span></div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span> <span class="comment"> * @param[in] uint8_t value, value to write on register offset.</span></div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> <span class="comment"> * @return returns the status of the operation.</span></div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span> <span class="comment"> */</span></div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a7b85fd9df22936b827367b7c812ed9c5">apply_register_write</a>(<a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> <a class="code" href="a00368.html#ab62e4262c23c0ce0850b32ffa1253d44">fxls896xDriver</a>, uint8_t offset, uint8_t value);<span class="comment"></span></div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span> <span class="comment">/*! @brief Function to apply FXLS896x register read operation.</span></div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span> <span class="comment"> * @details This function apply FXLS896x register read based on read trigger from host.</span></div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span> <span class="comment"> * @param[in] fxls896x_i2c_sensorhandle_t fxls896xDriver, FXLS896x sensor I2C handle.</span></div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> <span class="comment"> * @param[in] uint8_t offset, the address of the register to read from.</span></div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span> <span class="comment"> * @param[in/out] uint8_t *value, pointer to output buffer.</span></div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span> <span class="comment"> * @return returns the status of the operation.</span></div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span> <span class="comment"> */</span></div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#acdf865d90b909f831131712d39e6f5e6">apply_register_read</a>(<a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> fxls896xDriver, uint8_t offset, uint8_t *value);<span class="comment"></span></div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span> <span class="comment">/*! @brief Function to apply FXLS896x register read-all operation.</span></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span> <span class="comment"> * @details This function apply FXLS896x all-registers read based on read-all trigger from host.</span></div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span> <span class="comment"> * @param[in] fxls896x_i2c_sensorhandle_t fxls896xDriver, FXLS896x sensor I2C handle.</span></div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span> <span class="comment"> * @return returns the status of the operation.</span></div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span> <span class="comment"> */</span></div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a44ad95193e45da22e2bd3b1d0fdb1b89">apply_register_readall</a>(<a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> fxls896xDriver);<span class="comment"></span></div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span> <span class="comment">/*! @brief Function to update dropdown selection.</span></div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span> <span class="comment"> * @details This function updates the dropdown selection values in real-time based on read/write/read-all triggers.</span></div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span> <span class="comment"> * @param[in/out] fxls896x_allregs_t *registers, pointer to FXLS896x all-registers metadata.</span></div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span> <span class="comment"> * @param[in] uint8_t caller, called from which operation type.</span></div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span> <span class="comment"> * @return returns the status of the operation.</span></div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span> <span class="comment"> */</span></div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a919f76313b698c6146c1b11480e41c88">update_dropdown_selection</a>(<a class="code" href="a03839.html">fxls896x_allregs_t</a> *registers, uint8_t caller);<span class="comment"></span></div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="comment">/*! @brief Function to initialize offset noise measurement.</span></div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span> <span class="comment"> * @details This function initializes offset noise measurement metadata.</span></div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span> <span class="comment"> * @param[in/out] fxls896x_offset_noise_t *offnoiseptr, pointer to FXLS896x offset noise metadata.</span></div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span> <span class="comment"> * @return void.</span></div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span> <span class="comment"> */</span></div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#a6724fe657aabaee156551628cd4f2db6">offset_noise_init</a>(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a> *offnoiseptr);<span class="comment"></span></div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span> <span class="comment">/*! @brief Function to measure accelerometer offset noise.</span></div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span> <span class="comment"> * @details This function measures accelerometer offset noise.</span></div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span> <span class="comment"> * @param[in] fxls896x_acceldata_t *rawData, pointer to FXLS896x rawdata metadata.</span></div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span> <span class="comment"> * @param[in/out] fxls896x_offset_noise_t *offnoiseptr, pointer to FXLS896x offset noise metadata.</span></div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span> <span class="comment"> * @param[in] float sens, FXLS896x sensitivity based on FS configuration.</span></div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span> <span class="comment"> * @return void.</span></div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span> <span class="comment"> */</span></div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#a9cd430fc151a045ed2b98f7b4dc71d44">accel_off_noise</a>(<a class="code" href="a02047.html">fxls896x_acceldata_t</a>* rawData, <a class="code" href="a03843.html">fxls896x_offset_noise_t</a> *offnoiseptr, <span class="keywordtype">float</span> sens);<span class="comment"></span></div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span> <span class="comment">/*! @brief Function to initialize FXLS896x self test metadata.</span></div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span> <span class="comment"> * @details This function initializes FXLS896x self test metadata.</span></div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span> <span class="comment"> * @param[in/out] fxls896x_selftest_t *selftest, pointer to FXLS896x selftest metadata.</span></div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span> <span class="comment"> * @return void.</span></div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span> <span class="comment"> */</span></div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#a33e1e7f2a4d3b74a7bf5ca94132f6743">selftest_init</a>(<a class="code" href="a03847.html">fxls896x_selftest_t</a> *selftest);<span class="comment"></span></div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span> <span class="comment">/*! @brief Function to perform FXLS896x self test.</span></div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span> <span class="comment"> * @details This function performs FXLS896x self test.</span></div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span> <span class="comment"> * @param[in] fxls896x_i2c_sensorhandle_t fxls896xDriver, FXLS896x sensor I2C handle.</span></div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span> <span class="comment"> * @param[in/out] fxls896x_selftest_t *selftest, pointer to FXLS896x selftest metadata.</span></div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span> <span class="comment"> * @return returns the status of the operation..</span></div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span> <span class="comment"> */</span></div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#ab7a328885ef232a1bba728b4289b8802">perform_selftest</a>(<a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> fxls896xDriver, <a class="code" href="a03847.html">fxls896x_selftest_t</a> *selftest);</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#ac0ede279731ef03a63e646ed3cc7ae29">FRM_Recorder_Init</a>();</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span> </div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span> <span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span> <span class="comment"> * Code</span></div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span> <span class="comment"> ******************************************************************************/</span></div><div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="a00359.html#ab4c148858207e08ce9fc7b1f7cdf7a5e"> 333</a></span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#ab4c148858207e08ce9fc7b1f7cdf7a5e">fxls896x_isr_callback</a>(<span class="keywordtype">void</span> *pUserData)</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span> { <span class="comment">/*! @brief Set flag to indicate Sensor has signalled data ready. */</span></div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <a class="code" href="a00359.html#abed21723f86be731e66be8868a8732b4">bFxls896xIntFlag</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span> }</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span> </div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span> <span class="comment">/* Create TSA table and add output variables. */</span><span class="comment"></span></div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span> <span class="comment">/*!</span></div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> <span class="comment"> * @brief Target Side Addressable (TSA) table created for this application.</span></div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span> <span class="comment"> */</span></div><div class="line"><a name="l00342"></a><span class="lineno"><a class="line" href="a00359.html#a6766a0733476b67067b84a70ba78e214"> 342</a></span> <a class="code" href="a00359.html#a6766a0733476b67067b84a70ba78e214">FMSTR_TSA_TABLE_BEGIN</a>(main_table)</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  FMSTR_TSA_STRUCT(<a class="code" href="a02047.html">fxls896x_acceldata_t</a>)</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span> </div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  FMSTR_TSA_STRUCT(<a class="code" href="a03839.html">fxls896x_allregs_t</a>)</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, offset, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, value, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, trigger, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, read_offset, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, read_value, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, read_trigger, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, readall_value, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, readall_size, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, readall_trigger, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, trigger_accel_offnoise, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, trigger_selftest, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, fs_value, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, mods_value, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, odr_value, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, toggle, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, reg_addr, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, accel, FMSTR_TSA_FLOAT)</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, accelraw, FMSTR_TSA_SINT16)</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, sdcd, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, temp, FMSTR_TSA_SINT8)</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, selftest, FMSTR_TSA_SINT16)</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, dataready_cntr, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03839.html">fxls896x_allregs_t</a>, timestamp, FMSTR_TSA_UINT32)</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span> </div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  FMSTR_TSA_STRUCT(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>)</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>, offx, FMSTR_TSA_FLOAT)</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>, offy, FMSTR_TSA_FLOAT)</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>, offz, FMSTR_TSA_FLOAT)</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>, rmsx, FMSTR_TSA_FLOAT)</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>, rmsy, FMSTR_TSA_FLOAT)</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>, rmsz, FMSTR_TSA_FLOAT)</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>, complete_accel_offnoise, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span> </div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span> </div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  FMSTR_TSA_STRUCT(<a class="code" href="a03847.html">fxls896x_selftest_t</a>)</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03847.html">fxls896x_selftest_t</a>, x_stoc, FMSTR_TSA_SINT16)</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03847.html">fxls896x_selftest_t</a>, y_stoc, FMSTR_TSA_SINT16)</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03847.html">fxls896x_selftest_t</a>, z_stoc, FMSTR_TSA_SINT16)</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03847.html">fxls896x_selftest_t</a>, x_stof, FMSTR_TSA_SINT16)</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03847.html">fxls896x_selftest_t</a>, y_stof, FMSTR_TSA_SINT16)</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03847.html">fxls896x_selftest_t</a>, z_stof, FMSTR_TSA_SINT16)</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  FMSTR_TSA_MEMBER(<a class="code" href="a03847.html">fxls896x_selftest_t</a>, complete_selftest, FMSTR_TSA_UINT8)</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span> </div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  FMSTR_TSA_RO_VAR(rawData, FMSTR_TSA_USERTYPE(<a class="code" href="a02047.html">fxls896x_acceldata_t</a>))</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span> </div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  FMSTR_TSA_RW_VAR(registers, FMSTR_TSA_USERTYPE(<a class="code" href="a03839.html">fxls896x_allregs_t</a>))</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span> </div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  FMSTR_TSA_RO_VAR(offnoise_data, FMSTR_TSA_USERTYPE(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a>))</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span> </div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  FMSTR_TSA_RO_VAR(selftest, FMSTR_TSA_USERTYPE(<a class="code" href="a03847.html">fxls896x_selftest_t</a>))</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span> </div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span> FMSTR_TSA_TABLE_END()</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span> </div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span> FMSTR_TSA_TABLE_LIST_BEGIN()</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  FMSTR_TSA_TABLE(main_table)</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span> FMSTR_TSA_TABLE_LIST_END()</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span> <span class="comment"></span></div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span> <span class="comment">/*!</span></div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span> <span class="comment"> * @brief FreeMASTER recorder initialization</span></div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span> <span class="comment"> */</span></div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#ac0ede279731ef03a63e646ed3cc7ae29">FRM_Recorder_Init</a>()</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span> {</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="comment">/* Do local configuration of additional recorder */</span></div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span> </div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <span class="comment">/* Setup the additional recorder raw buffer */</span></div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <a class="code" href="a00359.html#ad162871b835f5bcb36700a35673419f0">recBuffCfg</a>.addr = recBuffer;</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <a class="code" href="a00359.html#ad162871b835f5bcb36700a35673419f0">recBuffCfg</a>.size = <span class="keyword">sizeof</span>(recBuffer);</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <a class="code" href="a00359.html#ad162871b835f5bcb36700a35673419f0">recBuffCfg</a>.basePeriod_ns = 0; <span class="comment">/* Unknown period */</span></div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <a class="code" href="a00359.html#ad162871b835f5bcb36700a35673419f0">recBuffCfg</a>.name = <span class="stringliteral">"FXLS896x 3-Axis Accelerometer Data"</span>;</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span> </div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  FMSTR_RecorderCreate(1, &<a class="code" href="a00359.html#ad162871b835f5bcb36700a35673419f0">recBuffCfg</a>);</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> }</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span> <span class="comment"></span></div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span> <span class="comment">/*!</span></div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span> <span class="comment"> * @brief Main function</span></div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span> <span class="comment"> */</span></div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span> </div><div class="line"><a name="l00423"></a><span class="lineno"><a class="line" href="a00359.html#a840291bc02cba5474a4cb46a9b9566fe"> 423</a></span> <span class="keywordtype">int</span> <a class="code" href="a00359.html#a840291bc02cba5474a4cb46a9b9566fe">main</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span> {</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <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="l00426"></a><span class="lineno"> 426</span>  uint8_t whoami = 0;</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  uint8_t regdata;</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <span class="keywordtype">float</span> sensitivity = <a class="code" href="a00359.html#a08e287e51783ab8f90158352e6fc3af8">ACCEL_4G_SENS</a>;</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span> </div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  ARM_DRIVER_I2C *<a class="code" href="a00368.html#a3c22bed16a7c769894081222aa6107d8">I2Cdrv</a> = &<a class="code" href="a04343.html#ad6a14737695a4218d07182b86b21f570">I2C_S_DRIVER</a>; <span class="comment">// Now using the shield.h value!!!</span></div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <a class="code" href="a03903.html">GENERIC_DRIVER_GPIO</a> *<a class="code" href="a00281.html#ac61bf859f26cd2541c3958bff34e2bda">pGpioDriver</a> = &<a class="code" href="a04841.html#a2c39f234913855fad752a8f96f245b27">Driver_GPIO_KSDK</a>;</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <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="l00433"></a><span class="lineno"> 433</span> <span class="comment"></span></div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span> <span class="comment"> /*! Initialize the MCU hardware. */</span></div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <a class="code" href="a00959.html#ga2c9fe54b6b84723fbaa590a6f4576966">BOARD_InitPins</a>();</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <a class="code" href="a04292.html#a8d81431cbbc4b01da56afbff0f766379">BOARD_BootClockRUN</a>();</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  <a class="code" href="a00530.html#ad43629969994e92bd3620e630bda24c8">BOARD_SystickEnable</a>();</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <a class="code" href="a04109.html#a4c84ccb952cb083367d7040cf9de3db8">BOARD_InitDebugConsole</a>();</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span> <span class="comment"></span></div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span> <span class="comment"> /*! Initialize FXLS896x_INT1 pin used by FRDM board */</span></div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  pGpioDriver-><a class="code" href="a03903.html#a0c1e5657ab29e57116a57c7b22f4c630">pin_init</a>(&<a class="code" href="a04088.html#a323b5df5f16c87a33e92f0a63618437b">FXLS896x_INT1</a>, <a class="code" href="a00482.html#a631d09668ec8f40a64ff69613cdbbba5aea9c54895635603d054830602ba5fb4e">GPIO_DIRECTION_IN</a>, NULL, &<a class="code" href="a00359.html#ab4c148858207e08ce9fc7b1f7cdf7a5e">fxls896x_isr_callback</a>, NULL);</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span> <span class="comment"></span></div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span> <span class="comment"> /*! Initialize RGB LED pin used by FRDM board */</span></div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  pGpioDriver-><a class="code" href="a03903.html#a0c1e5657ab29e57116a57c7b22f4c630">pin_init</a>(&<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="l00445"></a><span class="lineno"> 445</span> <span class="comment"></span></div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span> <span class="comment"> /*! FreeMASTER communication layer initialization */</span></div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  init_freemaster_uart();</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span> <span class="comment"></span></div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span> <span class="comment"> /*! Initialize the I2C driver. */</span></div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  status = I2Cdrv->Initialize(<a class="code" href="a04343.html#a60ac2e3bb32ae33e2fd542f607a58ac4">I2C_S_SIGNAL_EVENT</a>);</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  {</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  }</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="comment"></span></div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span> <span class="comment"> /*! Set the I2C Power mode. */</span></div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  status = I2Cdrv->PowerControl(ARM_POWER_FULL);</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  {</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  }</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span> <span class="comment"></span></div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span> <span class="comment"> /*! Set the I2C bus speed. */</span></div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  status = I2Cdrv->Control(ARM_I2C_BUS_SPEED, ARM_I2C_BUS_SPEED_FAST);</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  {</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  }</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span> <span class="comment"></span></div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span> <span class="comment"> /*! Initialize FXLS896x sensor driver. */</span></div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  status = <a class="code" href="a00065.html#ac6e9e086c62c58d5a225a89a7abbe9ce">FXLS896x_I2C_Initialize</a>(&fxls896xDriver, &<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="l00472"></a><span class="lineno"> 472</span>  &whoami);</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  {</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  }</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span> <span class="comment"></span></div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span> <span class="comment"> /*! Set the task to be executed while waiting for I2C transactions to complete. */</span></div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  <a class="code" href="a00065.html#a95b274e5f8a7c15cfa87b872b3a411ab">FXLS896x_I2C_SetIdleTask</a>(&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="l00480"></a><span class="lineno"> 480</span> <span class="comment"></span></div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span> <span class="comment"> /*! Configure the FXLS896x sensor. */</span></div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, cFxls896xConfigNormal);</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  {</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  }</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span> <span class="comment"></span></div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span> <span class="comment"> /*! FreeMASTER Driver Initialization */</span></div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  FMSTR_Init();</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span> <span class="comment"></span></div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span> <span class="comment"> /*! FreeMASTER Recorder Initialization */</span></div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <a class="code" href="a00359.html#ac0ede279731ef03a63e646ed3cc7ae29">FRM_Recorder_Init</a>();</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span> <span class="comment"></span></div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span> <span class="comment"> /*! Open FreeMASTER Pipe and get a Pipe handle */</span></div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  FMSTR_HPIPE hpipe = FMSTR_PipeOpen(3, NULL, (FMSTR_ADDR)pipe3_rxb, <span class="keyword">sizeof</span>(pipe3_rxb), (FMSTR_ADDR)pipe3_txb, <span class="keyword">sizeof</span>(pipe3_txb),</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  FMSTR_PIPE_TYPE_ANSI_TERMINAL, <span class="stringliteral">"streaming"</span>);</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span> <span class="comment"></span></div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span> <span class="comment"> /*! Initialize trigger flags */</span></div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  registers.<a class="code" href="a03839.html#af53fbe055eb102357c08a01337cd7838">toggle</a> = 1;</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  registers.<a class="code" href="a03839.html#ad47e9b879c95a25ce124bd5611ff9497">trigger</a> = 0;</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  registers.<a class="code" href="a03839.html#a016f00fd424d6219ccb402eea3f598df">read_trigger</a> = 0;</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  registers.<a class="code" href="a03839.html#a96995c8df2aa66256c07ed09638a251c">read_value</a> = 0;</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  registers.<a class="code" href="a03839.html#a2e521321a4d5d43daa4ae43891a0f553">readall_trigger</a> = 0;</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  registers.<a class="code" href="a03839.html#adb6a8af4ed350e0bd00bb086852d3f04">trigger_accel_offnoise</a>=0;</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  registers.<a class="code" href="a03839.html#a7ffc10894be10ca2296d874cd2e3fe28">trigger_selftest</a>=0;</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  registers.<a class="code" href="a03839.html#a82c780845e3a97eb59ddbf29c68989a8">dataready_cntr</a> = 0;</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  registers.<a class="code" href="a03839.html#a76836737bd9a0708c252056bb768721d">selftest</a>[0]=0;</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  registers.<a class="code" href="a03839.html#a76836737bd9a0708c252056bb768721d">selftest</a>[1]=0;</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  registers.<a class="code" href="a03839.html#a76836737bd9a0708c252056bb768721d">selftest</a>[2]=0;</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  registers.<a class="code" href="a03839.html#ab20b0c7772544cf5d318507f34231fbe">timestamp</a> = 0;</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span> </div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i < <a class="code" href="a00359.html#a90223f60cd8615444070702909389cb5">FXLS896x_NUM_REGISTERS</a>; i++)</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  {</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  registers.<a class="code" href="a03839.html#adfe994819b081a25979c267187161fe4">readall_value</a>[i] = 0;</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  }</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span> </div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keywordflow">for</span> (;;) <span class="comment">/* Forever loop */</span></div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  {</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span> <span class="comment"></span></div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span> <span class="comment"> /*! Calling Recorder#0 in execution loop for generic high-speed variables sampling. */</span></div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  FMSTR_Recorder(0);</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span> <span class="comment"></span></div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span> <span class="comment"> /*! FreeMASTER host communication polling mode */</span></div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  FMSTR_Poll();</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  <span class="comment"></span></div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span> <span class="comment"> /*! Check for any write register trigger from Host */</span></div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  <span class="keywordflow">if</span> (registers.<a class="code" href="a03839.html#ad47e9b879c95a25ce124bd5611ff9497">trigger</a> == 1)</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  {<span class="comment"></span></div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span> <span class="comment"> /*! Apply Register Write */</span></div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  status = <a class="code" href="a00359.html#a7b85fd9df22936b827367b7c812ed9c5">apply_register_write</a>(fxls896xDriver, registers.<a class="code" href="a03839.html#aa9fff43968831437a312428836cab362">offset</a>, registers.<a class="code" href="a03839.html#a638e4503e0ae6ce655b7ad2e17e8f0ad">value</a>);</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  {</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  }</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  registers.<a class="code" href="a03839.html#ad47e9b879c95a25ce124bd5611ff9497">trigger</a> = 0;<span class="comment"></span></div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span> <span class="comment"> /*! Update drop down menu selection based on updated register write */</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <a class="code" href="a00359.html#a919f76313b698c6146c1b11480e41c88">update_dropdown_selection</a>(&registers, <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a79466919081835049eceb8e501dcd479">FXLS896x_REG_WRITE</a>);</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  }</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span> <span class="comment"></span></div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span> <span class="comment"> /*! Check for any read register trigger from Host */</span></div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  <span class="keywordflow">if</span> (registers.<a class="code" href="a03839.html#a016f00fd424d6219ccb402eea3f598df">read_trigger</a> == 1)</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  {<span class="comment"></span></div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span> <span class="comment"> /*! Apply Register Write */</span></div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  status = <a class="code" href="a00359.html#acdf865d90b909f831131712d39e6f5e6">apply_register_read</a>(fxls896xDriver, registers.<a class="code" href="a03839.html#ab65acde67dc46f1d163e2ee468420b48">read_offset</a>, &(registers.<a class="code" href="a03839.html#a96995c8df2aa66256c07ed09638a251c">read_value</a>));</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  {</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  }</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  registers.<a class="code" href="a03839.html#a016f00fd424d6219ccb402eea3f598df">read_trigger</a> = 0;<span class="comment"></span></div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span> <span class="comment"> /*! Update drop down menu selection based on updated register read */</span></div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  <a class="code" href="a00359.html#a919f76313b698c6146c1b11480e41c88">update_dropdown_selection</a>(&registers, <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a8ea6cd4b2126d70e1faf58be1e96cd21">FXLS896x_REG_READ</a>);</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  }</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span> <span class="comment"></span></div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span> <span class="comment"> /*! Check for any read all register trigger from Host */</span></div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  <span class="keywordflow">if</span> (registers.<a class="code" href="a03839.html#a2e521321a4d5d43daa4ae43891a0f553">readall_trigger</a> == 1)</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  {<span class="comment"></span></div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span> <span class="comment"> /*! Apply Register Write */</span></div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  status = <a class="code" href="a00359.html#a44ad95193e45da22e2bd3b1d0fdb1b89">apply_register_readall</a>(fxls896xDriver);</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  {</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  }</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  registers.<a class="code" href="a03839.html#a2e521321a4d5d43daa4ae43891a0f553">readall_trigger</a> = 0;</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  registers.<a class="code" href="a03839.html#a68fea111a9a0540bf8e4a50113a0fc66">readall_size</a> = <a class="code" href="a00359.html#a90223f60cd8615444070702909389cb5">FXLS896x_NUM_REGISTERS</a>;<span class="comment"></span></div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span> <span class="comment"> /*! Update drop down menu selection based on updated all register read */</span></div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  <a class="code" href="a00359.html#a919f76313b698c6146c1b11480e41c88">update_dropdown_selection</a>(&registers, <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a3307d286251e5956eb38bcb0cf935426">FXLS896x_ALLREG_READ</a>);</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  }</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span> <span class="comment"></span></div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span> <span class="comment"> /*! Wait for data ready interrupt from the FXLS896x. */</span></div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  <span class="keywordflow">if</span> (<span class="keyword">false</span> == <a class="code" href="a00359.html#abed21723f86be731e66be8868a8732b4">bFxls896xIntFlag</a>)</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  { <span class="comment">/* Loop, if new sample is not available. */</span></div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  <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="l00573"></a><span class="lineno"> 573</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  }</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  { <span class="comment">/*! Clear the data ready flag, it will be set again by the ISR. */</span></div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  <a class="code" href="a00359.html#abed21723f86be731e66be8868a8732b4">bFxls896xIntFlag</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  pGpioDriver-><a class="code" href="a03903.html#a62607faa2025749cb36c8d7e379d45fc">toggle_pin</a>(&<a class="code" href="a00575.html#a02a28175122c7e060eeb1411dc5ac171">GREEN_LED</a>);</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  }</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span> <span class="comment"></span></div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span> <span class="comment"> /*! Calling Recorder#1 for sampling sensor data when we get sensor data ready interrupt based on ODR. */</span></div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  FMSTR_Recorder(1);</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span> <span class="comment"></span></div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span> <span class="comment"> /*! Read new raw sensor data from the FXLS896x. */</span></div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  status = <a class="code" href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a>(&fxls896xDriver, FXLS896x_ALL_REG_READ, registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>);</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  {</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  }</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span> </div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  <span class="comment">/* Update timestamp from Systick framework. */</span></div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  registers.<a class="code" href="a03839.html#ab20b0c7772544cf5d318507f34231fbe">timestamp</a> +=<a class="code" href="a00530.html#a85a32737b730fbb713ec910e1ad17c74">BOARD_SystickElapsedTime_us</a>(&<a class="code" href="a00359.html#aafa5fcc299fb9a0db111332f5111b7df">gSystick</a>);</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span> <span class="comment"></span></div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span> <span class="comment"> /*! Increment data ready counter and check for rollover */</span></div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  registers.<a class="code" href="a03839.html#a82c780845e3a97eb59ddbf29c68989a8">dataready_cntr</a>++;</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>  <span class="keywordflow">if</span>(<a class="code" href="a00359.html#a1ea66d33b5f8e9fda77f8dd865ef0408">MAX8BITSTORAGE</a> == registers.<a class="code" href="a03839.html#a82c780845e3a97eb59ddbf29c68989a8">dataready_cntr</a>)</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  {</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  registers.<a class="code" href="a03839.html#a82c780845e3a97eb59ddbf29c68989a8">dataready_cntr</a> = 0;</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>  }</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span> </div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  registers.<a class="code" href="a03839.html#a029a87658f39852c58465c723e31eb29">temp</a> = registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[1]+25;</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  registers.<a class="code" href="a03839.html#a5df4eecddeaf753c71e3eb7c1be3eb11">sdcd</a> = (registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[0] & 0x10)>>4;</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span> <span class="comment"></span></div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span> <span class="comment"> /*! Convert the raw sensor data to signed 16-bit container for display to the debug port. */</span></div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[0] = (int16_t)(((int16_t)(((int16_t)registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[3] << 8) | registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[2])));</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[1] = (int16_t)(((int16_t)(((int16_t)registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[5] << 8) | registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[4])));</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[2] = (int16_t)(((int16_t)(((int16_t)registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[7] << 8) | registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[6])));</div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span> </div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span>  registers.<a class="code" href="a03839.html#a754f61663feb9d0ffc46376fca33ca51">accelraw</a>[0] = rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[0];</div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  registers.<a class="code" href="a03839.html#a754f61663feb9d0ffc46376fca33ca51">accelraw</a>[1] = rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[1];</div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  registers.<a class="code" href="a03839.html#a754f61663feb9d0ffc46376fca33ca51">accelraw</a>[2] = rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[2];</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span> <span class="comment"></span></div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span> <span class="comment"> /*! Add data log into Pipe TX */</span></div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  FMSTR_PipePrintf(hpipe, <span class="stringliteral">"%d\t%d\t%d\t%d\t%d\n"</span>, registers.<a class="code" href="a03839.html#ab20b0c7772544cf5d318507f34231fbe">timestamp</a>, registers.<a class="code" href="a03839.html#a82c780845e3a97eb59ddbf29c68989a8">dataready_cntr</a>, registers.<a class="code" href="a03839.html#a754f61663feb9d0ffc46376fca33ca51">accelraw</a>[0], registers.<a class="code" href="a03839.html#a754f61663feb9d0ffc46376fca33ca51">accelraw</a>[1], registers.<a class="code" href="a03839.html#a754f61663feb9d0ffc46376fca33ca51">accelraw</a>[2]);</div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span> </div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  status = <a class="code" href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a>(&fxls896xDriver, cFXLS896x_whoami, (uint8_t *)&registers.<a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[13]);</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span> <span class="comment"></span></div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span> <span class="comment"> /*! Check the FS and apply sensitivity */</span></div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>  status = <a class="code" href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a>(&fxls896xDriver, cFXLS896x_fs_src, &regdata);</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  <span class="keywordflow">if</span> ((regdata & <a class="code" href="a00062.html#a4be837ee453474213394bf34a10ba959">FXLS896x_SENS_CONFIG1_FSR_MASK</a>) == 2)</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>  {</div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  sensitivity = <a class="code" href="a00359.html#a08e287e51783ab8f90158352e6fc3af8">ACCEL_4G_SENS</a>;</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  }</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((regdata & FXLS896x_SENS_CONFIG1_FSR_MASK) == 4)</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  {</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  sensitivity = <a class="code" href="a00359.html#a05b1ee83bf8f0e4f3d8ddcd5b6bdcf89">ACCEL_8G_SENS</a>;</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  }</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((regdata & FXLS896x_SENS_CONFIG1_FSR_MASK) == 6)</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  {</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span>  sensitivity = <a class="code" href="a00359.html#a496885152e5f45fd5bee40d8e928f71e">ACCEL_16G_SENS</a>;</div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  }</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  {</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  sensitivity = <a class="code" href="a00359.html#a655f856881e2748838614d8ebe75b9b3">ACCEL_2G_SENS</a>;</div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  }</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span> <span class="comment"></span></div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span> <span class="comment"> /*! Convert raw values to Gs */</span></div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>  registers.<a class="code" href="a03839.html#ad1c0af9df32ab0f575f319b64bff0f14">accel</a>[0] = (float) (rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[0] * sensitivity);</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>  registers.<a class="code" href="a03839.html#ad1c0af9df32ab0f575f319b64bff0f14">accel</a>[1] = (float) (rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[1] * sensitivity);</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>  registers.<a class="code" href="a03839.html#ad1c0af9df32ab0f575f319b64bff0f14">accel</a>[2] = (float) (rawData.<a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[2] * sensitivity);</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span> </div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>  <span class="keywordflow">if</span> (<a class="code" href="a00359.html#a6aa7a1a86aa031539466bf44d884ef39">prev_toggle</a> != registers.<a class="code" href="a03839.html#af53fbe055eb102357c08a01337cd7838">toggle</a>)</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>  {</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>  pGpioDriver-><a class="code" href="a03903.html#a62607faa2025749cb36c8d7e379d45fc">toggle_pin</a>(&<a class="code" href="a00575.html#a02a28175122c7e060eeb1411dc5ac171">GREEN_LED</a>);</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  <a class="code" href="a00359.html#a6aa7a1a86aa031539466bf44d884ef39">prev_toggle</a> = registers.<a class="code" href="a03839.html#af53fbe055eb102357c08a01337cd7838">toggle</a>;</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  }</div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span> <span class="comment"></span></div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span> <span class="comment"> /*! Call offset and noise calculation function for FXLS896x */</span></div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>  <span class="keywordflow">if</span> (registers.<a class="code" href="a03839.html#adb6a8af4ed350e0bd00bb086852d3f04">trigger_accel_offnoise</a> == 1)</div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span>  {</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>  <a class="code" href="a00359.html#a9cd430fc151a045ed2b98f7b4dc71d44">accel_off_noise</a>(&(rawData), &(offnoise_data), sensitivity);</div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span>  <span class="keywordflow">if</span> (offnoise_data.<a class="code" href="a03843.html#a2c6a1c23cc6973125141cd73769dd5e5">complete_accel_offnoise</a> == 1)</div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>  {</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>  registers.<a class="code" href="a03839.html#adb6a8af4ed350e0bd00bb086852d3f04">trigger_accel_offnoise</a> = 0;</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>  }</div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span>  }</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span> <span class="comment"></span></div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span> <span class="comment"> /*! Call self-test function */</span></div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span>  <span class="keywordflow">if</span> (registers.<a class="code" href="a03839.html#a7ffc10894be10ca2296d874cd2e3fe28">trigger_selftest</a> == 1)</div><div class="line"><a name="l00660"></a><span class="lineno"> 660</span>  {</div><div class="line"><a name="l00661"></a><span class="lineno"> 661</span>  <a class="code" href="a00359.html#ab7a328885ef232a1bba728b4289b8802">perform_selftest</a>(fxls896xDriver, &selftest);</div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span>  <span class="keywordflow">if</span> (selftest.<a class="code" href="a03847.html#a48d808b0104a033061d1a750d3a3f7f8">complete_selftest</a> == 1)</div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>  {</div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>  registers.<a class="code" href="a03839.html#a7ffc10894be10ca2296d874cd2e3fe28">trigger_selftest</a> = 0;</div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span> <span class="comment"></span></div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span> <span class="comment"> /*! Re-Configure the FXLS896x sensor to default configuration */</span></div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, cFxls896xConfigNormal);</div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span>  {</div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  }</div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span>  }</div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  }</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span> </div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span>  }</div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span> }</div><div class="line"><a name="l00677"></a><span class="lineno"> 677</span> </div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span> <span class="comment"></span></div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span> <span class="comment">/*!</span></div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span> <span class="comment"> * @brief Service register write trigger from Host</span></div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span> <span class="comment"> */</span></div><div class="line"><a name="l00682"></a><span class="lineno"><a class="line" href="a00359.html#a7b85fd9df22936b827367b7c812ed9c5"> 682</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a7b85fd9df22936b827367b7c812ed9c5">apply_register_write</a>(<a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> fxls896xDriver, uint8_t offset, uint8_t value)</div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span> {</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span>  <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="l00685"></a><span class="lineno"> 685</span> </div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span>  <span class="keywordflow">if</span> (offset > <a class="code" href="a00359.html#a90223f60cd8615444070702909389cb5">FXLS896x_NUM_REGISTERS</a>)</div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  {</div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7">SENSOR_ERROR_INVALID_PARAM</a>;</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>  }</div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span> </div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span>  <a class="code" href="a03807.html">registerwritelist_t</a> fxls896x_register_write[] = {<span class="comment"></span></div><div class="line"><a name="l00692"></a><span class="lineno"> 692</span> <span class="comment"> /*! Set register offset with provided value */</span></div><div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  {offset, value, 0},</div><div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  <a class="code" href="a00179.html#a2cedde333a6373a3ee274bde6af145d0">__END_WRITE_DATA__</a>};</div><div class="line"><a name="l00695"></a><span class="lineno"> 695</span> </div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, fxls896x_register_write);</div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  {</div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acae2a1d27a0c4405ab02566a7fc618d193">SENSOR_ERROR_WRITE</a>;</div><div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  }</div><div class="line"><a name="l00701"></a><span class="lineno"> 701</span> </div><div class="line"><a name="l00702"></a><span class="lineno"> 702</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a>;</div><div class="line"><a name="l00703"></a><span class="lineno"> 703</span> }</div><div class="line"><a name="l00704"></a><span class="lineno"> 704</span> <span class="comment"></span></div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span> <span class="comment">/*!</span></div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span> <span class="comment"> * @brief Service register read trigger from Host</span></div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span> <span class="comment"> */</span></div><div class="line"><a name="l00708"></a><span class="lineno"><a class="line" href="a00359.html#acdf865d90b909f831131712d39e6f5e6"> 708</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#acdf865d90b909f831131712d39e6f5e6">apply_register_read</a>(<a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> fxls896xDriver, uint8_t read_offset, uint8_t *read_value)</div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span> {</div><div class="line"><a name="l00710"></a><span class="lineno"> 710</span>  <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="l00711"></a><span class="lineno"> 711</span> </div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span>  <span class="keywordflow">if</span> (read_offset > <a class="code" href="a00359.html#a90223f60cd8615444070702909389cb5">FXLS896x_NUM_REGISTERS</a>)</div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span>  {</div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7">SENSOR_ERROR_INVALID_PARAM</a>;</div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span>  }</div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span> </div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  <a class="code" href="a03811.html">registerreadlist_t</a> fxls896x_register_read[] = {<span class="comment"></span></div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span> <span class="comment"> /*! Set register offset with provided value */</span></div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  {.<a class="code" href="a03811.html#a5fe82375de174c0511ca301fec78e441">readFrom</a> = read_offset, .numBytes = 1}, <a class="code" href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a>};</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span> </div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  status = <a class="code" href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a>(&fxls896xDriver, fxls896x_register_read, read_value);</div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  {</div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acae2a1d27a0c4405ab02566a7fc618d193">SENSOR_ERROR_WRITE</a>;</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  }</div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span> </div><div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a>;</div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span> }</div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span> <span class="comment"></span></div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span> <span class="comment">/*!</span></div><div class="line"><a name="l00731"></a><span class="lineno"> 731</span> <span class="comment"> * @brief Service register read all trigger from Host</span></div><div class="line"><a name="l00732"></a><span class="lineno"> 732</span> <span class="comment"> */</span></div><div class="line"><a name="l00733"></a><span class="lineno"><a class="line" href="a00359.html#a44ad95193e45da22e2bd3b1d0fdb1b89"> 733</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a44ad95193e45da22e2bd3b1d0fdb1b89">apply_register_readall</a>(<a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> fxls896xDriver)</div><div class="line"><a name="l00734"></a><span class="lineno"> 734</span> {</div><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  <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="l00736"></a><span class="lineno"> 736</span> </div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> reg_offset = <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a2735a5a46423052c12cadba4c867a85c">FXLS896x_INT_STATUS</a>; reg_offset <= <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1ad8aa1cd8173d2545ed6c9473253b01fd">FXLS896x_SELF_TEST_CONFIG2</a>; reg_offset++)</div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span>  {</div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span>  <a class="code" href="a03811.html">registerreadlist_t</a> fxls896x_register_readall[] = {<span class="comment"></span></div><div class="line"><a name="l00740"></a><span class="lineno"> 740</span> <span class="comment"> /*! Set register offset with provided value */</span></div><div class="line"><a name="l00741"></a><span class="lineno"> 741</span>  {.<a class="code" href="a03811.html#a5fe82375de174c0511ca301fec78e441">readFrom</a> = reg_offset, .numBytes = 1}, <a class="code" href="a00179.html#aebb58a1bb3df30b7df4f6f14d0f1a81d">__END_READ_DATA__</a>};</div><div class="line"><a name="l00742"></a><span class="lineno"> 742</span> </div><div class="line"><a name="l00743"></a><span class="lineno"> 743</span>  status = <a class="code" href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a>(&fxls896xDriver, fxls896x_register_readall, &(registers.<a class="code" href="a03839.html#adfe994819b081a25979c267187161fe4">readall_value</a>[reg_offset]));</div><div class="line"><a name="l00744"></a><span class="lineno"> 744</span>  <span class="keywordflow">if</span> (<a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a> != status)</div><div class="line"><a name="l00745"></a><span class="lineno"> 745</span>  {</div><div class="line"><a name="l00746"></a><span class="lineno"> 746</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acab93ad77156e08d1bebe52bf46936cccc">SENSOR_ERROR_READ</a>;</div><div class="line"><a name="l00747"></a><span class="lineno"> 747</span>  }</div><div class="line"><a name="l00748"></a><span class="lineno"> 748</span>  }</div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span> </div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a>;</div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span> }</div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span> <span class="comment"></span></div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span> <span class="comment">/*!</span></div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span> <span class="comment"> * @brief Update drop down selection values based on register write, read or readall.</span></div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span> <span class="comment"> */</span></div><div class="line"><a name="l00756"></a><span class="lineno"><a class="line" href="a00359.html#a919f76313b698c6146c1b11480e41c88"> 756</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a919f76313b698c6146c1b11480e41c88">update_dropdown_selection</a>(<a class="code" href="a03839.html">fxls896x_allregs_t</a> *registers, uint8_t caller)</div><div class="line"><a name="l00757"></a><span class="lineno"> 757</span> {</div><div class="line"><a name="l00758"></a><span class="lineno"> 758</span> </div><div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a> = <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a>;</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span> </div><div class="line"><a name="l00761"></a><span class="lineno"> 761</span>  <span class="keywordflow">switch</span> (caller)</div><div class="line"><a name="l00762"></a><span class="lineno"> 762</span>  {</div><div class="line"><a name="l00763"></a><span class="lineno"> 763</span>  <span class="keywordflow">case</span> <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a79466919081835049eceb8e501dcd479">FXLS896x_REG_WRITE</a>:</div><div class="line"><a name="l00764"></a><span class="lineno"> 764</span> <span class="comment"></span></div><div class="line"><a name="l00765"></a><span class="lineno"> 765</span> <span class="comment"> /*! Update drop down option based on updated read value */</span></div><div class="line"><a name="l00766"></a><span class="lineno"> 766</span>  <span class="keywordflow">if</span>(<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a> == registers-><a class="code" href="a03839.html#aa9fff43968831437a312428836cab362">offset</a>) <span class="comment">//FS Selection</span></div><div class="line"><a name="l00767"></a><span class="lineno"> 767</span>  {</div><div class="line"><a name="l00768"></a><span class="lineno"> 768</span>  registers-><a class="code" href="a03839.html#a485fad199cd9c5504f6d08eaed75e1d5">fs_value</a> = registers-><a class="code" href="a03839.html#a638e4503e0ae6ce655b7ad2e17e8f0ad">value</a>;</div><div class="line"><a name="l00769"></a><span class="lineno"> 769</span>  }</div><div class="line"><a name="l00770"></a><span class="lineno"> 770</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a8665c64ade737b2dd21fdf54d5593718">FXLS896x_SENS_CONFIG2</a> == registers-><a class="code" href="a03839.html#aa9fff43968831437a312428836cab362">offset</a>)</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>  {</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>  registers-><a class="code" href="a03839.html#aa5744614a78838192d7de403e29c3d0c">mods_value</a> = registers-><a class="code" href="a03839.html#a638e4503e0ae6ce655b7ad2e17e8f0ad">value</a>;</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span>  }</div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1abf1ecb7df2b170c64227ffe80c14ef2b">FXLS896x_SENS_CONFIG3</a> == registers-><a class="code" href="a03839.html#aa9fff43968831437a312428836cab362">offset</a>)</div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span>  {</div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span>  registers-><a class="code" href="a03839.html#ac812aa6cbae37a5e43e487a02a535f4d">odr_value</a> = registers-><a class="code" href="a03839.html#a638e4503e0ae6ce655b7ad2e17e8f0ad">value</a>;</div><div class="line"><a name="l00777"></a><span class="lineno"> 777</span>  }</div><div class="line"><a name="l00778"></a><span class="lineno"> 778</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00779"></a><span class="lineno"> 779</span>  <span class="keywordflow">case</span> <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a8ea6cd4b2126d70e1faf58be1e96cd21">FXLS896x_REG_READ</a>: <span class="comment">//Called from Register Read</span></div><div class="line"><a name="l00780"></a><span class="lineno"> 780</span> <span class="comment"></span></div><div class="line"><a name="l00781"></a><span class="lineno"> 781</span> <span class="comment"> /*! Update drop down option based on updated read value */</span></div><div class="line"><a name="l00782"></a><span class="lineno"> 782</span>  <span class="keywordflow">if</span>(<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a> == registers-><a class="code" href="a03839.html#ab65acde67dc46f1d163e2ee468420b48">read_offset</a>) <span class="comment">//FS Selection</span></div><div class="line"><a name="l00783"></a><span class="lineno"> 783</span>  {</div><div class="line"><a name="l00784"></a><span class="lineno"> 784</span>  registers-><a class="code" href="a03839.html#a485fad199cd9c5504f6d08eaed75e1d5">fs_value</a> = registers-><a class="code" href="a03839.html#a96995c8df2aa66256c07ed09638a251c">read_value</a>;</div><div class="line"><a name="l00785"></a><span class="lineno"> 785</span>  }</div><div class="line"><a name="l00786"></a><span class="lineno"> 786</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a8665c64ade737b2dd21fdf54d5593718">FXLS896x_SENS_CONFIG2</a> == registers-><a class="code" href="a03839.html#ab65acde67dc46f1d163e2ee468420b48">read_offset</a>)</div><div class="line"><a name="l00787"></a><span class="lineno"> 787</span>  {</div><div class="line"><a name="l00788"></a><span class="lineno"> 788</span>  registers-><a class="code" href="a03839.html#aa5744614a78838192d7de403e29c3d0c">mods_value</a> = registers-><a class="code" href="a03839.html#a96995c8df2aa66256c07ed09638a251c">read_value</a>;</div><div class="line"><a name="l00789"></a><span class="lineno"> 789</span>  }</div><div class="line"><a name="l00790"></a><span class="lineno"> 790</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1abf1ecb7df2b170c64227ffe80c14ef2b">FXLS896x_SENS_CONFIG3</a> == registers-><a class="code" href="a03839.html#ab65acde67dc46f1d163e2ee468420b48">read_offset</a>)</div><div class="line"><a name="l00791"></a><span class="lineno"> 791</span>  {</div><div class="line"><a name="l00792"></a><span class="lineno"> 792</span>  registers-><a class="code" href="a03839.html#ac812aa6cbae37a5e43e487a02a535f4d">odr_value</a> = registers-><a class="code" href="a03839.html#a96995c8df2aa66256c07ed09638a251c">read_value</a>;</div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span>  }</div><div class="line"><a name="l00794"></a><span class="lineno"> 794</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00795"></a><span class="lineno"> 795</span>  <span class="keywordflow">case</span> <a class="code" href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a3307d286251e5956eb38bcb0cf935426">FXLS896x_ALLREG_READ</a>: <span class="comment">//Called from Register ReadAll</span></div><div class="line"><a name="l00796"></a><span class="lineno"> 796</span> <span class="comment"></span></div><div class="line"><a name="l00797"></a><span class="lineno"> 797</span> <span class="comment"> /*! Update drop down option based on updated read values */</span></div><div class="line"><a name="l00798"></a><span class="lineno"> 798</span>  registers-><a class="code" href="a03839.html#a485fad199cd9c5504f6d08eaed75e1d5">fs_value</a> = registers-><a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>];</div><div class="line"><a name="l00799"></a><span class="lineno"> 799</span>  registers-><a class="code" href="a03839.html#aa5744614a78838192d7de403e29c3d0c">mods_value</a> = registers-><a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a8665c64ade737b2dd21fdf54d5593718">FXLS896x_SENS_CONFIG2</a>];</div><div class="line"><a name="l00800"></a><span class="lineno"> 800</span>  registers-><a class="code" href="a03839.html#ac812aa6cbae37a5e43e487a02a535f4d">odr_value</a> = registers-><a class="code" href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">reg_addr</a>[<a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1abf1ecb7df2b170c64227ffe80c14ef2b">FXLS896x_SENS_CONFIG3</a>];</div><div class="line"><a name="l00801"></a><span class="lineno"> 801</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00802"></a><span class="lineno"> 802</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00803"></a><span class="lineno"> 803</span>  status = <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7">SENSOR_ERROR_INVALID_PARAM</a>;</div><div class="line"><a name="l00804"></a><span class="lineno"> 804</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00805"></a><span class="lineno"> 805</span>  }</div><div class="line"><a name="l00806"></a><span class="lineno"> 806</span> </div><div class="line"><a name="l00807"></a><span class="lineno"> 807</span>  <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00808"></a><span class="lineno"> 808</span> </div><div class="line"><a name="l00809"></a><span class="lineno"> 809</span> }</div><div class="line"><a name="l00810"></a><span class="lineno"> 810</span> </div><div class="line"><a name="l00811"></a><span class="lineno"> 811</span> <span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l00812"></a><span class="lineno"> 812</span> <span class="comment"> * OFFSET NOISE CALCULATION</span></div><div class="line"><a name="l00813"></a><span class="lineno"> 813</span> <span class="comment"> ******************************************************************************/</span></div><div class="line"><a name="l00814"></a><span class="lineno"> 814</span> <span class="comment"></span></div><div class="line"><a name="l00815"></a><span class="lineno"> 815</span> <span class="comment">/*!</span></div><div class="line"><a name="l00816"></a><span class="lineno"> 816</span> <span class="comment"> * @brief Initialize Offset-Noise Variables</span></div><div class="line"><a name="l00817"></a><span class="lineno"> 817</span> <span class="comment"> */</span></div><div class="line"><a name="l00818"></a><span class="lineno"><a class="line" href="a00359.html#a6724fe657aabaee156551628cd4f2db6"> 818</a></span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#a6724fe657aabaee156551628cd4f2db6">offset_noise_init</a>(<a class="code" href="a03843.html">fxls896x_offset_noise_t</a> *offnoiseptr)</div><div class="line"><a name="l00819"></a><span class="lineno"> 819</span> {</div><div class="line"><a name="l00820"></a><span class="lineno"> 820</span>  offnoiseptr-><a class="code" href="a03843.html#a095cf332a6632b68d181f35bda318f5b">offx</a> = 0.0;</div><div class="line"><a name="l00821"></a><span class="lineno"> 821</span>  offnoiseptr-><a class="code" href="a03843.html#af01b0ac6ab1d631dd5da23e55a855bd5">offy</a> = 0.0;</div><div class="line"><a name="l00822"></a><span class="lineno"> 822</span>  offnoiseptr-><a class="code" href="a03843.html#a176534e2df647e63538839e08e2987ed">offz</a> = 0.0;</div><div class="line"><a name="l00823"></a><span class="lineno"> 823</span>  offnoiseptr-><a class="code" href="a03843.html#a495a615081e1d215673d7c7f9a7f1b4d">rmsx</a> = 0.0;</div><div class="line"><a name="l00824"></a><span class="lineno"> 824</span>  offnoiseptr-><a class="code" href="a03843.html#a9cf6d0f93a0b3f226d25bc3e33ce4e66">rmsy</a> = 0.0;</div><div class="line"><a name="l00825"></a><span class="lineno"> 825</span>  offnoiseptr-><a class="code" href="a03843.html#a96b237aa78c72cadbbc09578d19e68e9">rmsz</a> = 0.0;</div><div class="line"><a name="l00826"></a><span class="lineno"> 826</span>  offnoiseptr-><a class="code" href="a03843.html#a2c6a1c23cc6973125141cd73769dd5e5">complete_accel_offnoise</a> = 0;</div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span> }</div><div class="line"><a name="l00828"></a><span class="lineno"> 828</span> </div><div class="line"><a name="l00829"></a><span class="lineno"> 829</span> </div><div class="line"><a name="l00830"></a><span class="lineno"> 830</span> <span class="comment">/* Calculate Offset & Noise for FXLS896x */</span></div><div class="line"><a name="l00831"></a><span class="lineno"><a class="line" href="a00359.html#a9cd430fc151a045ed2b98f7b4dc71d44"> 831</a></span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#a9cd430fc151a045ed2b98f7b4dc71d44">accel_off_noise</a>(<a class="code" href="a02047.html">fxls896x_acceldata_t</a>* rawData, <a class="code" href="a03843.html">fxls896x_offset_noise_t</a> *offnoiseptr, <span class="keywordtype">float</span> sens)</div><div class="line"><a name="l00832"></a><span class="lineno"> 832</span> {</div><div class="line"><a name="l00833"></a><span class="lineno"> 833</span>  uint16_t j;</div><div class="line"><a name="l00834"></a><span class="lineno"> 834</span>  <span class="keyword">static</span> uint16_t k=0;</div><div class="line"><a name="l00835"></a><span class="lineno"> 835</span>  <span class="keyword">static</span> uint16_t cntr=0;</div><div class="line"><a name="l00836"></a><span class="lineno"> 836</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> stdx=0;</div><div class="line"><a name="l00837"></a><span class="lineno"> 837</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> stdy=0;</div><div class="line"><a name="l00838"></a><span class="lineno"> 838</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> stdz=0;</div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> xx[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>], yy[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>], zz[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>];</div><div class="line"><a name="l00840"></a><span class="lineno"> 840</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> xm[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>], ym[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>], zm[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>];</div><div class="line"><a name="l00841"></a><span class="lineno"> 841</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> xsq[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>], ysq[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>], zsq[<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>];</div><div class="line"><a name="l00842"></a><span class="lineno"> 842</span>  <span class="keywordtype">float</span> am[3];</div><div class="line"><a name="l00843"></a><span class="lineno"> 843</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> sumx=0.0;</div><div class="line"><a name="l00844"></a><span class="lineno"> 844</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> sumy=0.0;</div><div class="line"><a name="l00845"></a><span class="lineno"> 845</span>  <span class="keyword">static</span> <span class="keywordtype">float</span> sumz=0.0;</div><div class="line"><a name="l00846"></a><span class="lineno"> 846</span> </div><div class="line"><a name="l00847"></a><span class="lineno"> 847</span>  <span class="comment">/* Init offset noise variables */</span></div><div class="line"><a name="l00848"></a><span class="lineno"> 848</span>  <a class="code" href="a00359.html#a6724fe657aabaee156551628cd4f2db6">offset_noise_init</a>(offnoiseptr);</div><div class="line"><a name="l00849"></a><span class="lineno"> 849</span> </div><div class="line"><a name="l00850"></a><span class="lineno"> 850</span>  cntr++;</div><div class="line"><a name="l00851"></a><span class="lineno"> 851</span> </div><div class="line"><a name="l00852"></a><span class="lineno"> 852</span>  <span class="comment">/* Store Accel samples and calculate sum for configured N */</span></div><div class="line"><a name="l00853"></a><span class="lineno"> 853</span>  <span class="keywordflow">if</span>(cntr < <a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>)</div><div class="line"><a name="l00854"></a><span class="lineno"> 854</span>  {</div><div class="line"><a name="l00855"></a><span class="lineno"> 855</span>  am[0]=rawData-><a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[0]*sens;</div><div class="line"><a name="l00856"></a><span class="lineno"> 856</span>  am[1]=rawData-><a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[1]*sens;</div><div class="line"><a name="l00857"></a><span class="lineno"> 857</span>  am[2]=rawData-><a class="code" href="a02047.html#a661660001effc417fb684db96e973688">accel</a>[2]*sens;</div><div class="line"><a name="l00858"></a><span class="lineno"> 858</span>  xx[k]=am[0];</div><div class="line"><a name="l00859"></a><span class="lineno"> 859</span>  yy[k]=am[1];</div><div class="line"><a name="l00860"></a><span class="lineno"> 860</span>  zz[k]=am[2];</div><div class="line"><a name="l00861"></a><span class="lineno"> 861</span>  sumx+=am[0];</div><div class="line"><a name="l00862"></a><span class="lineno"> 862</span>  sumy+=am[1];</div><div class="line"><a name="l00863"></a><span class="lineno"> 863</span>  sumz+=am[2];</div><div class="line"><a name="l00864"></a><span class="lineno"> 864</span>  k+=1;</div><div class="line"><a name="l00865"></a><span class="lineno"> 865</span>  offnoiseptr-><a class="code" href="a03843.html#a2c6a1c23cc6973125141cd73769dd5e5">complete_accel_offnoise</a> = 0;</div><div class="line"><a name="l00866"></a><span class="lineno"> 866</span>  }</div><div class="line"><a name="l00867"></a><span class="lineno"> 867</span> </div><div class="line"><a name="l00868"></a><span class="lineno"> 868</span>  <span class="comment">/* Measure offset and RMS */</span></div><div class="line"><a name="l00869"></a><span class="lineno"> 869</span>  <span class="keywordflow">if</span>(cntr == <a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>)</div><div class="line"><a name="l00870"></a><span class="lineno"> 870</span>  {</div><div class="line"><a name="l00871"></a><span class="lineno"> 871</span>  <span class="comment">/* Measure average */</span></div><div class="line"><a name="l00872"></a><span class="lineno"> 872</span>  sumx=sumx/(<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>-1);</div><div class="line"><a name="l00873"></a><span class="lineno"> 873</span>  sumy=sumy/(<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>-1);</div><div class="line"><a name="l00874"></a><span class="lineno"> 874</span>  sumz=sumz/(<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>-1);</div><div class="line"><a name="l00875"></a><span class="lineno"> 875</span> </div><div class="line"><a name="l00876"></a><span class="lineno"> 876</span>  <span class="comment">/* Measure offset */</span></div><div class="line"><a name="l00877"></a><span class="lineno"> 877</span>  offnoiseptr-><a class="code" href="a03843.html#a095cf332a6632b68d181f35bda318f5b">offx</a>=0-sumx;</div><div class="line"><a name="l00878"></a><span class="lineno"> 878</span>  offnoiseptr-><a class="code" href="a03843.html#af01b0ac6ab1d631dd5da23e55a855bd5">offy</a>=0-sumy;</div><div class="line"><a name="l00879"></a><span class="lineno"> 879</span>  offnoiseptr-><a class="code" href="a03843.html#a176534e2df647e63538839e08e2987ed">offz</a>=1-sumz;</div><div class="line"><a name="l00880"></a><span class="lineno"> 880</span> </div><div class="line"><a name="l00881"></a><span class="lineno"> 881</span>  <span class="comment">/* Measure standard deviation */</span></div><div class="line"><a name="l00882"></a><span class="lineno"> 882</span>  <span class="keywordflow">for</span>(j=0; j<<a class="code" href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a>-1; j++)</div><div class="line"><a name="l00883"></a><span class="lineno"> 883</span>  {</div><div class="line"><a name="l00884"></a><span class="lineno"> 884</span>  xm[j]=xx[j]-sumx;</div><div class="line"><a name="l00885"></a><span class="lineno"> 885</span>  ym[j]=yy[j]-sumy;</div><div class="line"><a name="l00886"></a><span class="lineno"> 886</span>  zm[j]=zz[j]-sumz;</div><div class="line"><a name="l00887"></a><span class="lineno"> 887</span> </div><div class="line"><a name="l00888"></a><span class="lineno"> 888</span>  xsq[j]=(float)pow(xm[j],2);</div><div class="line"><a name="l00889"></a><span class="lineno"> 889</span>  ysq[j]=(float)pow(ym[j],2);</div><div class="line"><a name="l00890"></a><span class="lineno"> 890</span>  zsq[j]=(float)pow(zm[j],2);</div><div class="line"><a name="l00891"></a><span class="lineno"> 891</span>  stdx+=xsq[j];</div><div class="line"><a name="l00892"></a><span class="lineno"> 892</span>  stdy+=ysq[j];</div><div class="line"><a name="l00893"></a><span class="lineno"> 893</span>  stdz+=zsq[j];</div><div class="line"><a name="l00894"></a><span class="lineno"> 894</span>  }</div><div class="line"><a name="l00895"></a><span class="lineno"> 895</span>  stdx=stdx/(N-2);</div><div class="line"><a name="l00896"></a><span class="lineno"> 896</span>  stdy=stdy/(N-2);</div><div class="line"><a name="l00897"></a><span class="lineno"> 897</span>  stdz=stdz/(N-2);</div><div class="line"><a name="l00898"></a><span class="lineno"> 898</span> </div><div class="line"><a name="l00899"></a><span class="lineno"> 899</span>  <span class="comment">/* Measure RMS */</span></div><div class="line"><a name="l00900"></a><span class="lineno"> 900</span>  offnoiseptr-><a class="code" href="a03843.html#a495a615081e1d215673d7c7f9a7f1b4d">rmsx</a>=(float)pow(stdx,0.5);</div><div class="line"><a name="l00901"></a><span class="lineno"> 901</span>  offnoiseptr-><a class="code" href="a03843.html#a9cf6d0f93a0b3f226d25bc3e33ce4e66">rmsy</a>=(float)pow(stdy,0.5);</div><div class="line"><a name="l00902"></a><span class="lineno"> 902</span>  offnoiseptr-><a class="code" href="a03843.html#a96b237aa78c72cadbbc09578d19e68e9">rmsz</a>=(float)pow(stdz,0.5);</div><div class="line"><a name="l00903"></a><span class="lineno"> 903</span> </div><div class="line"><a name="l00904"></a><span class="lineno"> 904</span>  <span class="comment">/* Set the completion flag */</span></div><div class="line"><a name="l00905"></a><span class="lineno"> 905</span>  offnoiseptr-><a class="code" href="a03843.html#a2c6a1c23cc6973125141cd73769dd5e5">complete_accel_offnoise</a> = 1;</div><div class="line"><a name="l00906"></a><span class="lineno"> 906</span> </div><div class="line"><a name="l00907"></a><span class="lineno"> 907</span>  <span class="comment">/* Reset local storage */</span></div><div class="line"><a name="l00908"></a><span class="lineno"> 908</span>  cntr = k = 0;</div><div class="line"><a name="l00909"></a><span class="lineno"> 909</span>  sumx = sumy = sumz = 0;</div><div class="line"><a name="l00910"></a><span class="lineno"> 910</span>  stdx = stdy = stdz = 0;</div><div class="line"><a name="l00911"></a><span class="lineno"> 911</span>  }</div><div class="line"><a name="l00912"></a><span class="lineno"> 912</span> }</div><div class="line"><a name="l00913"></a><span class="lineno"> 913</span> <span class="comment"></span></div><div class="line"><a name="l00914"></a><span class="lineno"> 914</span> <span class="comment">/*!</span></div><div class="line"><a name="l00915"></a><span class="lineno"> 915</span> <span class="comment"> * @brief Initialize Offset-Noise Variables</span></div><div class="line"><a name="l00916"></a><span class="lineno"> 916</span> <span class="comment"> */</span></div><div class="line"><a name="l00917"></a><span class="lineno"><a class="line" href="a00359.html#a33e1e7f2a4d3b74a7bf5ca94132f6743"> 917</a></span> <span class="keywordtype">void</span> <a class="code" href="a00359.html#a33e1e7f2a4d3b74a7bf5ca94132f6743">selftest_init</a>(<a class="code" href="a03847.html">fxls896x_selftest_t</a> *selftest)</div><div class="line"><a name="l00918"></a><span class="lineno"> 918</span> {</div><div class="line"><a name="l00919"></a><span class="lineno"> 919</span>  selftest-><a class="code" href="a03847.html#a6dab3981edbf72d2d26f0087d3bc054c">x_stoc</a> = 0;</div><div class="line"><a name="l00920"></a><span class="lineno"> 920</span>  selftest-><a class="code" href="a03847.html#ac428ce390ec19d8bf1bc721fb9cebed9">y_stoc</a> = 0;</div><div class="line"><a name="l00921"></a><span class="lineno"> 921</span>  selftest-><a class="code" href="a03847.html#abfc53f1d438485ab374da9f4b72bb6f3">z_stoc</a> = 0;</div><div class="line"><a name="l00922"></a><span class="lineno"> 922</span>  selftest-><a class="code" href="a03847.html#a65004a5aeeb2772f1cb19bfcb37fe15d">x_stof</a> = 0;</div><div class="line"><a name="l00923"></a><span class="lineno"> 923</span>  selftest-><a class="code" href="a03847.html#ab2f66ecbf46ffffe0ea054892f2facc5">y_stof</a> = 0;</div><div class="line"><a name="l00924"></a><span class="lineno"> 924</span>  selftest-><a class="code" href="a03847.html#ac498c729b448a4be99ce02240f812914">z_stof</a> = 0;</div><div class="line"><a name="l00925"></a><span class="lineno"> 925</span>  selftest-><a class="code" href="a03847.html#a48d808b0104a033061d1a750d3a3f7f8">complete_selftest</a> = 0;</div><div class="line"><a name="l00926"></a><span class="lineno"> 926</span> }</div><div class="line"><a name="l00927"></a><span class="lineno"> 927</span> </div><div class="line"><a name="l00928"></a><span class="lineno"> 928</span> </div><div class="line"><a name="l00929"></a><span class="lineno"><a class="line" href="a00359.html#ab7a328885ef232a1bba728b4289b8802"> 929</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#ab7a328885ef232a1bba728b4289b8802">perform_selftest</a>(<a class="code" href="a02043.html">fxls896x_i2c_sensorhandle_t</a> fxls896xDriver, <a class="code" href="a03847.html">fxls896x_selftest_t</a> *selftest)</div><div class="line"><a name="l00930"></a><span class="lineno"> 930</span> {</div><div class="line"><a name="l00931"></a><span class="lineno"> 931</span>  <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="l00932"></a><span class="lineno"> 932</span> </div><div class="line"><a name="l00933"></a><span class="lineno"> 933</span>  <a class="code" href="a00359.html#aae90d1d0f77fce4ac9dc55e071f04b97">axis</a>=0;</div><div class="line"><a name="l00934"></a><span class="lineno"> 934</span> </div><div class="line"><a name="l00935"></a><span class="lineno"> 935</span>  <span class="comment">/* Initialize self-test parameters */</span></div><div class="line"><a name="l00936"></a><span class="lineno"> 936</span>  <a class="code" href="a00359.html#a33e1e7f2a4d3b74a7bf5ca94132f6743">selftest_init</a>(selftest);</div><div class="line"><a name="l00937"></a><span class="lineno"> 937</span> </div><div class="line"><a name="l00938"></a><span class="lineno"> 938</span>  <span class="keywordflow">while</span> (<a class="code" href="a00359.html#aae90d1d0f77fce4ac9dc55e071f04b97">axis</a><6)</div><div class="line"><a name="l00939"></a><span class="lineno"> 939</span>  {</div><div class="line"><a name="l00940"></a><span class="lineno"> 940</span> </div><div class="line"><a name="l00941"></a><span class="lineno"> 941</span>  <span class="keywordflow">switch</span>(<a class="code" href="a00359.html#aae90d1d0f77fce4ac9dc55e071f04b97">axis</a>)</div><div class="line"><a name="l00942"></a><span class="lineno"> 942</span>  {</div><div class="line"><a name="l00943"></a><span class="lineno"> 943</span>  <span class="keywordflow">case</span> 0:status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, cFxls896xSTXP);<span class="keywordflow">break</span>;</div><div class="line"><a name="l00944"></a><span class="lineno"> 944</span>  <span class="keywordflow">case</span> 1:status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, cFxls896xSTXN);<span class="keywordflow">break</span>;</div><div class="line"><a name="l00945"></a><span class="lineno"> 945</span>  <span class="keywordflow">case</span> 2:status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, cFxls896xSTYP);<span class="keywordflow">break</span>;</div><div class="line"><a name="l00946"></a><span class="lineno"> 946</span>  <span class="keywordflow">case</span> 3:status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, cFxls896xSTYN);<span class="keywordflow">break</span>;</div><div class="line"><a name="l00947"></a><span class="lineno"> 947</span>  <span class="keywordflow">case</span> 4:status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, cFxls896xSTZP);<span class="keywordflow">break</span>;</div><div class="line"><a name="l00948"></a><span class="lineno"> 948</span>  <span class="keywordflow">case</span> 5:status = <a class="code" href="a00065.html#adc8ae229a44c0a20d100948b37627f55">FXLS896x_I2C_Configure</a>(&fxls896xDriver, cFxls896xSTZN);<span class="keywordflow">break</span>;</div><div class="line"><a name="l00949"></a><span class="lineno"> 949</span>  <span class="keywordflow">default</span>:<span class="keywordflow">break</span>;</div><div class="line"><a name="l00950"></a><span class="lineno"> 950</span>  }</div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span> </div><div class="line"><a name="l00952"></a><span class="lineno"> 952</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00953"></a><span class="lineno"> 953</span>  {</div><div class="line"><a name="l00954"></a><span class="lineno"> 954</span>  <span class="keywordflow">return</span> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00955"></a><span class="lineno"> 955</span>  }</div><div class="line"><a name="l00956"></a><span class="lineno"> 956</span> </div><div class="line"><a name="l00957"></a><span class="lineno"> 957</span>  <span class="keywordtype">int</span> counter =0;</div><div class="line"><a name="l00958"></a><span class="lineno"> 958</span>  <span class="keywordflow">for</span>(counter=0;counter<1;counter++)</div><div class="line"><a name="l00959"></a><span class="lineno"> 959</span>  {</div><div class="line"><a name="l00960"></a><span class="lineno"> 960</span> </div><div class="line"><a name="l00961"></a><span class="lineno"> 961</span>  <span class="comment">// In ISR Mode we do not need to check Data Ready Register.</span></div><div class="line"><a name="l00962"></a><span class="lineno"> 962</span>  <span class="comment">// The receipt of interrupt will indicate data is ready.</span></div><div class="line"><a name="l00963"></a><span class="lineno"> 963</span>  <a class="code" href="a03855.html">RAW_DATA</a> data_ = {0x00};</div><div class="line"><a name="l00964"></a><span class="lineno"> 964</span>  <span class="keywordflow">while</span>(<span class="keyword">false</span> == <a class="code" href="a00359.html#abed21723f86be731e66be8868a8732b4">bFxls896xIntFlag</a>)</div><div class="line"><a name="l00965"></a><span class="lineno"> 965</span>  {</div><div class="line"><a name="l00966"></a><span class="lineno"> 966</span> </div><div class="line"><a name="l00967"></a><span class="lineno"> 967</span>  }</div><div class="line"><a name="l00968"></a><span class="lineno"> 968</span> <span class="comment"></span></div><div class="line"><a name="l00969"></a><span class="lineno"> 969</span> <span class="comment"> /*! Set device to Standby mode. */</span></div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span>  <a class="code" href="a00167.html#ad08d2c7880bc5f09fd27eee247311448">Register_I2C_Write</a>(&<a class="code" href="a04343.html#ad6a14737695a4218d07182b86b21f570">I2C_S_DRIVER</a>,&(fxls896xDriver.<a class="code" href="a02043.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>),<a class="code" href="a04088.html#a8cdfe997dc1391190e45084feb03ffa5">FXLS896x_I2C_ADDR</a>, <a class="code" href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a4ab130b463cf1a18e1aae842db295de1">FXLS896x_SENS_CONFIG1</a>,0x00,0x00,0x00);</div><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00972"></a><span class="lineno"> 972</span>  {</div><div class="line"><a name="l00973"></a><span class="lineno"> 973</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acae2a1d27a0c4405ab02566a7fc618d193">SENSOR_ERROR_WRITE</a>;</div><div class="line"><a name="l00974"></a><span class="lineno"> 974</span>  }</div><div class="line"><a name="l00975"></a><span class="lineno"> 975</span> </div><div class="line"><a name="l00976"></a><span class="lineno"> 976</span> </div><div class="line"><a name="l00977"></a><span class="lineno"> 977</span>  <a class="code" href="a00359.html#abed21723f86be731e66be8868a8732b4">bFxls896xIntFlag</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00978"></a><span class="lineno"> 978</span>  <span class="comment">//pGpioDriver->toggle_pin(&RED_LED);</span></div><div class="line"><a name="l00979"></a><span class="lineno"> 979</span> <span class="comment"></span></div><div class="line"><a name="l00980"></a><span class="lineno"> 980</span> <span class="comment"> /*! Read new raw sensor data from the FXLS896x. */</span></div><div class="line"><a name="l00981"></a><span class="lineno"> 981</span>  status = <a class="code" href="a00065.html#ad01e593a8d907f415e370c4dbb8b85c6">FXLS896x_I2C_ReadData</a>(&fxls896xDriver, cFxls896xOutputNormal, &data_.<a class="code" href="a03855.html#ad45402f947ba7d432250ff3a8d5feebc">byte_data</a>[0]);</div><div class="line"><a name="l00982"></a><span class="lineno"> 982</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00983"></a><span class="lineno"> 983</span>  { <span class="comment">/* Read did not work, so loop. */</span></div><div class="line"><a name="l00984"></a><span class="lineno"> 984</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00985"></a><span class="lineno"> 985</span>  }</div><div class="line"><a name="l00986"></a><span class="lineno"> 986</span> </div><div class="line"><a name="l00987"></a><span class="lineno"> 987</span>  <span class="comment">/* store the self-test values for each axis & for each polarity*/</span></div><div class="line"><a name="l00988"></a><span class="lineno"> 988</span>  <span class="keywordflow">switch</span>(<a class="code" href="a00359.html#aae90d1d0f77fce4ac9dc55e071f04b97">axis</a>)</div><div class="line"><a name="l00989"></a><span class="lineno"> 989</span>  {</div><div class="line"><a name="l00990"></a><span class="lineno"> 990</span>  <span class="keywordflow">case</span> 0: <a class="code" href="a00359.html#a25d26f00322a223c03a97e979526334c">XSTP</a>[counter]= data_.<a class="code" href="a03855.html#aafebae50b85a100d669b2a8d3ec7c0fe">dat</a>.<a class="code" href="a03851.html#a45b8a0f4fa327e4e49a6487cf73ec258">xdata</a>;<span class="keywordflow">break</span>;</div><div class="line"><a name="l00991"></a><span class="lineno"> 991</span>  <span class="keywordflow">case</span> 1: <a class="code" href="a00359.html#aa85abdbcaf058baebd134eba2a8a28de">XSTN</a>[counter]= data_.<a class="code" href="a03855.html#aafebae50b85a100d669b2a8d3ec7c0fe">dat</a>.<a class="code" href="a03851.html#a45b8a0f4fa327e4e49a6487cf73ec258">xdata</a>;<span class="keywordflow">break</span>;</div><div class="line"><a name="l00992"></a><span class="lineno"> 992</span>  <span class="keywordflow">case</span> 2: <a class="code" href="a00359.html#a5dc6c4717d01d664bf34e640ac8baa84">YSTP</a>[counter]= data_.<a class="code" href="a03855.html#aafebae50b85a100d669b2a8d3ec7c0fe">dat</a>.<a class="code" href="a03851.html#aaac0aff331dd526e38fcc8cf50f738a5">ydata</a>;<span class="keywordflow">break</span>;</div><div class="line"><a name="l00993"></a><span class="lineno"> 993</span>  <span class="keywordflow">case</span> 3: <a class="code" href="a00359.html#afe41430ebe7135f3297c0c6cbe9b122c">YSTN</a>[counter]= data_.<a class="code" href="a03855.html#aafebae50b85a100d669b2a8d3ec7c0fe">dat</a>.<a class="code" href="a03851.html#aaac0aff331dd526e38fcc8cf50f738a5">ydata</a>;<span class="keywordflow">break</span>;</div><div class="line"><a name="l00994"></a><span class="lineno"> 994</span>  <span class="keywordflow">case</span> 4: <a class="code" href="a00359.html#a9aad2156b5de8c3f4e79f3bf5828dfe5">ZSTP</a>[counter]= data_.<a class="code" href="a03855.html#aafebae50b85a100d669b2a8d3ec7c0fe">dat</a>.<a class="code" href="a03851.html#a661415db092af90759ee4c4f3515051f">zdata</a>;<span class="keywordflow">break</span>;</div><div class="line"><a name="l00995"></a><span class="lineno"> 995</span>  <span class="keywordflow">case</span> 5: <a class="code" href="a00359.html#a3a4bfaecc864019458f930517d2f64d9">ZSTN</a>[counter]= data_.<a class="code" href="a03855.html#aafebae50b85a100d669b2a8d3ec7c0fe">dat</a>.<a class="code" href="a03851.html#a661415db092af90759ee4c4f3515051f">zdata</a>;<span class="keywordflow">break</span>;</div><div class="line"><a name="l00996"></a><span class="lineno"> 996</span>  <span class="keywordflow">default</span>:<span class="keywordflow">break</span>;</div><div class="line"><a name="l00997"></a><span class="lineno"> 997</span>  }</div><div class="line"><a name="l00998"></a><span class="lineno"> 998</span> </div><div class="line"><a name="l00999"></a><span class="lineno"> 999</span>  }</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span> </div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>  <a class="code" href="a00530.html#ab052b802081fd87e1bda8d56e2c0db42">BOARD_DELAY_ms</a>(1000);</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>  <a class="code" href="a00359.html#aae90d1d0f77fce4ac9dc55e071f04b97">axis</a>++;</div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>  }</div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span> </div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>  <span class="comment">/* compute self-test output change*/</span></div><div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>  selftest-><a class="code" href="a03847.html#a6dab3981edbf72d2d26f0087d3bc054c">x_stoc</a>=(<a class="code" href="a00359.html#a25d26f00322a223c03a97e979526334c">XSTP</a>[0]-<a class="code" href="a00359.html#aa85abdbcaf058baebd134eba2a8a28de">XSTN</a>[0])/2;</div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>  selftest-><a class="code" href="a03847.html#ac428ce390ec19d8bf1bc721fb9cebed9">y_stoc</a>=(<a class="code" href="a00359.html#a5dc6c4717d01d664bf34e640ac8baa84">YSTP</a>[0]-<a class="code" href="a00359.html#afe41430ebe7135f3297c0c6cbe9b122c">YSTN</a>[0])/2;</div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>  selftest-><a class="code" href="a03847.html#abfc53f1d438485ab374da9f4b72bb6f3">z_stoc</a>=(<a class="code" href="a00359.html#a9aad2156b5de8c3f4e79f3bf5828dfe5">ZSTP</a>[0]-<a class="code" href="a00359.html#a3a4bfaecc864019458f930517d2f64d9">ZSTN</a>[0])/2;</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span> </div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>  <span class="comment">/* compute self-test offset*/</span></div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>  selftest-><a class="code" href="a03847.html#a65004a5aeeb2772f1cb19bfcb37fe15d">x_stof</a>=(<a class="code" href="a00359.html#a25d26f00322a223c03a97e979526334c">XSTP</a>[0]+<a class="code" href="a00359.html#aa85abdbcaf058baebd134eba2a8a28de">XSTN</a>[0])/2;</div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>  selftest-><a class="code" href="a03847.html#ab2f66ecbf46ffffe0ea054892f2facc5">y_stof</a>=(<a class="code" href="a00359.html#a5dc6c4717d01d664bf34e640ac8baa84">YSTP</a>[0]+<a class="code" href="a00359.html#afe41430ebe7135f3297c0c6cbe9b122c">YSTN</a>[0])/2;</div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>  selftest-><a class="code" href="a03847.html#ac498c729b448a4be99ce02240f812914">z_stof</a>=(<a class="code" href="a00359.html#a9aad2156b5de8c3f4e79f3bf5828dfe5">ZSTP</a>[0]+<a class="code" href="a00359.html#a3a4bfaecc864019458f930517d2f64d9">ZSTN</a>[0])/2;</div><div class="line"><a name="l01014"></a><span class="lineno"> 1014</span> </div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>  selftest-><a class="code" href="a03847.html#a48d808b0104a033061d1a750d3a3f7f8">complete_selftest</a> = 1;</div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a>;</div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span> }</div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span> <span class="comment"></span></div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span> <span class="comment">/*!</span></div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span> <span class="comment"> * @brief UART Module initialization (UART is a the standard block included e.g. in K22F)</span></div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span> <span class="comment"> */</span></div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span> <span class="keyword">static</span> <span class="keywordtype">void</span> init_freemaster_uart(<span class="keywordtype">void</span>)</div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span> {</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>  uart_config_t config;</div><div class="line"><a name="l01025"></a><span class="lineno"> 1025</span> </div><div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>  <span class="comment">/*</span></div><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span> <span class="comment"> * config.baudRate_Bps = 115200U;</span></div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span> <span class="comment"> * config.parityMode = kUART_ParityDisabled;</span></div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span> <span class="comment"> * config.stopBitCount = kUART_OneStopBit;</span></div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span> <span class="comment"> * config.txFifoWatermark = 0;</span></div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span> <span class="comment"> * config.rxFifoWatermark = 1;</span></div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span> <span class="comment"> * config.enableTx = false;</span></div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span> <span class="comment"> * config.enableRx = false;</span></div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span> <span class="comment"> */</span></div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>  UART_GetDefaultConfig(&config);</div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>  config.baudRate_Bps = 115200U;</div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>  config.enableTx = <span class="keyword">false</span>;</div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>  config.enableRx = <span class="keyword">false</span>;</div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span> </div><div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>  UART_Init((UART_Type*)<a class="code" href="a04166.html#aa57459420fa9e4f0a5f3fc5f57f1b9e8">BOARD_DEBUG_UART_BASEADDR</a>, &config, <a class="code" href="a04166.html#a1edec5fed9dc97a37f9ddf9c8409f6b2">BOARD_DEBUG_UART_CLK_FREQ</a>);</div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span> </div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>  <span class="comment">/* Register communication module used by FreeMASTER driver. */</span></div><div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>  FMSTR_SerialSetBaseAddress((UART_Type*)BOARD_DEBUG_UART_BASEADDR);</div><div class="line"><a name="l01044"></a><span class="lineno"> 1044</span> </div><div class="line"><a name="l01045"></a><span class="lineno"> 1045</span> <span class="preprocessor">#if FMSTR_SHORT_INTR || FMSTR_LONG_INTR</span></div><div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>  <span class="comment">/* Enable UART interrupts. */</span></div><div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>  EnableIRQ(<a class="code" href="a04166.html#a66aae8dca2a3ed9516953924c8d10021">BOARD_UART_IRQ</a>);</div><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>  EnableGlobalIRQ(0);</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span> }</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span> </div><div class="line"><a name="l01052"></a><span class="lineno"> 1052</span> <span class="preprocessor">#if FMSTR_SHORT_INTR || FMSTR_LONG_INTR</span></div><div class="line"><a name="l01053"></a><span class="lineno"> 1053</span> <span class="comment">/*</span></div><div class="line"><a name="l01054"></a><span class="lineno"> 1054</span> <span class="comment">* Application interrupt handler of communication peripheral used in interrupt modes</span></div><div class="line"><a name="l01055"></a><span class="lineno"> 1055</span> <span class="comment">* of FreeMASTER communication.</span></div><div class="line"><a name="l01056"></a><span class="lineno"> 1056</span> <span class="comment">*</span></div><div class="line"><a name="l01057"></a><span class="lineno"> 1057</span> <span class="comment">* NXP MCUXpresso SDK framework defines interrupt vector table as a part of "startup_XXXXXX.x"</span></div><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span> <span class="comment">* assembler/C file. The table points to weakly defined symbols, which may be overwritten by the</span></div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span> <span class="comment">* application specific implementation. FreeMASTER overrides the original weak definition and</span></div><div class="line"><a name="l01060"></a><span class="lineno"> 1060</span> <span class="comment">* redirects the call to its own handler.</span></div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span> <span class="comment">*</span></div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span> <span class="comment">*/</span></div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span> </div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span> <span class="keywordtype">void</span> <a class="code" href="a04166.html#ab18f02e5df161de4fb61d2d6a735fd62">BOARD_UART_IRQ_HANDLER</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l01065"></a><span class="lineno"> 1065</span> {</div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>  <span class="comment">/* Call FreeMASTER Interrupt routine handler */</span></div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>  FMSTR_SerialIsr();</div><div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>  <span class="comment">/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping</span></div><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span> <span class="comment"> exception return operation might vector to incorrect interrupt */</span></div><div class="line"><a name="l01070"></a><span class="lineno"> 1070</span> <span class="preprocessor">#if defined __CORTEX_M && (__CORTEX_M == 4U)</span></div><div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>  __DSB();</div><div class="line"><a name="l01072"></a><span class="lineno"> 1072</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l01073"></a><span class="lineno"> 1073</span> }</div><div class="line"><a name="l01074"></a><span class="lineno"> 1074</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l01075"></a><span class="lineno"> 1075</span> </div><div class="ttc" id="a00359_html_a157c430197a92d368847129ccf7f526e"><div class="ttname"><a href="a00359.html#a157c430197a92d368847129ccf7f526e">cFXLS896x_whoami</a></div><div class="ttdeci">const registerreadlist_t cFXLS896x_whoami[]</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00137">fxls896xaf_freemaster_demo.c:137</a></div></div> 52<div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5acae2a1d27a0c4405ab02566a7fc618d193"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acae2a1d27a0c4405ab02566a7fc618d193">SENSOR_ERROR_WRITE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00037">sensor_drv.h:37</a></div></div> 53<div class="ttc" id="a00359_html_a3a4bfaecc864019458f930517d2f64d9"><div class="ttname"><a href="a00359.html#a3a4bfaecc864019458f930517d2f64d9">ZSTN</a></div><div class="ttdeci">int16_t ZSTN[2]</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00254">fxls896xaf_freemaster_demo.c:254</a></div></div> 54<div class="ttc" id="a00359_html_a02a7f812c6f2feab3aa25c1a34e3322b"><div class="ttname"><a href="a00359.html#a02a7f812c6f2feab3aa25c1a34e3322b">recVar</a></div><div class="ttdeci">FMSTR_REC_VAR recVar</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00245">fxls896xaf_freemaster_demo.c:245</a></div></div> 55<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1aaa1c118459c7da84fdb5a43c45585e5d"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1aaa1c118459c7da84fdb5a43c45585e5d">FXLS896x_OUT_X_LSB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00031">fxls896x.h:31</a></div></div> 56<div class="ttc" id="a00359_html_ab7a328885ef232a1bba728b4289b8802"><div class="ttname"><a href="a00359.html#ab7a328885ef232a1bba728b4289b8802">perform_selftest</a></div><div class="ttdeci">int32_t perform_selftest(fxls896x_i2c_sensorhandle_t fxls896xDriver, fxls896x_selftest_t *selftest)</div><div class="ttdoc">Function to perform FXLS896x self test. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00929">fxls896xaf_freemaster_demo.c:929</a></div></div> 57<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> 58<div class="ttc" id="a03847_html_a65004a5aeeb2772f1cb19bfcb37fe15d"><div class="ttname"><a href="a03847.html#a65004a5aeeb2772f1cb19bfcb37fe15d">fxls896x_selftest_t::x_stof</a></div><div class="ttdeci">int16_t x_stof</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00199">fxls8962_freemaster_demo.c:199</a></div></div> 59<div class="ttc" id="a00359_html_a55b6d038f2e5dd77a328811e201ddfd3"><div class="ttname"><a href="a00359.html#a55b6d038f2e5dd77a328811e201ddfd3">fxls896x_operation_type_t</a></div><div class="ttdeci">enum fxls896x_operation_type fxls896x_operation_type_t</div><div class="ttdoc">This structure defines the fxls896x host operation type. </div></div> 60<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> 61<div class="ttc" id="a03839_html_a96995c8df2aa66256c07ed09638a251c"><div class="ttname"><a href="a03839.html#a96995c8df2aa66256c07ed09638a251c">fxls896x_allregs_t::read_value</a></div><div class="ttdeci">uint8_t read_value</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00158">fxls8962_freemaster_demo.c:158</a></div></div> 62<div class="ttc" id="a00062_html_a8b138f818acb28f323be8cf04addd4d3"><div class="ttname"><a href="a00062.html#a8b138f818acb28f323be8cf04addd4d3">FXLS896x_SENS_CONFIG2_ANIC_TEMP_EN</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG2_ANIC_TEMP_EN</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00521">fxls896x.h:521</a></div></div> 63<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> 64<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> 65<div class="ttc" id="a03839_html_aa9fff43968831437a312428836cab362"><div class="ttname"><a href="a03839.html#aa9fff43968831437a312428836cab362">fxls896x_allregs_t::offset</a></div><div class="ttdeci">uint8_t offset</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00154">fxls8962_freemaster_demo.c:154</a></div></div> 66<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> 67<div class="ttc" id="a00359_html_a05b1ee83bf8f0e4f3d8ddcd5b6bdcf89"><div class="ttname"><a href="a00359.html#a05b1ee83bf8f0e4f3d8ddcd5b6bdcf89">ACCEL_8G_SENS</a></div><div class="ttdeci">#define ACCEL_8G_SENS</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00053">fxls896xaf_freemaster_demo.c:53</a></div></div> 68<div class="ttc" id="a00359_html_a18423c8efe9d6bc4b29f654298765930"><div class="ttname"><a href="a00359.html#a18423c8efe9d6bc4b29f654298765930">cFXLS896x_fs_src</a></div><div class="ttdeci">const registerreadlist_t cFXLS896x_fs_src[]</div><div class="ttdoc">Prepare the register read for FullScale range Register. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00145">fxls896xaf_freemaster_demo.c:145</a></div></div> 69<div class="ttc" id="a03851_html_aaac0aff331dd526e38fcc8cf50f738a5"><div class="ttname"><a href="a03851.html#aaac0aff331dd526e38fcc8cf50f738a5">sensor_data::ydata</a></div><div class="ttdeci">int16_t ydata</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00209">fxls8962_freemaster_demo.c:209</a></div></div> 70<div class="ttc" id="a03847_html_abfc53f1d438485ab374da9f4b72bb6f3"><div class="ttname"><a href="a03847.html#abfc53f1d438485ab374da9f4b72bb6f3">fxls896x_selftest_t::z_stoc</a></div><div class="ttdeci">int16_t z_stoc</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00198">fxls8962_freemaster_demo.c:198</a></div></div> 71<div class="ttc" id="a03839_html_a82c780845e3a97eb59ddbf29c68989a8"><div class="ttname"><a href="a03839.html#a82c780845e3a97eb59ddbf29c68989a8">fxls896x_allregs_t::dataready_cntr</a></div><div class="ttdeci">uint8_t dataready_cntr</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00174">fxls8962_freemaster_demo.c:174</a></div></div> 72<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> 73<div class="ttc" id="a03851_html_a661415db092af90759ee4c4f3515051f"><div class="ttname"><a href="a03851.html#a661415db092af90759ee4c4f3515051f">sensor_data::zdata</a></div><div class="ttdeci">int16_t zdata</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00210">fxls8962_freemaster_demo.c:210</a></div></div> 74<div class="ttc" id="a00062_html_a21503192b42209cdfa1f6af8320aad45"><div class="ttname"><a href="a00062.html#a21503192b42209cdfa1f6af8320aad45">FXLS896x_SENS_CONFIG3_WAKE_ODR_12_5HZ</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG3_WAKE_ODR_12_5HZ</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00565">fxls896x.h:565</a></div></div> 75<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> 76<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> 77<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> 78<div class="ttc" id="a00359_html_a3e75d7cfb5c37c636f1408b8c88233e4"><div class="ttname"><a href="a00359.html#a3e75d7cfb5c37c636f1408b8c88233e4">cFxls896xSTXN</a></div><div class="ttdeci">const registerwritelist_t cFxls896xSTXN[]</div><div class="ttdoc">Register settings for Self-Test in X Axis (Negative polarity). </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00094">fxls896xaf_freemaster_demo.c:94</a></div></div> 79<div class="ttc" id="a00359_html_abe10602a509294f3dd2e11a445fdefa2a8ea6cd4b2126d70e1faf58be1e96cd21"><div class="ttname"><a href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a8ea6cd4b2126d70e1faf58be1e96cd21">FXLS896x_REG_READ</a></div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00226">fxls896xaf_freemaster_demo.c:226</a></div></div> 80<div class="ttc" id="a00167_html_ad08d2c7880bc5f09fd27eee247311448"><div class="ttname"><a href="a00167.html#ad08d2c7880bc5f09fd27eee247311448">Register_I2C_Write</a></div><div class="ttdeci">int32_t Register_I2C_Write(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, uint8_t offset, uint8_t value, uint8_t mask, bool repeatedStart)</div><div class="ttdoc">The interface function to write a sensor register. </div><div class="ttdef"><b>Definition:</b> <a href="a00167_source.html#l00193">register_io_i2c.c:193</a></div></div> 81<div class="ttc" id="a03839_html"><div class="ttname"><a href="a03839.html">fxls896x_allregs_t</a></div><div class="ttdoc">This structure defines the fxls896x all registers metadata. </div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00152">fxls8962_freemaster_demo.c:152</a></div></div> 82<div class="ttc" id="a00062_html_aa02ac2e9055ae01605c3dfa9c732c0ab"><div class="ttname"><a href="a00062.html#aa02ac2e9055ae01605c3dfa9c732c0ab">FXLS896x_SENS_CONFIG1_ST_POL_POSITIVE</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_ST_POL_POSITIVE</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00447">fxls896x.h:447</a></div></div> 83<div class="ttc" id="a03839_html_ab20b0c7772544cf5d318507f34231fbe"><div class="ttname"><a href="a03839.html#ab20b0c7772544cf5d318507f34231fbe">fxls896x_allregs_t::timestamp</a></div><div class="ttdeci">uint32_t timestamp</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00180">fxls896xaf_freemaster_demo.c:180</a></div></div> 84<div class="ttc" id="a00530_html_ab052b802081fd87e1bda8d56e2c0db42"><div class="ttname"><a href="a00530.html#ab052b802081fd87e1bda8d56e2c0db42">BOARD_DELAY_ms</a></div><div class="ttdeci">void BOARD_DELAY_ms(uint32_t delay_ms)</div><div class="ttdoc">Function to insert delays. </div><div class="ttdef"><b>Definition:</b> <a href="a00530_source.html#l00081">systick_utils.c:81</a></div></div> 85<div class="ttc" id="a00359_html_a04985d175bb78cb94c9b193af34402fd"><div class="ttname"><a href="a00359.html#a04985d175bb78cb94c9b193af34402fd">recCfg</a></div><div class="ttdeci">FMSTR_REC_CFG recCfg</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00246">fxls896xaf_freemaster_demo.c:246</a></div></div> 86<div class="ttc" id="a03843_html_a2c6a1c23cc6973125141cd73769dd5e5"><div class="ttname"><a href="a03843.html#a2c6a1c23cc6973125141cd73769dd5e5">fxls896x_offset_noise_t::complete_accel_offnoise</a></div><div class="ttdeci">uint8_t complete_accel_offnoise</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00190">fxls8962_freemaster_demo.c:190</a></div></div> 87<div class="ttc" id="a00359_html_a840291bc02cba5474a4cb46a9b9566fe"><div class="ttname"><a href="a00359.html#a840291bc02cba5474a4cb46a9b9566fe">main</a></div><div class="ttdeci">int main(void)</div><div class="ttdoc">Main function. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00423">fxls896xaf_freemaster_demo.c:423</a></div></div> 88<div class="ttc" id="a03855_html_aafebae50b85a100d669b2a8d3ec7c0fe"><div class="ttname"><a href="a03855.html#aafebae50b85a100d669b2a8d3ec7c0fe">rawdata::dat</a></div><div class="ttdeci">sensor_data dat</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00217">fxls8962_freemaster_demo.c:217</a></div></div> 89<div class="ttc" id="a03847_html_ac428ce390ec19d8bf1bc721fb9cebed9"><div class="ttname"><a href="a03847.html#ac428ce390ec19d8bf1bc721fb9cebed9">fxls896x_selftest_t::y_stoc</a></div><div class="ttdeci">int16_t y_stoc</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00197">fxls8962_freemaster_demo.c:197</a></div></div> 90<div class="ttc" id="a00359_html_a44ad95193e45da22e2bd3b1d0fdb1b89"><div class="ttname"><a href="a00359.html#a44ad95193e45da22e2bd3b1d0fdb1b89">apply_register_readall</a></div><div class="ttdeci">int32_t apply_register_readall(fxls896x_i2c_sensorhandle_t fxls896xDriver)</div><div class="ttdoc">Function to apply FXLS896x register read-all operation. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00733">fxls896xaf_freemaster_demo.c:733</a></div></div> 91<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> 92<div class="ttc" id="a00359_html_a1ea66d33b5f8e9fda77f8dd865ef0408"><div class="ttname"><a href="a00359.html#a1ea66d33b5f8e9fda77f8dd865ef0408">MAX8BITSTORAGE</a></div><div class="ttdeci">#define MAX8BITSTORAGE</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00057">fxls896xaf_freemaster_demo.c:57</a></div></div> 93<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> 94<div class="ttc" id="a00359_html_aa85abdbcaf058baebd134eba2a8a28de"><div class="ttname"><a href="a00359.html#aa85abdbcaf058baebd134eba2a8a28de">XSTN</a></div><div class="ttdeci">int16_t XSTN[2]</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00254">fxls896xaf_freemaster_demo.c:254</a></div></div> 95<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> 96<div class="ttc" id="a02043_html_ae75b47fd9e098d6bd3b28f6be6586998"><div class="ttname"><a href="a02043.html#ae75b47fd9e098d6bd3b28f6be6586998">fxls896x_i2c_sensorhandle_t::deviceInfo</a></div><div class="ttdeci">registerDeviceInfo_t deviceInfo</div><div class="ttdef"><b>Definition:</b> <a href="a00068_source.html#l00045">fxls896x_drv.h:45</a></div></div> 97<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> 98<div class="ttc" id="a00359_html_a2e768d76639b21d158bec335dbf5a992"><div class="ttname"><a href="a00359.html#a2e768d76639b21d158bec335dbf5a992">cFxls896xSTZN</a></div><div class="ttdeci">const registerwritelist_t cFxls896xSTZN[]</div><div class="ttdoc">Register settings for Self-Test in Z Axis (Negative polarity). </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00126">fxls896xaf_freemaster_demo.c:126</a></div></div> 99<div class="ttc" id="a00359_html_acdf865d90b909f831131712d39e6f5e6"><div class="ttname"><a href="a00359.html#acdf865d90b909f831131712d39e6f5e6">apply_register_read</a></div><div class="ttdeci">int32_t apply_register_read(fxls896x_i2c_sensorhandle_t fxls896xDriver, uint8_t offset, uint8_t *value)</div><div class="ttdoc">Function to apply FXLS896x register read operation. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00708">fxls896xaf_freemaster_demo.c:708</a></div></div> 100<div class="ttc" id="a00359_html_a6232a93da43a507858e0af5e3d1f01f7"><div class="ttname"><a href="a00359.html#a6232a93da43a507858e0af5e3d1f01f7">cFxls896xOutputNormal</a></div><div class="ttdeci">const registerreadlist_t cFxls896xOutputNormal[]</div><div class="ttdoc">Address of Raw Accel Data in Normal Mode. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00134">fxls896xaf_freemaster_demo.c:134</a></div></div> 101<div class="ttc" id="a00359_html_ab40827f3b6e4ac3980920b66820b1718"><div class="ttname"><a href="a00359.html#ab40827f3b6e4ac3980920b66820b1718">RAW_DATA</a></div><div class="ttdeci">union rawdata RAW_DATA</div></div> 102<div class="ttc" id="a00359_html_a25d26f00322a223c03a97e979526334c"><div class="ttname"><a href="a00359.html#a25d26f00322a223c03a97e979526334c">XSTP</a></div><div class="ttdeci">int16_t XSTP[2]</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00254">fxls896xaf_freemaster_demo.c:254</a></div></div> 103<div class="ttc" id="a03847_html_a48d808b0104a033061d1a750d3a3f7f8"><div class="ttname"><a href="a03847.html#a48d808b0104a033061d1a750d3a3f7f8">fxls896x_selftest_t::complete_selftest</a></div><div class="ttdeci">uint8_t complete_selftest</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00202">fxls8962_freemaster_demo.c:202</a></div></div> 104<div class="ttc" id="a00062_html_aced51c74b8233108164a30a1ba7fe3b7"><div class="ttname"><a href="a00062.html#aced51c74b8233108164a30a1ba7fe3b7">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00432">fxls896x.h:432</a></div></div> 105<div class="ttc" id="a00062_html_a960f4072b72d8e6be90871a2669c8b69"><div class="ttname"><a href="a00062.html#a960f4072b72d8e6be90871a2669c8b69">FXLS896x_SENS_CONFIG1_FSR_16G</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_FSR_16G</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00459">fxls896x.h:459</a></div></div> 106<div class="ttc" id="a00359_html_aa518defbb3f5cd79418b9bc504e74eae"><div class="ttname"><a href="a00359.html#aa518defbb3f5cd79418b9bc504e74eae">cFxls896xSTYP</a></div><div class="ttdeci">const registerwritelist_t cFxls896xSTYP[]</div><div class="ttdoc">Register settings for Self-Test in Y Axis (Positive polarity). </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00102">fxls896xaf_freemaster_demo.c:102</a></div></div> 107<div class="ttc" id="a00359_html_af2e71fcdd968c3370772341a10410fa8"><div class="ttname"><a href="a00359.html#af2e71fcdd968c3370772341a10410fa8">FXLS896x_ALL_REG_READ</a></div><div class="ttdeci">const registerreadlist_t FXLS896x_ALL_REG_READ[]</div><div class="ttdoc">FXLS896x register list to read all registers. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00149">fxls896xaf_freemaster_demo.c:149</a></div></div> 108<div class="ttc" id="a03847_html"><div class="ttname"><a href="a03847.html">fxls896x_selftest_t</a></div><div class="ttdoc">This structure defines variables to compute self-test output change (STOC) and self-test offset (STOF...</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00194">fxls8962_freemaster_demo.c:194</a></div></div> 109<div class="ttc" id="a03843_html_af01b0ac6ab1d631dd5da23e55a855bd5"><div class="ttname"><a href="a03843.html#af01b0ac6ab1d631dd5da23e55a855bd5">fxls896x_offset_noise_t::offy</a></div><div class="ttdeci">float offy</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00185">fxls8962_freemaster_demo.c:185</a></div></div> 110<div class="ttc" id="a00359_html_aae90d1d0f77fce4ac9dc55e071f04b97"><div class="ttname"><a href="a00359.html#aae90d1d0f77fce4ac9dc55e071f04b97">axis</a></div><div class="ttdeci">uint8_t axis</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00252">fxls896xaf_freemaster_demo.c:252</a></div></div> 111<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> 112<div class="ttc" id="a00359_html_a58a93b162ab858a9883f8736178bb6f6"><div class="ttname"><a href="a00359.html#a58a93b162ab858a9883f8736178bb6f6">cFxls896xSTYN</a></div><div class="ttdeci">const registerwritelist_t cFxls896xSTYN[]</div><div class="ttdoc">Register settings for Self-Test in Y Axis (Negative polarity). </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00110">fxls896xaf_freemaster_demo.c:110</a></div></div> 113<div class="ttc" id="a00359_html_ada35b1a82828143d21a8a1faec25ec45"><div class="ttname"><a href="a00359.html#ada35b1a82828143d21a8a1faec25ec45">FXLS896x_DATA_SIZE</a></div><div class="ttdeci">#define FXLS896x_DATA_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00058">fxls896xaf_freemaster_demo.c:58</a></div></div> 114<div class="ttc" id="a04166_html_a1edec5fed9dc97a37f9ddf9c8409f6b2"><div class="ttname"><a href="a04166.html#a1edec5fed9dc97a37f9ddf9c8409f6b2">BOARD_DEBUG_UART_CLK_FREQ</a></div><div class="ttdeci">#define BOARD_DEBUG_UART_CLK_FREQ</div><div class="ttdef"><b>Definition:</b> <a href="a04166_source.html#l00026">board.h:26</a></div></div> 115<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a68baed6c90c4e8e9649cac781309c090"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a68baed6c90c4e8e9649cac781309c090">FXLS896x_WHO_AM_I</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00045">fxls896x.h:45</a></div></div> 116<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> 117<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> 118<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> 119<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1a8665c64ade737b2dd21fdf54d5593718"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1a8665c64ade737b2dd21fdf54d5593718">FXLS896x_SENS_CONFIG2</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00048">fxls896x.h:48</a></div></div> 120<div class="ttc" id="a00359_html_a7b85fd9df22936b827367b7c812ed9c5"><div class="ttname"><a href="a00359.html#a7b85fd9df22936b827367b7c812ed9c5">apply_register_write</a></div><div class="ttdeci">int32_t apply_register_write(fxls896x_i2c_sensorhandle_t fxls896xDriver, uint8_t offset, uint8_t value)</div><div class="ttdoc">Function to apply FXLS896x register write operation. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00682">fxls896xaf_freemaster_demo.c:682</a></div></div> 121<div class="ttc" id="a03839_html_a76836737bd9a0708c252056bb768721d"><div class="ttname"><a href="a03839.html#a76836737bd9a0708c252056bb768721d">fxls896x_allregs_t::selftest</a></div><div class="ttdeci">int16_t selftest[3]</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00178">fxls8962_freemaster_demo.c:178</a></div></div> 122<div class="ttc" id="a00359_html_afe41430ebe7135f3297c0c6cbe9b122c"><div class="ttname"><a href="a00359.html#afe41430ebe7135f3297c0c6cbe9b122c">YSTN</a></div><div class="ttdeci">int16_t YSTN[2]</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00254">fxls896xaf_freemaster_demo.c:254</a></div></div> 123<div class="ttc" id="a00359_html_a90223f60cd8615444070702909389cb5"><div class="ttname"><a href="a00359.html#a90223f60cd8615444070702909389cb5">FXLS896x_NUM_REGISTERS</a></div><div class="ttdeci">#define FXLS896x_NUM_REGISTERS</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00046">fxls896xaf_freemaster_demo.c:46</a></div></div> 124<div class="ttc" id="a03843_html_a495a615081e1d215673d7c7f9a7f1b4d"><div class="ttname"><a href="a03843.html#a495a615081e1d215673d7c7f9a7f1b4d">fxls896x_offset_noise_t::rmsx</a></div><div class="ttdeci">float rmsx</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00187">fxls8962_freemaster_demo.c:187</a></div></div> 125<div class="ttc" id="a00359_html_aafa5fcc299fb9a0db111332f5111b7df"><div class="ttname"><a href="a00359.html#aafa5fcc299fb9a0db111332f5111b7df">gSystick</a></div><div class="ttdeci">int32_t gSystick</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00248">fxls896xaf_freemaster_demo.c:248</a></div></div> 126<div class="ttc" id="a03847_html_a6dab3981edbf72d2d26f0087d3bc054c"><div class="ttname"><a href="a03847.html#a6dab3981edbf72d2d26f0087d3bc054c">fxls896x_selftest_t::x_stoc</a></div><div class="ttdeci">int16_t x_stoc</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00196">fxls8962_freemaster_demo.c:196</a></div></div> 127<div class="ttc" id="a02047_html"><div class="ttname"><a href="a02047.html">fxls896x_acceldata_t</a></div><div class="ttdoc">This structure defines the fxls896x raw data buffer. </div><div class="ttdef"><b>Definition:</b> <a href="a00068_source.html#l00052">fxls896x_drv.h:52</a></div></div> 128<div class="ttc" id="a00062_html_ab549af61dce6f7688114586cfdfba732"><div class="ttname"><a href="a00062.html#ab549af61dce6f7688114586cfdfba732">FXLS896x_SENS_CONFIG1_ST_POL_MASK</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_ST_POL_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00429">fxls896x.h:429</a></div></div> 129<div class="ttc" id="a03839_html_ad1c0af9df32ab0f575f319b64bff0f14"><div class="ttname"><a href="a03839.html#ad1c0af9df32ab0f575f319b64bff0f14">fxls896x_allregs_t::accel</a></div><div class="ttdeci">float accel[3]</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00175">fxls8962_freemaster_demo.c:175</a></div></div> 130<div class="ttc" id="a00062_html_a685a40a684b7d48d84ed706fdda0c883"><div class="ttname"><a href="a00062.html#a685a40a684b7d48d84ed706fdda0c883">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_Z</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_Z</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00446">fxls896x.h:446</a></div></div> 131<div class="ttc" id="a03839_html_ad47e9b879c95a25ce124bd5611ff9497"><div class="ttname"><a href="a03839.html#ad47e9b879c95a25ce124bd5611ff9497">fxls896x_allregs_t::trigger</a></div><div class="ttdeci">uint8_t trigger</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00156">fxls8962_freemaster_demo.c:156</a></div></div> 132<div class="ttc" id="a00359_html_a0240ac851181b84ac374872dc5434ee4"><div class="ttname"><a href="a00359.html#a0240ac851181b84ac374872dc5434ee4">N</a></div><div class="ttdeci">#define N</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00055">fxls896xaf_freemaster_demo.c:55</a></div></div> 133<div class="ttc" id="a00359_html_afd6c5d92ad71c39bdcba4ff33ddebf38"><div class="ttname"><a href="a00359.html#afd6c5d92ad71c39bdcba4ff33ddebf38">cFxls896xConfigNormal</a></div><div class="ttdeci">const registerwritelist_t cFxls896xConfigNormal[]</div><div class="ttdoc">Defines the register write list to configure FXLS896x in Interrupt mode. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00063">fxls896xaf_freemaster_demo.c:63</a></div></div> 134<div class="ttc" id="a00359_html_abe10602a509294f3dd2e11a445fdefa2a4103fd3da4e8587e836c00f7d68976d2"><div class="ttname"><a href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a4103fd3da4e8587e836c00f7d68976d2">FXLS896x_ACCEL_CONFIG_END</a></div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00228">fxls896xaf_freemaster_demo.c:228</a></div></div> 135<div class="ttc" id="a00359_html_a9cd430fc151a045ed2b98f7b4dc71d44"><div class="ttname"><a href="a00359.html#a9cd430fc151a045ed2b98f7b4dc71d44">accel_off_noise</a></div><div class="ttdeci">void accel_off_noise(fxls896x_acceldata_t *rawData, fxls896x_offset_noise_t *offnoiseptr, float sens)</div><div class="ttdoc">Function to measure accelerometer offset noise. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00831">fxls896xaf_freemaster_demo.c:831</a></div></div> 136<div class="ttc" id="a00359_html_a5dc6c4717d01d664bf34e640ac8baa84"><div class="ttname"><a href="a00359.html#a5dc6c4717d01d664bf34e640ac8baa84">YSTP</a></div><div class="ttdeci">int16_t YSTP[2]</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00254">fxls896xaf_freemaster_demo.c:254</a></div></div> 137<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> 138<div class="ttc" id="a00062_html_a0680aea1d90ca4389c6b9f49382db0ea"><div class="ttname"><a href="a00062.html#a0680aea1d90ca4389c6b9f49382db0ea">FXLS896x_SENS_CONFIG1_ST_POL_NEGATIVE</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_ST_POL_NEGATIVE</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00449">fxls896x.h:449</a></div></div> 139<div class="ttc" id="a03855_html"><div class="ttname"><a href="a03855.html">rawdata</a></div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00214">fxls8962_freemaster_demo.c:214</a></div></div> 140<div class="ttc" id="a03843_html"><div class="ttname"><a href="a03843.html">fxls896x_offset_noise_t</a></div><div class="ttdoc">This structure defines the fxls896x offset and noise calculation parameters. </div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00182">fxls8962_freemaster_demo.c:182</a></div></div> 141<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> 142<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> 143<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> 144<div class="ttc" id="a00338_html_abe10602a509294f3dd2e11a445fdefa2"><div class="ttname"><a href="a00338.html#abe10602a509294f3dd2e11a445fdefa2">fxls896x_operation_type</a></div><div class="ttdeci">fxls896x_operation_type</div><div class="ttdoc">This structure defines the fxls8962 host operation type. </div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00221">fxls8962_freemaster_demo.c:221</a></div></div> 145<div class="ttc" id="a00281_html_ac61bf859f26cd2541c3958bff34e2bda"><div class="ttname"><a href="a00281.html#ac61bf859f26cd2541c3958bff34e2bda">pGpioDriver</a></div><div class="ttdeci">GENERIC_DRIVER_GPIO * pGpioDriver</div><div class="ttdef"><b>Definition:</b> <a href="a00281_source.html#l00067">mma8491q_example.c:67</a></div></div> 146<div class="ttc" id="a00359_html_a9aad2156b5de8c3f4e79f3bf5828dfe5"><div class="ttname"><a href="a00359.html#a9aad2156b5de8c3f4e79f3bf5828dfe5">ZSTP</a></div><div class="ttdeci">int16_t ZSTP[2]</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00254">fxls896xaf_freemaster_demo.c:254</a></div></div> 147<div class="ttc" id="a03839_html_a68fea111a9a0540bf8e4a50113a0fc66"><div class="ttname"><a href="a03839.html#a68fea111a9a0540bf8e4a50113a0fc66">fxls896x_allregs_t::readall_size</a></div><div class="ttdeci">uint8_t readall_size</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00161">fxls8962_freemaster_demo.c:161</a></div></div> 148<div class="ttc" id="a03839_html_ac812aa6cbae37a5e43e487a02a535f4d"><div class="ttname"><a href="a03839.html#ac812aa6cbae37a5e43e487a02a535f4d">fxls896x_allregs_t::odr_value</a></div><div class="ttdeci">uint8_t odr_value</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00168">fxls8962_freemaster_demo.c:168</a></div></div> 149<div class="ttc" id="a00062_html_ae301ed84ab3b305fadb39dc1d87d0a22"><div class="ttname"><a href="a00062.html#ae301ed84ab3b305fadb39dc1d87d0a22">FXLS896x_INT_EN_DRDY_EN_MASK</a></div><div class="ttdeci">#define FXLS896x_INT_EN_DRDY_EN_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00850">fxls896x.h:850</a></div></div> 150<div class="ttc" id="a00359_html_a6aa7a1a86aa031539466bf44d884ef39"><div class="ttname"><a href="a00359.html#a6aa7a1a86aa031539466bf44d884ef39">prev_toggle</a></div><div class="ttdeci">uint8_t prev_toggle</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00240">fxls896xaf_freemaster_demo.c:240</a></div></div> 151<div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5acab93ad77156e08d1bebe52bf46936cccc"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acab93ad77156e08d1bebe52bf46936cccc">SENSOR_ERROR_READ</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00038">sensor_drv.h:38</a></div></div> 152<div class="ttc" id="a03847_html_ab2f66ecbf46ffffe0ea054892f2facc5"><div class="ttname"><a href="a03847.html#ab2f66ecbf46ffffe0ea054892f2facc5">fxls896x_selftest_t::y_stof</a></div><div class="ttdeci">int16_t y_stof</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00200">fxls8962_freemaster_demo.c:200</a></div></div> 153<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> 154<div class="ttc" id="a00530_html_a85a32737b730fbb713ec910e1ad17c74"><div class="ttname"><a href="a00530.html#a85a32737b730fbb713ec910e1ad17c74">BOARD_SystickElapsedTime_us</a></div><div class="ttdeci">uint32_t BOARD_SystickElapsedTime_us(int32_t *pStart)</div><div class="ttdoc">Function to compute the Elapsed Time. </div><div class="ttdef"><b>Definition:</b> <a href="a00530_source.html#l00064">systick_utils.c:64</a></div></div> 155<div class="ttc" id="a00359_html_a5d2ce68c8ff5052aa713270c33e6d3f2"><div class="ttname"><a href="a00359.html#a5d2ce68c8ff5052aa713270c33e6d3f2">registers</a></div><div class="ttdeci">fxls896x_allregs_t registers</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00237">fxls896xaf_freemaster_demo.c:237</a></div></div> 156<div class="ttc" id="a00359_html_ad162871b835f5bcb36700a35673419f0"><div class="ttname"><a href="a00359.html#ad162871b835f5bcb36700a35673419f0">recBuffCfg</a></div><div class="ttdeci">FMSTR_REC_BUFF recBuffCfg</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00244">fxls896xaf_freemaster_demo.c:244</a></div></div> 157<div class="ttc" id="a00062_html_a1aed3b2128901e3e473acb7772c93ac8"><div class="ttname"><a href="a00062.html#a1aed3b2128901e3e473acb7772c93ac8">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_Y</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_Y</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00445">fxls896x.h:445</a></div></div> 158<div class="ttc" id="a00359_html_aa86223122baa38aa63a2fbfba105e7af"><div class="ttname"><a href="a00359.html#aa86223122baa38aa63a2fbfba105e7af">offnoise_data</a></div><div class="ttdeci">fxls896x_offset_noise_t offnoise_data</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00238">fxls896xaf_freemaster_demo.c:238</a></div></div> 159<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> 160<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> 161<div class="ttc" id="a03839_html_af53fbe055eb102357c08a01337cd7838"><div class="ttname"><a href="a03839.html#af53fbe055eb102357c08a01337cd7838">fxls896x_allregs_t::toggle</a></div><div class="ttdeci">uint8_t toggle</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00163">fxls8962_freemaster_demo.c:163</a></div></div> 162<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> 163<div class="ttc" id="a00359_html_a6766a0733476b67067b84a70ba78e214"><div class="ttname"><a href="a00359.html#a6766a0733476b67067b84a70ba78e214">FMSTR_TSA_TABLE_BEGIN</a></div><div class="ttdeci">FMSTR_TSA_TABLE_BEGIN(main_table)</div><div class="ttdoc">Target Side Addressable (TSA) table created for this application. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00342">fxls896xaf_freemaster_demo.c:342</a></div></div> 164<div class="ttc" id="a00359_html_a6724fe657aabaee156551628cd4f2db6"><div class="ttname"><a href="a00359.html#a6724fe657aabaee156551628cd4f2db6">offset_noise_init</a></div><div class="ttdeci">void offset_noise_init(fxls896x_offset_noise_t *offnoiseptr)</div><div class="ttdoc">Function to initialize offset noise measurement. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00818">fxls896xaf_freemaster_demo.c:818</a></div></div> 165<div class="ttc" id="a03843_html_a095cf332a6632b68d181f35bda318f5b"><div class="ttname"><a href="a03843.html#a095cf332a6632b68d181f35bda318f5b">fxls896x_offset_noise_t::offx</a></div><div class="ttdeci">float offx</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00184">fxls8962_freemaster_demo.c:184</a></div></div> 166<div class="ttc" id="a03843_html_a96b237aa78c72cadbbc09578d19e68e9"><div class="ttname"><a href="a03843.html#a96b237aa78c72cadbbc09578d19e68e9">fxls896x_offset_noise_t::rmsz</a></div><div class="ttdeci">float rmsz</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00189">fxls8962_freemaster_demo.c:189</a></div></div> 167<div class="ttc" id="a03843_html_a176534e2df647e63538839e08e2987ed"><div class="ttname"><a href="a03843.html#a176534e2df647e63538839e08e2987ed">fxls896x_offset_noise_t::offz</a></div><div class="ttdeci">float offz</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00186">fxls8962_freemaster_demo.c:186</a></div></div> 168<div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7">SENSOR_ERROR_INVALID_PARAM</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00034">sensor_drv.h:34</a></div></div> 169<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> 170<div class="ttc" id="a03839_html_a2e521321a4d5d43daa4ae43891a0f553"><div class="ttname"><a href="a03839.html#a2e521321a4d5d43daa4ae43891a0f553">fxls896x_allregs_t::readall_trigger</a></div><div class="ttdeci">uint8_t readall_trigger</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00162">fxls8962_freemaster_demo.c:162</a></div></div> 171<div class="ttc" id="a00062_html_a601e61d4c9c1c11b028d8419f7a00b54"><div class="ttname"><a href="a00062.html#a601e61d4c9c1c11b028d8419f7a00b54">FXLS896x_SENS_CONFIG2_ANIC_TEMP_MASK</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG2_ANIC_TEMP_MASK</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00496">fxls896x.h:496</a></div></div> 172<div class="ttc" id="a00359_html_ab4c148858207e08ce9fc7b1f7cdf7a5e"><div class="ttname"><a href="a00359.html#ab4c148858207e08ce9fc7b1f7cdf7a5e">fxls896x_isr_callback</a></div><div class="ttdeci">void fxls896x_isr_callback(void *pUserData)</div><div class="ttdoc">ISR for FXLS896x interrupt source event. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00333">fxls896xaf_freemaster_demo.c:333</a></div></div> 173<div class="ttc" id="a04166_html_a66aae8dca2a3ed9516953924c8d10021"><div class="ttname"><a href="a04166.html#a66aae8dca2a3ed9516953924c8d10021">BOARD_UART_IRQ</a></div><div class="ttdeci">#define BOARD_UART_IRQ</div><div class="ttdef"><b>Definition:</b> <a href="a04166_source.html#l00027">board.h:27</a></div></div> 174<div class="ttc" id="a03851_html_a45b8a0f4fa327e4e49a6487cf73ec258"><div class="ttname"><a href="a03851.html#a45b8a0f4fa327e4e49a6487cf73ec258">sensor_data::xdata</a></div><div class="ttdeci">int16_t xdata</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00208">fxls8962_freemaster_demo.c:208</a></div></div> 175<div class="ttc" id="a03839_html_ab65acde67dc46f1d163e2ee468420b48"><div class="ttname"><a href="a03839.html#ab65acde67dc46f1d163e2ee468420b48">fxls896x_allregs_t::read_offset</a></div><div class="ttdeci">uint8_t read_offset</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00157">fxls8962_freemaster_demo.c:157</a></div></div> 176<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> 177<div class="ttc" id="a03839_html_a638e4503e0ae6ce655b7ad2e17e8f0ad"><div class="ttname"><a href="a03839.html#a638e4503e0ae6ce655b7ad2e17e8f0ad">fxls896x_allregs_t::value</a></div><div class="ttdeci">uint8_t value</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00155">fxls8962_freemaster_demo.c:155</a></div></div> 178<div class="ttc" id="a00359_html_a919f76313b698c6146c1b11480e41c88"><div class="ttname"><a href="a00359.html#a919f76313b698c6146c1b11480e41c88">update_dropdown_selection</a></div><div class="ttdeci">int32_t update_dropdown_selection(fxls896x_allregs_t *registers, uint8_t caller)</div><div class="ttdoc">Function to update dropdown selection. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00756">fxls896xaf_freemaster_demo.c:756</a></div></div> 179<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> 180<div class="ttc" id="a00359_html_a33e1e7f2a4d3b74a7bf5ca94132f6743"><div class="ttname"><a href="a00359.html#a33e1e7f2a4d3b74a7bf5ca94132f6743">selftest_init</a></div><div class="ttdeci">void selftest_init(fxls896x_selftest_t *selftest)</div><div class="ttdoc">Function to initialize FXLS896x self test metadata. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00917">fxls896xaf_freemaster_demo.c:917</a></div></div> 181<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> 182<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> 183<div class="ttc" id="a04166_html_aa57459420fa9e4f0a5f3fc5f57f1b9e8"><div class="ttname"><a href="a04166.html#aa57459420fa9e4f0a5f3fc5f57f1b9e8">BOARD_DEBUG_UART_BASEADDR</a></div><div class="ttdeci">#define BOARD_DEBUG_UART_BASEADDR</div><div class="ttdef"><b>Definition:</b> <a href="a04166_source.html#l00024">board.h:24</a></div></div> 184<div class="ttc" id="a03903_html_a62607faa2025749cb36c8d7e379d45fc"><div class="ttname"><a href="a03903.html#a62607faa2025749cb36c8d7e379d45fc">GENERIC_DRIVER_GPIO::toggle_pin</a></div><div class="ttdeci">void(* toggle_pin)(pinID_t aPinId)</div><div class="ttdef"><b>Definition:</b> <a href="a00482_source.html#l00048">Driver_GPIO.h:48</a></div></div> 185<div class="ttc" id="a00062_html_a29d44341ce767c5dfc737d622fc97ba1ad8aa1cd8173d2545ed6c9473253b01fd"><div class="ttname"><a href="a00062.html#a29d44341ce767c5dfc737d622fc97ba1ad8aa1cd8173d2545ed6c9473253b01fd">FXLS896x_SELF_TEST_CONFIG2</a></div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00081">fxls896x.h:81</a></div></div> 186<div class="ttc" id="a00359_html_abed21723f86be731e66be8868a8732b4"><div class="ttname"><a href="a00359.html#abed21723f86be731e66be8868a8732b4">bFxls896xIntFlag</a></div><div class="ttdeci">volatile bool bFxls896xIntFlag</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00241">fxls896xaf_freemaster_demo.c:241</a></div></div> 187<div class="ttc" id="a03839_html_a485fad199cd9c5504f6d08eaed75e1d5"><div class="ttname"><a href="a03839.html#a485fad199cd9c5504f6d08eaed75e1d5">fxls896x_allregs_t::fs_value</a></div><div class="ttdeci">uint8_t fs_value</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00166">fxls8962_freemaster_demo.c:166</a></div></div> 188<div class="ttc" id="a03843_html_a9cf6d0f93a0b3f226d25bc3e33ce4e66"><div class="ttname"><a href="a03843.html#a9cf6d0f93a0b3f226d25bc3e33ce4e66">fxls896x_offset_noise_t::rmsy</a></div><div class="ttdeci">float rmsy</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00188">fxls8962_freemaster_demo.c:188</a></div></div> 189<div class="ttc" id="a03839_html_a029a87658f39852c58465c723e31eb29"><div class="ttname"><a href="a03839.html#a029a87658f39852c58465c723e31eb29">fxls896x_allregs_t::temp</a></div><div class="ttdeci">int8_t temp</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00177">fxls8962_freemaster_demo.c:177</a></div></div> 190<div class="ttc" id="a03839_html_aa5744614a78838192d7de403e29c3d0c"><div class="ttname"><a href="a03839.html#aa5744614a78838192d7de403e29c3d0c">fxls896x_allregs_t::mods_value</a></div><div class="ttdeci">uint8_t mods_value</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00167">fxls8962_freemaster_demo.c:167</a></div></div> 191<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> 192<div class="ttc" id="a03839_html_a0b667a6debeea463abfb3ce07dad3bbd"><div class="ttname"><a href="a03839.html#a0b667a6debeea463abfb3ce07dad3bbd">fxls896x_allregs_t::reg_addr</a></div><div class="ttdeci">uint8_t reg_addr[FXLS896x_NUM_REGISTERS]</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00173">fxls8962_freemaster_demo.c:173</a></div></div> 193<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> 194<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> 195<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> 196<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> 197<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> 198<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> 199<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> 200<div class="ttc" id="a00359_html_abe10602a509294f3dd2e11a445fdefa2a3307d286251e5956eb38bcb0cf935426"><div class="ttname"><a href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a3307d286251e5956eb38bcb0cf935426">FXLS896x_ALLREG_READ</a></div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00227">fxls896xaf_freemaster_demo.c:227</a></div></div> 201<div class="ttc" id="a00359_html_a3250563719acc5aa91f797aeca5b2926"><div class="ttname"><a href="a00359.html#a3250563719acc5aa91f797aeca5b2926">cFXLS896x_int_src</a></div><div class="ttdeci">const registerreadlist_t cFXLS896x_int_src[]</div><div class="ttdoc">Prepare the register read for INT Status Register. </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00141">fxls896xaf_freemaster_demo.c:141</a></div></div> 202<div class="ttc" id="a00359_html_a496885152e5f45fd5bee40d8e928f71e"><div class="ttname"><a href="a00359.html#a496885152e5f45fd5bee40d8e928f71e">ACCEL_16G_SENS</a></div><div class="ttdeci">#define ACCEL_16G_SENS</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00054">fxls896xaf_freemaster_demo.c:54</a></div></div> 203<div class="ttc" id="a00359_html_a08e287e51783ab8f90158352e6fc3af8"><div class="ttname"><a href="a00359.html#a08e287e51783ab8f90158352e6fc3af8">ACCEL_4G_SENS</a></div><div class="ttdeci">#define ACCEL_4G_SENS</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00052">fxls896xaf_freemaster_demo.c:52</a></div></div> 204<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> 205<div class="ttc" id="a00359_html_a8df6e68b9ba4b99ccc0b8367ef8af1fb"><div class="ttname"><a href="a00359.html#a8df6e68b9ba4b99ccc0b8367ef8af1fb">cFxls896xSTZP</a></div><div class="ttdeci">const registerwritelist_t cFxls896xSTZP[]</div><div class="ttdoc">Register settings for Self-Test in Z Axis (Positive polarity). </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00118">fxls896xaf_freemaster_demo.c:118</a></div></div> 206<div class="ttc" id="a03839_html_a5df4eecddeaf753c71e3eb7c1be3eb11"><div class="ttname"><a href="a03839.html#a5df4eecddeaf753c71e3eb7c1be3eb11">fxls896x_allregs_t::sdcd</a></div><div class="ttdeci">uint8_t sdcd</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00176">fxls8962_freemaster_demo.c:176</a></div></div> 207<div class="ttc" id="a00359_html_abe10602a509294f3dd2e11a445fdefa2a79466919081835049eceb8e501dcd479"><div class="ttname"><a href="a00359.html#abe10602a509294f3dd2e11a445fdefa2a79466919081835049eceb8e501dcd479">FXLS896x_REG_WRITE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00225">fxls896xaf_freemaster_demo.c:225</a></div></div> 208<div class="ttc" id="a00359_html_ac0ede279731ef03a63e646ed3cc7ae29"><div class="ttname"><a href="a00359.html#ac0ede279731ef03a63e646ed3cc7ae29">FRM_Recorder_Init</a></div><div class="ttdeci">void FRM_Recorder_Init()</div></div> 209<div class="ttc" id="a03847_html_ac498c729b448a4be99ce02240f812914"><div class="ttname"><a href="a03847.html#ac498c729b448a4be99ce02240f812914">fxls896x_selftest_t::z_stof</a></div><div class="ttdeci">int16_t z_stof</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00201">fxls8962_freemaster_demo.c:201</a></div></div> 210<div class="ttc" id="a03839_html_a016f00fd424d6219ccb402eea3f598df"><div class="ttname"><a href="a03839.html#a016f00fd424d6219ccb402eea3f598df">fxls896x_allregs_t::read_trigger</a></div><div class="ttdeci">uint8_t read_trigger</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00159">fxls8962_freemaster_demo.c:159</a></div></div> 211<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> 212<div class="ttc" id="a00062_html_a43563e521aa1a1cf7a6995932b6d9d06"><div class="ttname"><a href="a00062.html#a43563e521aa1a1cf7a6995932b6d9d06">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_DISABLED</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_DISABLED</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00442">fxls896x.h:442</a></div></div> 213<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> 214<div class="ttc" id="a03839_html_a7ffc10894be10ca2296d874cd2e3fe28"><div class="ttname"><a href="a03839.html#a7ffc10894be10ca2296d874cd2e3fe28">fxls896x_allregs_t::trigger_selftest</a></div><div class="ttdeci">uint8_t trigger_selftest</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00165">fxls8962_freemaster_demo.c:165</a></div></div> 215<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> 216<div class="ttc" id="a00062_html_ad8a0b14a4cb5d475a714eb0f7937e86d"><div class="ttname"><a href="a00062.html#ad8a0b14a4cb5d475a714eb0f7937e86d">FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_X</a></div><div class="ttdeci">#define FXLS896x_SENS_CONFIG1_ST_AXIS_SEL_EN_X</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00444">fxls896x.h:444</a></div></div> 217<div class="ttc" id="a03839_html_adb6a8af4ed350e0bd00bb086852d3f04"><div class="ttname"><a href="a03839.html#adb6a8af4ed350e0bd00bb086852d3f04">fxls896x_allregs_t::trigger_accel_offnoise</a></div><div class="ttdeci">uint8_t trigger_accel_offnoise</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00164">fxls8962_freemaster_demo.c:164</a></div></div> 218<div class="ttc" id="a03839_html_a754f61663feb9d0ffc46376fca33ca51"><div class="ttname"><a href="a03839.html#a754f61663feb9d0ffc46376fca33ca51">fxls896x_allregs_t::accelraw</a></div><div class="ttdeci">int16_t accelraw[3]</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00176">fxls896xaf_freemaster_demo.c:176</a></div></div> 219<div class="ttc" id="a00359_html_a2f69cd2dc81c3a7769cc8280ce11e389"><div class="ttname"><a href="a00359.html#a2f69cd2dc81c3a7769cc8280ce11e389">selftest</a></div><div class="ttdeci">fxls896x_selftest_t selftest</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00239">fxls896xaf_freemaster_demo.c:239</a></div></div> 220<div class="ttc" id="a00359_html_ac12154473f3339c69dbdfda649d6fe3a"><div class="ttname"><a href="a00359.html#ac12154473f3339c69dbdfda649d6fe3a">rawData</a></div><div class="ttdeci">fxls896x_acceldata_t rawData</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00236">fxls896xaf_freemaster_demo.c:236</a></div></div> 221<div class="ttc" id="a00062_html_a33bdb75664bf9eb59353b77ebed8b41a"><div class="ttname"><a href="a00062.html#a33bdb75664bf9eb59353b77ebed8b41a">FXLS896x_INT_EN_DRDY_EN_EN</a></div><div class="ttdeci">#define FXLS896x_INT_EN_DRDY_EN_EN</div><div class="ttdef"><b>Definition:</b> <a href="a00062_source.html#l00857">fxls896x.h:857</a></div></div> 222<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> 223<div class="ttc" id="a00359_html_a655f856881e2748838614d8ebe75b9b3"><div class="ttname"><a href="a00359.html#a655f856881e2748838614d8ebe75b9b3">ACCEL_2G_SENS</a></div><div class="ttdeci">#define ACCEL_2G_SENS</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00051">fxls896xaf_freemaster_demo.c:51</a></div></div> 224<div class="ttc" id="a03839_html_adfe994819b081a25979c267187161fe4"><div class="ttname"><a href="a03839.html#adfe994819b081a25979c267187161fe4">fxls896x_allregs_t::readall_value</a></div><div class="ttdeci">uint8_t readall_value[FXLS896x_NUM_REGISTERS]</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00160">fxls8962_freemaster_demo.c:160</a></div></div> 225<div class="ttc" id="a04166_html_ab18f02e5df161de4fb61d2d6a735fd62"><div class="ttname"><a href="a04166.html#ab18f02e5df161de4fb61d2d6a735fd62">BOARD_UART_IRQ_HANDLER</a></div><div class="ttdeci">#define BOARD_UART_IRQ_HANDLER</div><div class="ttdef"><b>Definition:</b> <a href="a04166_source.html#l00028">board.h:28</a></div></div> 226<div class="ttc" id="a03851_html"><div class="ttname"><a href="a03851.html">sensor_data</a></div><div class="ttdoc">This structure defines the fxls8962 raw data buffer. </div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00206">fxls8962_freemaster_demo.c:206</a></div></div> 227<div class="ttc" id="a02047_html_a661660001effc417fb684db96e973688"><div class="ttname"><a href="a02047.html#a661660001effc417fb684db96e973688">fxls896x_acceldata_t::accel</a></div><div class="ttdeci">int16_t accel[3]</div><div class="ttdef"><b>Definition:</b> <a href="a00068_source.html#l00055">fxls896x_drv.h:55</a></div></div> 228<div class="ttc" id="a03855_html_ad45402f947ba7d432250ff3a8d5feebc"><div class="ttname"><a href="a03855.html#ad45402f947ba7d432250ff3a8d5feebc">rawdata::byte_data</a></div><div class="ttdeci">uint8_t byte_data[sizeof(sensor_data)]</div><div class="ttdef"><b>Definition:</b> <a href="a00338_source.html#l00216">fxls8962_freemaster_demo.c:216</a></div></div> 229<div class="ttc" id="a00359_html_aa6f2c7026ae9f8266895040f39ff965b"><div class="ttname"><a href="a00359.html#aa6f2c7026ae9f8266895040f39ff965b">cFxls896xSTXP</a></div><div class="ttdeci">const registerwritelist_t cFxls896xSTXP[]</div><div class="ttdoc">Register settings for Self-Test in X Axis (Positive polarity). </div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00086">fxls896xaf_freemaster_demo.c:86</a></div></div> 230</div><!-- fragment --></div><!-- contents --> 231 232<hr class="footer"/><address class="footer"><small> 233© Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause 234</small></address> 235</body> 236</html> 237