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: sensors/fxos8700_drv.c File Reference</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="issdk_stylesheet.css" rel="stylesheet" type="text/css" />
13</head>
14<body>
15<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
16<div id="titlearea">
17<table cellspacing="0" cellpadding="0">
18 <tbody>
19 <tr style="height: 56px;">
20  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
21  <td id="projectalign" style="padding-left: 0.5em;">
22   <div id="projectname">ISSDK
23   &#160;<span id="projectnumber">1.8</span>
24   </div>
25   <div id="projectbrief">IoT Sensing Software Development Kit</div>
26  </td>
27 </tr>
28 </tbody>
29</table>
30</div>
31<!-- end header part -->
32<!-- Generated by Doxygen 1.8.13 -->
33<script type="text/javascript" src="menudata.js"></script>
34<script type="text/javascript" src="menu.js"></script>
35<script type="text/javascript">
36$(function() {
37  initMenu('',false,false,'search.php','Search');
38});
39</script>
40<div id="main-nav"></div>
41<div id="nav-path" class="navpath">
42  <ul>
43<li class="navelem"><a class="el" href="dir_c77a8e2546a9c75bbba96be2ef542c8e.html">sensors</a></li>  </ul>
44</div>
45</div><!-- top -->
46<div class="header">
47  <div class="summary">
48<a href="#func-members">Functions</a> &#124;
49<a href="#var-members">Variables</a>  </div>
50  <div class="headertitle">
51<div class="title">fxos8700_drv.c File Reference</div>  </div>
52</div><!--header-->
53<div class="contents">
54
55<p>The <a class="el" href="a00083.html" title="The fxos8700_drv.c file implements the fxos8700 sensor driver functional interfaces. ">fxos8700_drv.c</a> file implements the fxos8700 sensor driver functional interfaces.
56<a href="#details">More...</a></p>
57<div class="textblock"><code>#include &quot;gpio_driver.h&quot;</code><br />
58<code>#include &quot;<a class="el" href="a00086_source.html">fxos8700_drv.h</a>&quot;</code><br />
59</div><div class="textblock"><div class="dynheader">
60Include dependency graph for fxos8700_drv.c:</div>
61<div class="dyncontent">
62<div class="center"><img src="a00084.png" border="0" usemap="#sensors_2fxos8700__drv_8c" alt=""/></div>
63<map name="sensors_2fxos8700__drv_8c" id="sensors_2fxos8700__drv_8c">
64<area shape="rect" id="node3" href="a00086.html" title="The fxos8700_drv.h file describes the fxos8700 driver interface and structures. " alt="" coords="124,80,232,107"/>
65</map>
66</div>
67</div>
68<p><a href="a00083_source.html">Go to the source code of this file.</a></p>
69<table class="memberdecls">
70<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
71Functions</h2></td></tr>
72<tr class="memitem:a66e23fbf473046ad3ab470ac28ea3b2e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#a66e23fbf473046ad3ab470ac28ea3b2e">FXOS8700_SPI_ReadPreprocess</a> (void *pCmdOut, uint32_t offset, uint32_t <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a>)</td></tr>
73<tr class="memdesc:a66e23fbf473046ad3ab470ac28ea3b2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The SPI Read Pre-Process function to generate Sensor specific SPI Message Header.  <a href="#a66e23fbf473046ad3ab470ac28ea3b2e">More...</a><br /></td></tr>
74<tr class="separator:a66e23fbf473046ad3ab470ac28ea3b2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
75<tr class="memitem:af9f15acfddc188a8153c476862b380a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#af9f15acfddc188a8153c476862b380a0">FXOS8700_SPI_WritePreprocess</a> (void *pCmdOut, uint32_t offset, uint32_t <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a>, void *pWritebuffer)</td></tr>
76<tr class="memdesc:af9f15acfddc188a8153c476862b380a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The SPI Write Pre-Process function to generate Sensor specific SPI Message Header.  <a href="#af9f15acfddc188a8153c476862b380a0">More...</a><br /></td></tr>
77<tr class="separator:af9f15acfddc188a8153c476862b380a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
78<tr class="memitem:ae968c689f91d84fb937839876121e3b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#ae968c689f91d84fb937839876121e3b4">FXOS8700_SPI_Initialize</a> (<a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *pSensorHandle, ARM_DRIVER_SPI *pBus, uint8_t index, void *pSlaveSelect, uint8_t whoAmi)</td></tr>
79<tr class="memdesc:ae968c689f91d84fb937839876121e3b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface function to initialize the sensor.  <a href="#ae968c689f91d84fb937839876121e3b4">More...</a><br /></td></tr>
80<tr class="separator:ae968c689f91d84fb937839876121e3b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
81<tr class="memitem:a58ef6f780a6b973bf94a9123119cf7ac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#a58ef6f780a6b973bf94a9123119cf7ac">FXOS8700_SPI_SetIdleTask</a> (<a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *pSensorHandle, <a class="el" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a> idleTask, void *userParam)</td></tr>
82<tr class="memdesc:a58ef6f780a6b973bf94a9123119cf7ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">: The interface function to set the SPI Idle Task.  <a href="#a58ef6f780a6b973bf94a9123119cf7ac">More...</a><br /></td></tr>
83<tr class="separator:a58ef6f780a6b973bf94a9123119cf7ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
84<tr class="memitem:ae7129952c935fb610a2c1cd327f59078"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#ae7129952c935fb610a2c1cd327f59078">FXOS8700_SPI_Configure</a> (<a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *pSensorHandle, const <a class="el" href="a03807.html">registerwritelist_t</a> *pRegWriteList)</td></tr>
85<tr class="memdesc:ae7129952c935fb610a2c1cd327f59078"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface function to configure he sensor.  <a href="#ae7129952c935fb610a2c1cd327f59078">More...</a><br /></td></tr>
86<tr class="separator:ae7129952c935fb610a2c1cd327f59078"><td class="memSeparator" colspan="2">&#160;</td></tr>
87<tr class="memitem:afc06d66f845ef2b99f1fcace0900b79d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#afc06d66f845ef2b99f1fcace0900b79d">FXOS8700_SPI_ReadData</a> (<a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *pSensorHandle, const <a class="el" href="a03811.html">registerreadlist_t</a> *pReadList, uint8_t *pBuffer)</td></tr>
88<tr class="memdesc:afc06d66f845ef2b99f1fcace0900b79d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface function to read the sensor data.  <a href="#afc06d66f845ef2b99f1fcace0900b79d">More...</a><br /></td></tr>
89<tr class="separator:afc06d66f845ef2b99f1fcace0900b79d"><td class="memSeparator" colspan="2">&#160;</td></tr>
90<tr class="memitem:a1a82f26614dd4e35cf8eb5fba838f391"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#a1a82f26614dd4e35cf8eb5fba838f391">FXOS8700_SPI_Deinit</a> (<a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *pSensorHandle)</td></tr>
91<tr class="memdesc:a1a82f26614dd4e35cf8eb5fba838f391"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface function to De Initialize sensor..  <a href="#a1a82f26614dd4e35cf8eb5fba838f391">More...</a><br /></td></tr>
92<tr class="separator:a1a82f26614dd4e35cf8eb5fba838f391"><td class="memSeparator" colspan="2">&#160;</td></tr>
93<tr class="memitem:a17953ccee62fbd698318197b109b9e9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#a17953ccee62fbd698318197b109b9e9f">FXOS8700_I2C_Initialize</a> (<a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t whoAmi)</td></tr>
94<tr class="memdesc:a17953ccee62fbd698318197b109b9e9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface function to initialize the sensor.  <a href="#a17953ccee62fbd698318197b109b9e9f">More...</a><br /></td></tr>
95<tr class="separator:a17953ccee62fbd698318197b109b9e9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
96<tr class="memitem:af4efbd044b09aea215f120856f443caf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#af4efbd044b09aea215f120856f443caf">FXOS8700_I2C_SetIdleTask</a> (<a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *pSensorHandle, <a class="el" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a> idleTask, void *userParam)</td></tr>
97<tr class="memdesc:af4efbd044b09aea215f120856f443caf"><td class="mdescLeft">&#160;</td><td class="mdescRight">: The interface function to set the I2C Idle Task.  <a href="#af4efbd044b09aea215f120856f443caf">More...</a><br /></td></tr>
98<tr class="separator:af4efbd044b09aea215f120856f443caf"><td class="memSeparator" colspan="2">&#160;</td></tr>
99<tr class="memitem:adcb4dbaa31a6b4ccd6031ee6cc97bb66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#adcb4dbaa31a6b4ccd6031ee6cc97bb66">FXOS8700_I2C_Configure</a> (<a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *pSensorHandle, const <a class="el" href="a03807.html">registerwritelist_t</a> *pRegWriteList)</td></tr>
100<tr class="memdesc:adcb4dbaa31a6b4ccd6031ee6cc97bb66"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface function to configure he sensor.  <a href="#adcb4dbaa31a6b4ccd6031ee6cc97bb66">More...</a><br /></td></tr>
101<tr class="separator:adcb4dbaa31a6b4ccd6031ee6cc97bb66"><td class="memSeparator" colspan="2">&#160;</td></tr>
102<tr class="memitem:a0528c7633050aa23e89a79106d804cc6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#a0528c7633050aa23e89a79106d804cc6">FXOS8700_I2C_ReadData</a> (<a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *pSensorHandle, const <a class="el" href="a03811.html">registerreadlist_t</a> *pReadList, uint8_t *pBuffer)</td></tr>
103<tr class="memdesc:a0528c7633050aa23e89a79106d804cc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface function to read the sensor data.  <a href="#a0528c7633050aa23e89a79106d804cc6">More...</a><br /></td></tr>
104<tr class="separator:a0528c7633050aa23e89a79106d804cc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
105<tr class="memitem:a896c2090120ad89a351b7f80c876f4c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#a896c2090120ad89a351b7f80c876f4c3">FXOS8700_I2C_Deinit</a> (<a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *pSensorHandle)</td></tr>
106<tr class="memdesc:a896c2090120ad89a351b7f80c876f4c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface function to De Initialize sensor..  <a href="#a896c2090120ad89a351b7f80c876f4c3">More...</a><br /></td></tr>
107<tr class="separator:a896c2090120ad89a351b7f80c876f4c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
108</table><table class="memberdecls">
109<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
110Variables</h2></td></tr>
111<tr class="memitem:a3ac4dbe3a990d7b97bbdb17183b5cf1f"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#a3ac4dbe3a990d7b97bbdb17183b5cf1f">fxos8700_spiRead_CmdBuffer</a> [<a class="el" href="a00086.html#ad89f882a69cd721c555e5af680ff7ef8">FXOS8700_SPI_MAX_MSG_SIZE</a>] = {0}</td></tr>
112<tr class="separator:a3ac4dbe3a990d7b97bbdb17183b5cf1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
113<tr class="memitem:ae36472529c24785462ed3b641a0cf6da"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#ae36472529c24785462ed3b641a0cf6da">fxos8700_spiRead_DataBuffer</a> [<a class="el" href="a00086.html#ad89f882a69cd721c555e5af680ff7ef8">FXOS8700_SPI_MAX_MSG_SIZE</a>] = {0}</td></tr>
114<tr class="separator:ae36472529c24785462ed3b641a0cf6da"><td class="memSeparator" colspan="2">&#160;</td></tr>
115<tr class="memitem:ab7698075f38450881056227bf9ff9adf"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#ab7698075f38450881056227bf9ff9adf">fxos8700_spiWrite_CmdDataBuffer</a> [<a class="el" href="a00086.html#ad89f882a69cd721c555e5af680ff7ef8">FXOS8700_SPI_MAX_MSG_SIZE</a>] = {0}</td></tr>
116<tr class="separator:ab7698075f38450881056227bf9ff9adf"><td class="memSeparator" colspan="2">&#160;</td></tr>
117</table>
118<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
119<div class="textblock"><p>The <a class="el" href="a00083.html" title="The fxos8700_drv.c file implements the fxos8700 sensor driver functional interfaces. ">fxos8700_drv.c</a> file implements the fxos8700 sensor driver functional interfaces. </p>
120
121<p class="definition">Definition in file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
122</div><h2 class="groupheader">Function Documentation</h2>
123<a id="adcb4dbaa31a6b4ccd6031ee6cc97bb66"></a>
124<h2 class="memtitle"><span class="permalink"><a href="#adcb4dbaa31a6b4ccd6031ee6cc97bb66">&#9670;&nbsp;</a></span>FXOS8700_I2C_Configure()</h2>
125
126<div class="memitem">
127<div class="memproto">
128      <table class="memname">
129        <tr>
130          <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXOS8700_I2C_Configure </td>
131          <td>(</td>
132          <td class="paramtype"><a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *&#160;</td>
133          <td class="paramname"><em>pSensorHandle</em>, </td>
134        </tr>
135        <tr>
136          <td class="paramkey"></td>
137          <td></td>
138          <td class="paramtype">const <a class="el" href="a03807.html">registerwritelist_t</a> *&#160;</td>
139          <td class="paramname"><em>pRegWriteList</em>&#160;</td>
140        </tr>
141        <tr>
142          <td></td>
143          <td>)</td>
144          <td></td><td></td>
145        </tr>
146      </table>
147</div><div class="memdoc">
148
149<p>The interface function to configure he sensor. </p>
150<p>This function configure the sensor with requested ODR, Range and registers in the regsiter pair array. </p><dl class="params"><dt>Parameters</dt><dd>
151  <table class="params">
152    <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr>
153    <tr><td class="paramdir">[in]</td><td class="paramname">pRegWriteList</td><td>pointer to the register list. </td></tr>
154  </table>
155  </dd>
156</dl>
157<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00086.html#a17953ccee62fbd698318197b109b9e9f" title="The interface function to initialize the sensor. ">FXOS8700_I2C_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
158<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00086.html#adcb4dbaa31a6b4ccd6031ee6cc97bb66" title="The interface function to configure he sensor. ">FXOS8700_I2C_Configure()</a> returns the status . </dd></dl>
159<p>Validate for the correct handle and register write list.</p>
160<p>Check whether sensor handle is initialized before applying configuration. </p>
161
162<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00260">260</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
163
164<p class="reference">References <a class="el" href="a00086_source.html#l00046">fxos8700_i2c_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00080_source.html#l00056">FXOS8700_CTRL_REG1</a>, <a class="el" href="a00080_source.html#l01540">FXOS8700_CTRL_REG1_ACTIVE_ACTIVE_MODE</a>, <a class="el" href="a00080_source.html#l01495">FXOS8700_CTRL_REG1_ACTIVE_MASK</a>, <a class="el" href="a00080_source.html#l01541">FXOS8700_CTRL_REG1_ACTIVE_STANDBY_MODE</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00086_source.html#l00048">fxos8700_i2c_sensorhandle_t::isInitialized</a>, <a class="el" href="a00086_source.html#l00047">fxos8700_i2c_sensorhandle_t::pCommDrv</a>, <a class="el" href="a00167_source.html#l00193">Register_I2C_Write()</a>, <a class="el" href="a00179_source.html#l00036">SENSOR_ERROR_INIT</a>, <a class="el" href="a00179_source.html#l00034">SENSOR_ERROR_INVALID_PARAM</a>, <a class="el" href="a00179_source.html#l00033">SENSOR_ERROR_NONE</a>, <a class="el" href="a00179_source.html#l00037">SENSOR_ERROR_WRITE</a>, <a class="el" href="a00182_source.html#l00071">Sensor_I2C_Write()</a>, <a class="el" href="a00086_source.html#l00049">fxos8700_i2c_sensorhandle_t::slaveAddress</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p>
165
166<p class="reference">Referenced by <a class="el" href="a00227_source.html#l00672">apply_register_write()</a>, and <a class="el" href="a00938_source.html#l00084">main()</a>.</p>
167<div class="dynheader">
168Here is the call graph for this function:</div>
169<div class="dyncontent">
170<div class="center"><img src="a00083_adcb4dbaa31a6b4ccd6031ee6cc97bb66_cgraph.png" border="0" usemap="#a00083_adcb4dbaa31a6b4ccd6031ee6cc97bb66_cgraph" alt=""/></div>
171<map name="a00083_adcb4dbaa31a6b4ccd6031ee6cc97bb66_cgraph" id="a00083_adcb4dbaa31a6b4ccd6031ee6cc97bb66_cgraph">
172<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="581,29,643,55"/>
173<area shape="rect" id="node3" href="a00167.html#ad08d2c7880bc5f09fd27eee247311448" title="The interface function to write a sensor register. " alt="" coords="399,29,533,55"/>
174<area shape="rect" id="node4" href="a00182.html#aaac4c4f34b4dd37d3f202a1dbb4b000b" title="Write register data to a sensor. " alt="" coords="224,79,351,106"/>
175</map>
176</div>
177<div class="dynheader">
178Here is the caller graph for this function:</div>
179<div class="dyncontent">
180<div class="center"><img src="a00083_adcb4dbaa31a6b4ccd6031ee6cc97bb66_icgraph.png" border="0" usemap="#a00083_adcb4dbaa31a6b4ccd6031ee6cc97bb66_icgraph" alt=""/></div>
181<map name="a00083_adcb4dbaa31a6b4ccd6031ee6cc97bb66_icgraph" id="a00083_adcb4dbaa31a6b4ccd6031ee6cc97bb66_icgraph">
182<area shape="rect" id="node2" href="a00227.html#ad9e8a6cd2292d849361bd69d8e2f5ffb" title="Function to apply FXOS8700 register write operation. " alt="" coords="224,5,361,32"/>
183<area shape="rect" id="node3" href="a00938.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="267,56,318,83"/>
184</map>
185</div>
186
187</div>
188</div>
189<a id="a896c2090120ad89a351b7f80c876f4c3"></a>
190<h2 class="memtitle"><span class="permalink"><a href="#a896c2090120ad89a351b7f80c876f4c3">&#9670;&nbsp;</a></span>FXOS8700_I2C_Deinit()</h2>
191
192<div class="memitem">
193<div class="memproto">
194      <table class="memname">
195        <tr>
196          <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXOS8700_I2C_Deinit </td>
197          <td>(</td>
198          <td class="paramtype"><a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *&#160;</td>
199          <td class="paramname"><em>pSensorHandle</em></td><td>)</td>
200          <td></td>
201        </tr>
202      </table>
203</div><div class="memdoc">
204
205<p>The interface function to De Initialize sensor.. </p>
206<p>This function made sensor in a power safe state and de initialize its handle. </p><dl class="params"><dt>Parameters</dt><dd>
207  <table class="params">
208    <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr>
209  </table>
210  </dd>
211</dl>
212<dl class="section user"><dt>Constraints:</dt><dd>This can be called only after <a class="el" href="a00086.html#a17953ccee62fbd698318197b109b9e9f" title="The interface function to initialize the sensor. ">FXOS8700_I2C_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
213<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00086.html#a896c2090120ad89a351b7f80c876f4c3" title="The interface function to De Initialize sensor.. ">FXOS8700_I2C_Deinit()</a> returns the status . </dd></dl>
214<p>Check whether sensor handle is initialized before triggering sensor reset.</p>
215<p>Trigger sensor device reset. </p>
216
217<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00334">334</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
218
219<p class="reference">References <a class="el" href="a00086_source.html#l00046">fxos8700_i2c_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00080_source.html#l00057">FXOS8700_CTRL_REG2</a>, <a class="el" href="a00080_source.html#l01589">FXOS8700_CTRL_REG2_RST_EN</a>, <a class="el" href="a00080_source.html#l01577">FXOS8700_CTRL_REG2_RST_MASK</a>, <a class="el" href="a00086_source.html#l00048">fxos8700_i2c_sensorhandle_t::isInitialized</a>, <a class="el" href="a00086_source.html#l00047">fxos8700_i2c_sensorhandle_t::pCommDrv</a>, <a class="el" href="a00167_source.html#l00193">Register_I2C_Write()</a>, <a class="el" href="a00179_source.html#l00036">SENSOR_ERROR_INIT</a>, <a class="el" href="a00179_source.html#l00034">SENSOR_ERROR_INVALID_PARAM</a>, <a class="el" href="a00179_source.html#l00033">SENSOR_ERROR_NONE</a>, and <a class="el" href="a00086_source.html#l00049">fxos8700_i2c_sensorhandle_t::slaveAddress</a>.</p>
220<div class="dynheader">
221Here is the call graph for this function:</div>
222<div class="dyncontent">
223<div class="center"><img src="a00083_a896c2090120ad89a351b7f80c876f4c3_cgraph.png" border="0" usemap="#a00083_a896c2090120ad89a351b7f80c876f4c3_cgraph" alt=""/></div>
224<map name="a00083_a896c2090120ad89a351b7f80c876f4c3_cgraph" id="a00083_a896c2090120ad89a351b7f80c876f4c3_cgraph">
225<area shape="rect" id="node2" href="a00167.html#ad08d2c7880bc5f09fd27eee247311448" title="The interface function to write a sensor register. " alt="" coords="204,5,339,32"/>
226</map>
227</div>
228
229</div>
230</div>
231<a id="a17953ccee62fbd698318197b109b9e9f"></a>
232<h2 class="memtitle"><span class="permalink"><a href="#a17953ccee62fbd698318197b109b9e9f">&#9670;&nbsp;</a></span>FXOS8700_I2C_Initialize()</h2>
233
234<div class="memitem">
235<div class="memproto">
236      <table class="memname">
237        <tr>
238          <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXOS8700_I2C_Initialize </td>
239          <td>(</td>
240          <td class="paramtype"><a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *&#160;</td>
241          <td class="paramname"><em>pSensorHandle</em>, </td>
242        </tr>
243        <tr>
244          <td class="paramkey"></td>
245          <td></td>
246          <td class="paramtype">ARM_DRIVER_I2C *&#160;</td>
247          <td class="paramname"><em>pBus</em>, </td>
248        </tr>
249        <tr>
250          <td class="paramkey"></td>
251          <td></td>
252          <td class="paramtype">uint8_t&#160;</td>
253          <td class="paramname"><em>index</em>, </td>
254        </tr>
255        <tr>
256          <td class="paramkey"></td>
257          <td></td>
258          <td class="paramtype">uint16_t&#160;</td>
259          <td class="paramname"><em>sAddress</em>, </td>
260        </tr>
261        <tr>
262          <td class="paramkey"></td>
263          <td></td>
264          <td class="paramtype">uint8_t&#160;</td>
265          <td class="paramname"><em>whoAmi</em>&#160;</td>
266        </tr>
267        <tr>
268          <td></td>
269          <td>)</td>
270          <td></td><td></td>
271        </tr>
272      </table>
273</div><div class="memdoc">
274
275<p>The interface function to initialize the sensor. </p>
276<p>This function initialize the sensor and sensor handle. </p><dl class="params"><dt>Parameters</dt><dd>
277  <table class="params">
278    <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr>
279    <tr><td class="paramdir">[in]</td><td class="paramname">pBus</td><td>pointer to the CMSIS API compatible I2C bus object. </td></tr>
280    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the I2C device number. </td></tr>
281    <tr><td class="paramdir">[in]</td><td class="paramname">sAddress</td><td>slave address of the device on the bus. </td></tr>
282    <tr><td class="paramdir">[in]</td><td class="paramname">whoami</td><td>WHO_AM_I value of the device. </td></tr>
283  </table>
284  </dd>
285</dl>
286<dl class="section user"><dt>Constraints:</dt><dd>This should be the first API to be called. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
287<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00086.html#a17953ccee62fbd698318197b109b9e9f" title="The interface function to initialize the sensor. ">FXOS8700_I2C_Initialize()</a> returns the status . </dd></dl>
288<p>Read and store the device's WHO_AM_I.</p>
289<p>Initialize the sensor handle. </p>
290
291<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00222">222</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
292
293<p class="reference">References <a class="el" href="a00086_source.html#l00046">fxos8700_i2c_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00179_source.html#l00106">registerDeviceInfo_t::deviceInstance</a>, <a class="el" href="a00179_source.html#l00105">registerDeviceInfo_t::functionParam</a>, <a class="el" href="a00080_source.html#l00031">FXOS8700_WHO_AM_I</a>, <a class="el" href="a00179_source.html#l00104">registerDeviceInfo_t::idleFunction</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00086_source.html#l00048">fxos8700_i2c_sensorhandle_t::isInitialized</a>, <a class="el" href="a00086_source.html#l00047">fxos8700_i2c_sensorhandle_t::pCommDrv</a>, <a class="el" href="a00167_source.html#l00310">Register_I2C_Read()</a>, <a class="el" href="a00179_source.html#l00036">SENSOR_ERROR_INIT</a>, <a class="el" href="a00179_source.html#l00034">SENSOR_ERROR_INVALID_PARAM</a>, <a class="el" href="a00179_source.html#l00033">SENSOR_ERROR_NONE</a>, <a class="el" href="a00086_source.html#l00049">fxos8700_i2c_sensorhandle_t::slaveAddress</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p>
294
295<p class="reference">Referenced by <a class="el" href="a00938_source.html#l00084">main()</a>.</p>
296<div class="dynheader">
297Here is the call graph for this function:</div>
298<div class="dyncontent">
299<div class="center"><img src="a00083_a17953ccee62fbd698318197b109b9e9f_cgraph.png" border="0" usemap="#a00083_a17953ccee62fbd698318197b109b9e9f_cgraph" alt=""/></div>
300<map name="a00083_a17953ccee62fbd698318197b109b9e9f_cgraph" id="a00083_a17953ccee62fbd698318197b109b9e9f_cgraph">
301<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="399,5,460,32"/>
302<area shape="rect" id="node3" href="a00167.html#ac8a60c799d9dbc84531b4680762eb8dc" title="The interface function to read a sensor register. " alt="" coords="217,31,351,57"/>
303</map>
304</div>
305<div class="dynheader">
306Here is the caller graph for this function:</div>
307<div class="dyncontent">
308<div class="center"><img src="a00083_a17953ccee62fbd698318197b109b9e9f_icgraph.png" border="0" usemap="#a00083_a17953ccee62fbd698318197b109b9e9f_icgraph" alt=""/></div>
309<map name="a00083_a17953ccee62fbd698318197b109b9e9f_icgraph" id="a00083_a17953ccee62fbd698318197b109b9e9f_icgraph">
310<area shape="rect" id="node2" href="a00938.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="217,5,268,32"/>
311</map>
312</div>
313
314</div>
315</div>
316<a id="a0528c7633050aa23e89a79106d804cc6"></a>
317<h2 class="memtitle"><span class="permalink"><a href="#a0528c7633050aa23e89a79106d804cc6">&#9670;&nbsp;</a></span>FXOS8700_I2C_ReadData()</h2>
318
319<div class="memitem">
320<div class="memproto">
321      <table class="memname">
322        <tr>
323          <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXOS8700_I2C_ReadData </td>
324          <td>(</td>
325          <td class="paramtype"><a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *&#160;</td>
326          <td class="paramname"><em>pSensorHandle</em>, </td>
327        </tr>
328        <tr>
329          <td class="paramkey"></td>
330          <td></td>
331          <td class="paramtype">const <a class="el" href="a03811.html">registerreadlist_t</a> *&#160;</td>
332          <td class="paramname"><em>pReadList</em>, </td>
333        </tr>
334        <tr>
335          <td class="paramkey"></td>
336          <td></td>
337          <td class="paramtype">uint8_t *&#160;</td>
338          <td class="paramname"><em>pBuffer</em>&#160;</td>
339        </tr>
340        <tr>
341          <td></td>
342          <td>)</td>
343          <td></td><td></td>
344        </tr>
345      </table>
346</div><div class="memdoc">
347
348<p>The interface function to read the sensor data. </p>
349<p>This function read the sensor data out from the device and returns raw data in a byte stream. </p><dl class="params"><dt>Parameters</dt><dd>
350  <table class="params">
351    <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr>
352    <tr><td class="paramdir">[in]</td><td class="paramname">pReadList</td><td>pointer to the list of device registers and values to read. </td></tr>
353    <tr><td class="paramdir">[out]</td><td class="paramname">pBuffer</td><td>buffer which holds raw sensor data.This buffer may be back to back databuffer based command read in the list. </td></tr>
354  </table>
355  </dd>
356</dl>
357<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00086.html#a17953ccee62fbd698318197b109b9e9f" title="The interface function to initialize the sensor. ">FXOS8700_I2C_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
358<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00086.html#a0528c7633050aa23e89a79106d804cc6" title="The interface function to read the sensor data. ">FXOS8700_I2C_ReadData()</a> returns the status . </dd></dl>
359<p>Validate for the correct handle and register read list.</p>
360<p>Check whether sensor handle is initialized before reading sensor data.</p>
361<p>Parse through the read list and read the data one by one </p>
362
363<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00305">305</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
364
365<p class="reference">References <a class="el" href="a00086_source.html#l00046">fxos8700_i2c_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00086_source.html#l00048">fxos8700_i2c_sensorhandle_t::isInitialized</a>, <a class="el" href="a00086_source.html#l00047">fxos8700_i2c_sensorhandle_t::pCommDrv</a>, <a class="el" href="a00179_source.html#l00036">SENSOR_ERROR_INIT</a>, <a class="el" href="a00179_source.html#l00034">SENSOR_ERROR_INVALID_PARAM</a>, <a class="el" href="a00179_source.html#l00033">SENSOR_ERROR_NONE</a>, <a class="el" href="a00179_source.html#l00038">SENSOR_ERROR_READ</a>, <a class="el" href="a00182_source.html#l00105">Sensor_I2C_Read()</a>, <a class="el" href="a00086_source.html#l00049">fxos8700_i2c_sensorhandle_t::slaveAddress</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p>
366
367<p class="reference">Referenced by <a class="el" href="a00227_source.html#l00698">apply_register_read()</a>, <a class="el" href="a00227_source.html#l00723">apply_register_readall()</a>, and <a class="el" href="a00938_source.html#l00084">main()</a>.</p>
368<div class="dynheader">
369Here is the call graph for this function:</div>
370<div class="dyncontent">
371<div class="center"><img src="a00083_a0528c7633050aa23e89a79106d804cc6_cgraph.png" border="0" usemap="#a00083_a0528c7633050aa23e89a79106d804cc6_cgraph" alt=""/></div>
372<map name="a00083_a0528c7633050aa23e89a79106d804cc6_cgraph" id="a00083_a0528c7633050aa23e89a79106d804cc6_cgraph">
373<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="403,5,464,32"/>
374<area shape="rect" id="node3" href="a00182.html#aa75349faed7c77807cb88d9224aa2636" title="Read register data from a sensor. " alt="" coords="228,31,355,57"/>
375</map>
376</div>
377<div class="dynheader">
378Here is the caller graph for this function:</div>
379<div class="dyncontent">
380<div class="center"><img src="a00083_a0528c7633050aa23e89a79106d804cc6_icgraph.png" border="0" usemap="#a00083_a0528c7633050aa23e89a79106d804cc6_icgraph" alt=""/></div>
381<map name="a00083_a0528c7633050aa23e89a79106d804cc6_icgraph" id="a00083_a0528c7633050aa23e89a79106d804cc6_icgraph">
382<area shape="rect" id="node2" href="a00227.html#ab25bdb65b1da36293681315a4ee38775" title="Function to apply FXOS8700 register read operation. " alt="" coords="235,5,369,32"/>
383<area shape="rect" id="node3" href="a00227.html#ab58f4b8e72da1820ea391f00a71535b0" title="Function to apply FXOS8700 register read&#45;all operation. " alt="" coords="228,56,376,83"/>
384<area shape="rect" id="node4" href="a00938.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="277,107,327,133"/>
385</map>
386</div>
387
388</div>
389</div>
390<a id="af4efbd044b09aea215f120856f443caf"></a>
391<h2 class="memtitle"><span class="permalink"><a href="#af4efbd044b09aea215f120856f443caf">&#9670;&nbsp;</a></span>FXOS8700_I2C_SetIdleTask()</h2>
392
393<div class="memitem">
394<div class="memproto">
395      <table class="memname">
396        <tr>
397          <td class="memname">void FXOS8700_I2C_SetIdleTask </td>
398          <td>(</td>
399          <td class="paramtype"><a class="el" href="a02747.html">fxos8700_i2c_sensorhandle_t</a> *&#160;</td>
400          <td class="paramname"><em>pSensorHandle</em>, </td>
401        </tr>
402        <tr>
403          <td class="paramkey"></td>
404          <td></td>
405          <td class="paramtype"><a class="el" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a>&#160;</td>
406          <td class="paramname"><em>idleTask</em>, </td>
407        </tr>
408        <tr>
409          <td class="paramkey"></td>
410          <td></td>
411          <td class="paramtype">void *&#160;</td>
412          <td class="paramname"><em>userParam</em>&#160;</td>
413        </tr>
414        <tr>
415          <td></td>
416          <td>)</td>
417          <td></td><td></td>
418        </tr>
419      </table>
420</div><div class="memdoc">
421
422<p>: The interface function to set the I2C Idle Task. </p>
423<dl class="params"><dt>Parameters</dt><dd>
424  <table class="params">
425    <tr><td class="paramdir">[in]</td><td class="paramname"></td><td><a class="el" href="a02747.html" title="This defines the sensor specific information for I2C. ">fxos8700_i2c_sensorhandle_t</a> *pSensorHandle, handle to the sensor handle. </td></tr>
426    <tr><td class="paramdir">[in]</td><td class="paramname"></td><td>registeridlefunction_t idleTask, function pointer to the function to execute on I2C Idle Time. </td></tr>
427    <tr><td class="paramdir">[in]</td><td class="paramname"></td><td>void *userParam, the pointer to the user idle ftask parameters. </td></tr>
428  </table>
429  </dd>
430</dl>
431<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl>
432<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00086.html#a17953ccee62fbd698318197b109b9e9f" title="The interface function to initialize the sensor. ">FXOS8700_I2C_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
433
434<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00252">252</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
435
436<p class="reference">References <a class="el" href="a00086_source.html#l00046">fxos8700_i2c_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00179_source.html#l00105">registerDeviceInfo_t::functionParam</a>, and <a class="el" href="a00179_source.html#l00104">registerDeviceInfo_t::idleFunction</a>.</p>
437
438<p class="reference">Referenced by <a class="el" href="a00938_source.html#l00084">main()</a>.</p>
439<div class="dynheader">
440Here is the caller graph for this function:</div>
441<div class="dyncontent">
442<div class="center"><img src="a00083_af4efbd044b09aea215f120856f443caf_icgraph.png" border="0" usemap="#a00083_af4efbd044b09aea215f120856f443caf_icgraph" alt=""/></div>
443<map name="a00083_af4efbd044b09aea215f120856f443caf_icgraph" id="a00083_af4efbd044b09aea215f120856f443caf_icgraph">
444<area shape="rect" id="node2" href="a00938.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="239,5,289,32"/>
445</map>
446</div>
447
448</div>
449</div>
450<a id="ae7129952c935fb610a2c1cd327f59078"></a>
451<h2 class="memtitle"><span class="permalink"><a href="#ae7129952c935fb610a2c1cd327f59078">&#9670;&nbsp;</a></span>FXOS8700_SPI_Configure()</h2>
452
453<div class="memitem">
454<div class="memproto">
455      <table class="memname">
456        <tr>
457          <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXOS8700_SPI_Configure </td>
458          <td>(</td>
459          <td class="paramtype"><a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *&#160;</td>
460          <td class="paramname"><em>pSensorHandle</em>, </td>
461        </tr>
462        <tr>
463          <td class="paramkey"></td>
464          <td></td>
465          <td class="paramtype">const <a class="el" href="a03807.html">registerwritelist_t</a> *&#160;</td>
466          <td class="paramname"><em>pRegWriteList</em>&#160;</td>
467        </tr>
468        <tr>
469          <td></td>
470          <td>)</td>
471          <td></td><td></td>
472        </tr>
473      </table>
474</div><div class="memdoc">
475
476<p>The interface function to configure he sensor. </p>
477<p>This function configure the sensor with requested ODR, Range and registers in the regsiter pair array. </p><dl class="params"><dt>Parameters</dt><dd>
478  <table class="params">
479    <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr>
480    <tr><td class="paramdir">[in]</td><td class="paramname">pRegWriteList</td><td>pointer to the register list. </td></tr>
481  </table>
482  </dd>
483</dl>
484<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00086.html#ae968c689f91d84fb937839876121e3b4" title="The interface function to initialize the sensor. ">FXOS8700_SPI_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
485<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00086.html#ae7129952c935fb610a2c1cd327f59078" title="The interface function to configure he sensor. ">FXOS8700_SPI_Configure()</a> returns the status . </dd></dl>
486<p>Validate for the correct handle and register write list.</p>
487<p>Check whether sensor handle is initialized before applying configuration.</p>
488<p>Put the device into standby mode so that configuration can be applied.</p>
489<p>Apply the Sensor Configuration based on the Register Write List</p>
490<p>Put the device into active mode and ready for reading data. </p>
491
492<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00124">124</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
493
494<p class="reference">References <a class="el" href="a00086_source.html#l00035">fxos8700_spi_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00080_source.html#l00056">FXOS8700_CTRL_REG1</a>, <a class="el" href="a00080_source.html#l01540">FXOS8700_CTRL_REG1_ACTIVE_ACTIVE_MODE</a>, <a class="el" href="a00080_source.html#l01495">FXOS8700_CTRL_REG1_ACTIVE_MASK</a>, <a class="el" href="a00080_source.html#l01541">FXOS8700_CTRL_REG1_ACTIVE_STANDBY_MODE</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00086_source.html#l00037">fxos8700_spi_sensorhandle_t::isInitialized</a>, <a class="el" href="a00086_source.html#l00036">fxos8700_spi_sensorhandle_t::pCommDrv</a>, <a class="el" href="a00173_source.html#l00216">Register_SPI_Write()</a>, <a class="el" href="a00179_source.html#l00036">SENSOR_ERROR_INIT</a>, <a class="el" href="a00179_source.html#l00034">SENSOR_ERROR_INVALID_PARAM</a>, <a class="el" href="a00179_source.html#l00033">SENSOR_ERROR_NONE</a>, <a class="el" href="a00179_source.html#l00037">SENSOR_ERROR_WRITE</a>, <a class="el" href="a00188_source.html#l00071">Sensor_SPI_Write()</a>, <a class="el" href="a00086_source.html#l00038">fxos8700_spi_sensorhandle_t::slaveParams</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p>
495
496<p class="reference">Referenced by <a class="el" href="a00236_source.html#l00067">main()</a>.</p>
497<div class="dynheader">
498Here is the call graph for this function:</div>
499<div class="dyncontent">
500<div class="center"><img src="a00083_ae7129952c935fb610a2c1cd327f59078_cgraph.png" border="0" usemap="#a00083_ae7129952c935fb610a2c1cd327f59078_cgraph" alt=""/></div>
501<map name="a00083_ae7129952c935fb610a2c1cd327f59078_cgraph" id="a00083_ae7129952c935fb610a2c1cd327f59078_cgraph">
502<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="588,29,649,55"/>
503<area shape="rect" id="node3" href="a00173.html#ac4eb16e5a939fce81270bab7f6707754" title="The interface function to write a sensor register. " alt="" coords="404,29,540,55"/>
504<area shape="rect" id="node4" href="a00188.html#aaadd5fc1d790e7922e5303b4d61b67b4" title="Write register data to a sensor. " alt="" coords="227,79,356,106"/>
505</map>
506</div>
507<div class="dynheader">
508Here is the caller graph for this function:</div>
509<div class="dyncontent">
510<div class="center"><img src="a00083_ae7129952c935fb610a2c1cd327f59078_icgraph.png" border="0" usemap="#a00083_ae7129952c935fb610a2c1cd327f59078_icgraph" alt=""/></div>
511<map name="a00083_ae7129952c935fb610a2c1cd327f59078_icgraph" id="a00083_ae7129952c935fb610a2c1cd327f59078_icgraph">
512<area shape="rect" id="node2" href="a00236.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="227,5,277,32"/>
513</map>
514</div>
515
516</div>
517</div>
518<a id="a1a82f26614dd4e35cf8eb5fba838f391"></a>
519<h2 class="memtitle"><span class="permalink"><a href="#a1a82f26614dd4e35cf8eb5fba838f391">&#9670;&nbsp;</a></span>FXOS8700_SPI_Deinit()</h2>
520
521<div class="memitem">
522<div class="memproto">
523      <table class="memname">
524        <tr>
525          <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXOS8700_SPI_Deinit </td>
526          <td>(</td>
527          <td class="paramtype"><a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *&#160;</td>
528          <td class="paramname"><em>pSensorHandle</em></td><td>)</td>
529          <td></td>
530        </tr>
531      </table>
532</div><div class="memdoc">
533
534<p>The interface function to De Initialize sensor.. </p>
535<p>This function made sensor in a power safe state and de initialize its handle. </p><dl class="params"><dt>Parameters</dt><dd>
536  <table class="params">
537    <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr>
538  </table>
539  </dd>
540</dl>
541<dl class="section user"><dt>Constraints:</dt><dd>This can be called only after after <a class="el" href="a00086.html#ae968c689f91d84fb937839876121e3b4" title="The interface function to initialize the sensor. ">FXOS8700_SPI_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
542<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00086.html#a1a82f26614dd4e35cf8eb5fba838f391" title="The interface function to De Initialize sensor.. ">FXOS8700_SPI_Deinit()</a> returns the status. </dd></dl>
543<p>Check whether sensor handle is initialized before triggering sensor reset.</p>
544<p>Trigger sensor device reset.</p>
545<p>De-initialize sensor handle. We do not validate write success since 8700 reset before sensing ack for the transaction. </p>
546
547<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00198">198</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
548
549<p class="reference">References <a class="el" href="a00086_source.html#l00035">fxos8700_spi_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00080_source.html#l00057">FXOS8700_CTRL_REG2</a>, <a class="el" href="a00080_source.html#l01589">FXOS8700_CTRL_REG2_RST_EN</a>, <a class="el" href="a00080_source.html#l01577">FXOS8700_CTRL_REG2_RST_MASK</a>, <a class="el" href="a00086_source.html#l00037">fxos8700_spi_sensorhandle_t::isInitialized</a>, <a class="el" href="a00086_source.html#l00036">fxos8700_spi_sensorhandle_t::pCommDrv</a>, <a class="el" href="a00173_source.html#l00216">Register_SPI_Write()</a>, <a class="el" href="a00179_source.html#l00036">SENSOR_ERROR_INIT</a>, <a class="el" href="a00179_source.html#l00034">SENSOR_ERROR_INVALID_PARAM</a>, <a class="el" href="a00179_source.html#l00033">SENSOR_ERROR_NONE</a>, and <a class="el" href="a00086_source.html#l00038">fxos8700_spi_sensorhandle_t::slaveParams</a>.</p>
550<div class="dynheader">
551Here is the call graph for this function:</div>
552<div class="dyncontent">
553<div class="center"><img src="a00083_a1a82f26614dd4e35cf8eb5fba838f391_cgraph.png" border="0" usemap="#a00083_a1a82f26614dd4e35cf8eb5fba838f391_cgraph" alt=""/></div>
554<map name="a00083_a1a82f26614dd4e35cf8eb5fba838f391_cgraph" id="a00083_a1a82f26614dd4e35cf8eb5fba838f391_cgraph">
555<area shape="rect" id="node2" href="a00173.html#ac4eb16e5a939fce81270bab7f6707754" title="The interface function to write a sensor register. " alt="" coords="205,5,341,32"/>
556</map>
557</div>
558
559</div>
560</div>
561<a id="ae968c689f91d84fb937839876121e3b4"></a>
562<h2 class="memtitle"><span class="permalink"><a href="#ae968c689f91d84fb937839876121e3b4">&#9670;&nbsp;</a></span>FXOS8700_SPI_Initialize()</h2>
563
564<div class="memitem">
565<div class="memproto">
566      <table class="memname">
567        <tr>
568          <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXOS8700_SPI_Initialize </td>
569          <td>(</td>
570          <td class="paramtype"><a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *&#160;</td>
571          <td class="paramname"><em>pSensorHandle</em>, </td>
572        </tr>
573        <tr>
574          <td class="paramkey"></td>
575          <td></td>
576          <td class="paramtype">ARM_DRIVER_SPI *&#160;</td>
577          <td class="paramname"><em>pBus</em>, </td>
578        </tr>
579        <tr>
580          <td class="paramkey"></td>
581          <td></td>
582          <td class="paramtype">uint8_t&#160;</td>
583          <td class="paramname"><em>index</em>, </td>
584        </tr>
585        <tr>
586          <td class="paramkey"></td>
587          <td></td>
588          <td class="paramtype">void *&#160;</td>
589          <td class="paramname"><em>pSlaveSelect</em>, </td>
590        </tr>
591        <tr>
592          <td class="paramkey"></td>
593          <td></td>
594          <td class="paramtype">uint8_t&#160;</td>
595          <td class="paramname"><em>whoAmi</em>&#160;</td>
596        </tr>
597        <tr>
598          <td></td>
599          <td>)</td>
600          <td></td><td></td>
601        </tr>
602      </table>
603</div><div class="memdoc">
604
605<p>The interface function to initialize the sensor. </p>
606<p>This function initializes the sensor and sensor handle. </p><dl class="params"><dt>Parameters</dt><dd>
607  <table class="params">
608    <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr>
609    <tr><td class="paramdir">[in]</td><td class="paramname">pBus</td><td>pointer to the CMSIS API compatible SPI bus object. </td></tr>
610    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the I2C device number. </td></tr>
611    <tr><td class="paramdir">[in]</td><td class="paramname">pSlaveSelect</td><td>slave select hndle of the device on the bus. </td></tr>
612    <tr><td class="paramdir">[in]</td><td class="paramname">whoami</td><td>WHO_AM_I value of the device. </td></tr>
613  </table>
614  </dd>
615</dl>
616<dl class="section user"><dt>Constraints:</dt><dd>This should be the first API to be called. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
617<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00086.html#ae968c689f91d84fb937839876121e3b4" title="The interface function to initialize the sensor. ">FXOS8700_SPI_Initialize()</a> returns the status . </dd></dl>
618<p>Check the input parameters.</p>
619<p>Initialize the sensor handle.</p>
620<p>Read and store the device's WHO_AM_I. </p>
621
622<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00067">67</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
623
624<p class="reference">References <a class="el" href="a00482_source.html#l00047">GENERIC_DRIVER_GPIO::clr_pin</a>, <a class="el" href="a00086_source.html#l00035">fxos8700_spi_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00179_source.html#l00106">registerDeviceInfo_t::deviceInstance</a>, <a class="el" href="a04841_source.html#l00177">Driver_GPIO_KSDK</a>, <a class="el" href="a00179_source.html#l00105">registerDeviceInfo_t::functionParam</a>, <a class="el" href="a00086_source.html#l00073">FXOS8700_SPI_CMD_LEN</a>, <a class="el" href="a00083_source.html#l00030">FXOS8700_SPI_ReadPreprocess()</a>, <a class="el" href="a00083_source.html#l00047">FXOS8700_SPI_WritePreprocess()</a>, <a class="el" href="a00086_source.html#l00077">FXOS8700_SS_ACTIVE_VALUE</a>, <a class="el" href="a00080_source.html#l00031">FXOS8700_WHO_AM_I</a>, <a class="el" href="a00482_source.html#l00024">GPIO_DIRECTION_OUT</a>, <a class="el" href="a00179_source.html#l00104">registerDeviceInfo_t::idleFunction</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00086_source.html#l00037">fxos8700_spi_sensorhandle_t::isInitialized</a>, <a class="el" href="a00086_source.html#l00036">fxos8700_spi_sensorhandle_t::pCommDrv</a>, <a class="el" href="a04823_source.html#l00302">pGPIODriver</a>, <a class="el" href="a00482_source.html#l00041">GENERIC_DRIVER_GPIO::pin_init</a>, <a class="el" href="a00176_source.html#l00048">spiSlaveSpecificParams_t::pReadPreprocessFN</a>, <a class="el" href="a00176_source.html#l00050">spiSlaveSpecificParams_t::pTargetSlavePinID</a>, <a class="el" href="a00176_source.html#l00049">spiSlaveSpecificParams_t::pWritePreprocessFN</a>, <a class="el" href="a00173_source.html#l00313">Register_SPI_Read()</a>, <a class="el" href="a00179_source.html#l00036">SENSOR_ERROR_INIT</a>, <a class="el" href="a00179_source.html#l00034">SENSOR_ERROR_INVALID_PARAM</a>, <a class="el" href="a00179_source.html#l00033">SENSOR_ERROR_NONE</a>, <a class="el" href="a00482_source.html#l00046">GENERIC_DRIVER_GPIO::set_pin</a>, <a class="el" href="a00086_source.html#l00038">fxos8700_spi_sensorhandle_t::slaveParams</a>, <a class="el" href="a00176_source.html#l00021">SPI_SS_ACTIVE_LOW</a>, <a class="el" href="a00176_source.html#l00051">spiSlaveSpecificParams_t::spiCmdLen</a>, <a class="el" href="a00176_source.html#l00052">spiSlaveSpecificParams_t::ssActiveValue</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p>
625
626<p class="reference">Referenced by <a class="el" href="a00236_source.html#l00067">main()</a>.</p>
627<div class="dynheader">
628Here is the call graph for this function:</div>
629<div class="dyncontent">
630<div class="center"><img src="a00083_ae968c689f91d84fb937839876121e3b4_cgraph.png" border="0" usemap="#a00083_ae968c689f91d84fb937839876121e3b4_cgraph" alt=""/></div>
631<map name="a00083_ae968c689f91d84fb937839876121e3b4_cgraph" id="a00083_ae968c689f91d84fb937839876121e3b4_cgraph">
632<area shape="rect" id="node2" href="a00083.html#a66e23fbf473046ad3ab470ac28ea3b2e" title="The SPI Read Pre&#45;Process function to generate Sensor specific SPI Message Header. ..." alt="" coords="221,5,435,32"/>
633<area shape="rect" id="node3" href="a00083.html#af9f15acfddc188a8153c476862b380a0" title="The SPI Write Pre&#45;Process function to generate Sensor specific SPI Message Header. " alt="" coords="220,56,436,83"/>
634<area shape="rect" id="node4" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="484,132,545,159"/>
635<area shape="rect" id="node5" href="a00173.html#a76a3aee498397854509b81ae2da2f85e" title="The interface function to read a sensor register. " alt="" coords="261,157,395,184"/>
636</map>
637</div>
638<div class="dynheader">
639Here is the caller graph for this function:</div>
640<div class="dyncontent">
641<div class="center"><img src="a00083_ae968c689f91d84fb937839876121e3b4_icgraph.png" border="0" usemap="#a00083_ae968c689f91d84fb937839876121e3b4_icgraph" alt=""/></div>
642<map name="a00083_ae968c689f91d84fb937839876121e3b4_icgraph" id="a00083_ae968c689f91d84fb937839876121e3b4_icgraph">
643<area shape="rect" id="node2" href="a00236.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="220,5,271,32"/>
644</map>
645</div>
646
647</div>
648</div>
649<a id="afc06d66f845ef2b99f1fcace0900b79d"></a>
650<h2 class="memtitle"><span class="permalink"><a href="#afc06d66f845ef2b99f1fcace0900b79d">&#9670;&nbsp;</a></span>FXOS8700_SPI_ReadData()</h2>
651
652<div class="memitem">
653<div class="memproto">
654      <table class="memname">
655        <tr>
656          <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXOS8700_SPI_ReadData </td>
657          <td>(</td>
658          <td class="paramtype"><a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *&#160;</td>
659          <td class="paramname"><em>pSensorHandle</em>, </td>
660        </tr>
661        <tr>
662          <td class="paramkey"></td>
663          <td></td>
664          <td class="paramtype">const <a class="el" href="a03811.html">registerreadlist_t</a> *&#160;</td>
665          <td class="paramname"><em>pReadList</em>, </td>
666        </tr>
667        <tr>
668          <td class="paramkey"></td>
669          <td></td>
670          <td class="paramtype">uint8_t *&#160;</td>
671          <td class="paramname"><em>pBuffer</em>&#160;</td>
672        </tr>
673        <tr>
674          <td></td>
675          <td>)</td>
676          <td></td><td></td>
677        </tr>
678      </table>
679</div><div class="memdoc">
680
681<p>The interface function to read the sensor data. </p>
682<p>This function read the sensor data out from the device and returns raw data in a byte stream. </p><dl class="params"><dt>Parameters</dt><dd>
683  <table class="params">
684    <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr>
685    <tr><td class="paramdir">[in]</td><td class="paramname">pReadList</td><td>pointer to the list of device registers and values to read. </td></tr>
686    <tr><td class="paramdir">[out]</td><td class="paramname">pBuffer</td><td>buffer which holds raw sensor data.This buffer may be back to back databuffer based command read in the list. </td></tr>
687  </table>
688  </dd>
689</dl>
690<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00086.html#ae968c689f91d84fb937839876121e3b4" title="The interface function to initialize the sensor. ">FXOS8700_SPI_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
691<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00086.html#afc06d66f845ef2b99f1fcace0900b79d" title="The interface function to read the sensor data. ">FXOS8700_SPI_ReadData()</a> returns the status . </dd></dl>
692<p>Validate for the correct handle and register read list.</p>
693<p>Check whether sensor handle is initialized before reading sensor data.</p>
694<p>Parse through the read list and read the data one by one. </p>
695
696<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00169">169</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
697
698<p class="reference">References <a class="el" href="a00086_source.html#l00035">fxos8700_spi_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00086_source.html#l00037">fxos8700_spi_sensorhandle_t::isInitialized</a>, <a class="el" href="a00086_source.html#l00036">fxos8700_spi_sensorhandle_t::pCommDrv</a>, <a class="el" href="a00179_source.html#l00036">SENSOR_ERROR_INIT</a>, <a class="el" href="a00179_source.html#l00034">SENSOR_ERROR_INVALID_PARAM</a>, <a class="el" href="a00179_source.html#l00033">SENSOR_ERROR_NONE</a>, <a class="el" href="a00179_source.html#l00038">SENSOR_ERROR_READ</a>, <a class="el" href="a00188_source.html#l00104">Sensor_SPI_Read()</a>, <a class="el" href="a00086_source.html#l00038">fxos8700_spi_sensorhandle_t::slaveParams</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p>
699
700<p class="reference">Referenced by <a class="el" href="a00236_source.html#l00067">main()</a>.</p>
701<div class="dynheader">
702Here is the call graph for this function:</div>
703<div class="dyncontent">
704<div class="center"><img src="a00083_afc06d66f845ef2b99f1fcace0900b79d_cgraph.png" border="0" usemap="#a00083_afc06d66f845ef2b99f1fcace0900b79d_cgraph" alt=""/></div>
705<map name="a00083_afc06d66f845ef2b99f1fcace0900b79d_cgraph" id="a00083_afc06d66f845ef2b99f1fcace0900b79d_cgraph">
706<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="405,5,467,32"/>
707<area shape="rect" id="node3" href="a00188.html#a77509913bc008bceacf1e5f500e7499d" title="Read register data from a sensor. " alt="" coords="229,31,357,57"/>
708</map>
709</div>
710<div class="dynheader">
711Here is the caller graph for this function:</div>
712<div class="dyncontent">
713<div class="center"><img src="a00083_afc06d66f845ef2b99f1fcace0900b79d_icgraph.png" border="0" usemap="#a00083_afc06d66f845ef2b99f1fcace0900b79d_icgraph" alt=""/></div>
714<map name="a00083_afc06d66f845ef2b99f1fcace0900b79d_icgraph" id="a00083_afc06d66f845ef2b99f1fcace0900b79d_icgraph">
715<area shape="rect" id="node2" href="a00236.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="229,5,280,32"/>
716</map>
717</div>
718
719</div>
720</div>
721<a id="a66e23fbf473046ad3ab470ac28ea3b2e"></a>
722<h2 class="memtitle"><span class="permalink"><a href="#a66e23fbf473046ad3ab470ac28ea3b2e">&#9670;&nbsp;</a></span>FXOS8700_SPI_ReadPreprocess()</h2>
723
724<div class="memitem">
725<div class="memproto">
726      <table class="memname">
727        <tr>
728          <td class="memname">void FXOS8700_SPI_ReadPreprocess </td>
729          <td>(</td>
730          <td class="paramtype">void *&#160;</td>
731          <td class="paramname"><em>pCmdOut</em>, </td>
732        </tr>
733        <tr>
734          <td class="paramkey"></td>
735          <td></td>
736          <td class="paramtype">uint32_t&#160;</td>
737          <td class="paramname"><em>offset</em>, </td>
738        </tr>
739        <tr>
740          <td class="paramkey"></td>
741          <td></td>
742          <td class="paramtype">uint32_t&#160;</td>
743          <td class="paramname"><em>size</em>&#160;</td>
744        </tr>
745        <tr>
746          <td></td>
747          <td>)</td>
748          <td></td><td></td>
749        </tr>
750      </table>
751</div><div class="memdoc">
752
753<p>The SPI Read Pre-Process function to generate Sensor specific SPI Message Header. </p>
754<p>This function prepares the SPI Read Command Header with register address and R/W bit encoded as the Sensor. </p><dl class="params"><dt>Parameters</dt><dd>
755  <table class="params">
756    <tr><td class="paramdir">[out]</td><td class="paramname">pCmdOut</td><td>handle to the output buffer. </td></tr>
757    <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>the address of the register to start reading from. </td></tr>
758    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>number of bytes to read. </td></tr>
759  </table>
760  </dd>
761</dl>
762<dl class="section user"><dt>Constraints:</dt><dd>None Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
763<dl class="section return"><dt>Returns</dt><dd>:: None. </dd></dl>
764
765<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00030">30</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
766
767<p class="reference">References <a class="el" href="a00086_source.html#l00073">FXOS8700_SPI_CMD_LEN</a>, <a class="el" href="a00083_source.html#l00023">fxos8700_spiRead_CmdBuffer</a>, <a class="el" href="a00083_source.html#l00024">fxos8700_spiRead_DataBuffer</a>, <a class="el" href="a00176_source.html#l00041">spi_mater_SlaveCmd::pReadBuffer</a>, <a class="el" href="a00176_source.html#l00042">spi_mater_SlaveCmd::pWriteBuffer</a>, and <a class="el" href="a00176_source.html#l00040">spi_mater_SlaveCmd::size</a>.</p>
768
769<p class="reference">Referenced by <a class="el" href="a00083_source.html#l00067">FXOS8700_SPI_Initialize()</a>.</p>
770<div class="dynheader">
771Here is the caller graph for this function:</div>
772<div class="dyncontent">
773<div class="center"><img src="a00083_a66e23fbf473046ad3ab470ac28ea3b2e_icgraph.png" border="0" usemap="#a00083_a66e23fbf473046ad3ab470ac28ea3b2e_icgraph" alt=""/></div>
774<map name="a00083_a66e23fbf473046ad3ab470ac28ea3b2e_icgraph" id="a00083_a66e23fbf473046ad3ab470ac28ea3b2e_icgraph">
775<area shape="rect" id="node2" href="a00086.html#ae968c689f91d84fb937839876121e3b4" title="The interface function to initialize the sensor. " alt="" coords="268,5,435,32"/>
776</map>
777</div>
778
779</div>
780</div>
781<a id="a58ef6f780a6b973bf94a9123119cf7ac"></a>
782<h2 class="memtitle"><span class="permalink"><a href="#a58ef6f780a6b973bf94a9123119cf7ac">&#9670;&nbsp;</a></span>FXOS8700_SPI_SetIdleTask()</h2>
783
784<div class="memitem">
785<div class="memproto">
786      <table class="memname">
787        <tr>
788          <td class="memname">void FXOS8700_SPI_SetIdleTask </td>
789          <td>(</td>
790          <td class="paramtype"><a class="el" href="a02743.html">fxos8700_spi_sensorhandle_t</a> *&#160;</td>
791          <td class="paramname"><em>pSensorHandle</em>, </td>
792        </tr>
793        <tr>
794          <td class="paramkey"></td>
795          <td></td>
796          <td class="paramtype"><a class="el" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a>&#160;</td>
797          <td class="paramname"><em>idleTask</em>, </td>
798        </tr>
799        <tr>
800          <td class="paramkey"></td>
801          <td></td>
802          <td class="paramtype">void *&#160;</td>
803          <td class="paramname"><em>userParam</em>&#160;</td>
804        </tr>
805        <tr>
806          <td></td>
807          <td>)</td>
808          <td></td><td></td>
809        </tr>
810      </table>
811</div><div class="memdoc">
812
813<p>: The interface function to set the SPI Idle Task. </p>
814<dl class="params"><dt>Parameters</dt><dd>
815  <table class="params">
816    <tr><td class="paramdir">[in]</td><td class="paramname"></td><td><a class="el" href="a02743.html" title="This defines the sensor specific information for SPI. ">fxos8700_spi_sensorhandle_t</a> *pSensorHandle, handle to the sensor handle. </td></tr>
817    <tr><td class="paramdir">[in]</td><td class="paramname"></td><td>registeridlefunction_t idleTask, function pointer to the function to execute on SPI Idle Time. </td></tr>
818    <tr><td class="paramdir">[in]</td><td class="paramname"></td><td>void *userParam, the pointer to the user idle ftask parameters. </td></tr>
819  </table>
820  </dd>
821</dl>
822<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl>
823<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00086.html#ae968c689f91d84fb937839876121e3b4" title="The interface function to initialize the sensor. ">FXOS8700_SPI_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
824
825<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00116">116</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
826
827<p class="reference">References <a class="el" href="a00086_source.html#l00035">fxos8700_spi_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00179_source.html#l00105">registerDeviceInfo_t::functionParam</a>, and <a class="el" href="a00179_source.html#l00104">registerDeviceInfo_t::idleFunction</a>.</p>
828
829<p class="reference">Referenced by <a class="el" href="a00236_source.html#l00067">main()</a>.</p>
830<div class="dynheader">
831Here is the caller graph for this function:</div>
832<div class="dyncontent">
833<div class="center"><img src="a00083_a58ef6f780a6b973bf94a9123119cf7ac_icgraph.png" border="0" usemap="#a00083_a58ef6f780a6b973bf94a9123119cf7ac_icgraph" alt=""/></div>
834<map name="a00083_a58ef6f780a6b973bf94a9123119cf7ac_icgraph" id="a00083_a58ef6f780a6b973bf94a9123119cf7ac_icgraph">
835<area shape="rect" id="node2" href="a00236.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="240,5,291,32"/>
836</map>
837</div>
838
839</div>
840</div>
841<a id="af9f15acfddc188a8153c476862b380a0"></a>
842<h2 class="memtitle"><span class="permalink"><a href="#af9f15acfddc188a8153c476862b380a0">&#9670;&nbsp;</a></span>FXOS8700_SPI_WritePreprocess()</h2>
843
844<div class="memitem">
845<div class="memproto">
846      <table class="memname">
847        <tr>
848          <td class="memname">void FXOS8700_SPI_WritePreprocess </td>
849          <td>(</td>
850          <td class="paramtype">void *&#160;</td>
851          <td class="paramname"><em>pCmdOut</em>, </td>
852        </tr>
853        <tr>
854          <td class="paramkey"></td>
855          <td></td>
856          <td class="paramtype">uint32_t&#160;</td>
857          <td class="paramname"><em>offset</em>, </td>
858        </tr>
859        <tr>
860          <td class="paramkey"></td>
861          <td></td>
862          <td class="paramtype">uint32_t&#160;</td>
863          <td class="paramname"><em>size</em>, </td>
864        </tr>
865        <tr>
866          <td class="paramkey"></td>
867          <td></td>
868          <td class="paramtype">void *&#160;</td>
869          <td class="paramname"><em>pWritebuffer</em>&#160;</td>
870        </tr>
871        <tr>
872          <td></td>
873          <td>)</td>
874          <td></td><td></td>
875        </tr>
876      </table>
877</div><div class="memdoc">
878
879<p>The SPI Write Pre-Process function to generate Sensor specific SPI Message Header. </p>
880<p>This function prepares the SPI Write Command Header with register address and R/W bit encoded as the Sensor. </p><dl class="params"><dt>Parameters</dt><dd>
881  <table class="params">
882    <tr><td class="paramdir">[out]</td><td class="paramname">pCmdOut</td><td>handle to the output buffer. </td></tr>
883    <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>the address of the register to start writing from. </td></tr>
884    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>number of bytes to write. </td></tr>
885  </table>
886  </dd>
887</dl>
888<dl class="section user"><dt>Constraints:</dt><dd>None Application has to ensure that previous instances of these APIs have exited before invocation.  No </dd></dl>
889<dl class="section return"><dt>Returns</dt><dd>:: None. </dd></dl>
890
891<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00047">47</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
892
893<p class="reference">References <a class="el" href="a00086_source.html#l00073">FXOS8700_SPI_CMD_LEN</a>, <a class="el" href="a00083_source.html#l00025">fxos8700_spiWrite_CmdDataBuffer</a>, <a class="el" href="a00176_source.html#l00041">spi_mater_SlaveCmd::pReadBuffer</a>, <a class="el" href="a00176_source.html#l00042">spi_mater_SlaveCmd::pWriteBuffer</a>, and <a class="el" href="a00176_source.html#l00040">spi_mater_SlaveCmd::size</a>.</p>
894
895<p class="reference">Referenced by <a class="el" href="a00083_source.html#l00067">FXOS8700_SPI_Initialize()</a>.</p>
896<div class="dynheader">
897Here is the caller graph for this function:</div>
898<div class="dyncontent">
899<div class="center"><img src="a00083_af9f15acfddc188a8153c476862b380a0_icgraph.png" border="0" usemap="#a00083_af9f15acfddc188a8153c476862b380a0_icgraph" alt=""/></div>
900<map name="a00083_af9f15acfddc188a8153c476862b380a0_icgraph" id="a00083_af9f15acfddc188a8153c476862b380a0_icgraph">
901<area shape="rect" id="node2" href="a00086.html#ae968c689f91d84fb937839876121e3b4" title="The interface function to initialize the sensor. " alt="" coords="269,5,436,32"/>
902</map>
903</div>
904
905</div>
906</div>
907<h2 class="groupheader">Variable Documentation</h2>
908<a id="a3ac4dbe3a990d7b97bbdb17183b5cf1f"></a>
909<h2 class="memtitle"><span class="permalink"><a href="#a3ac4dbe3a990d7b97bbdb17183b5cf1f">&#9670;&nbsp;</a></span>fxos8700_spiRead_CmdBuffer</h2>
910
911<div class="memitem">
912<div class="memproto">
913      <table class="memname">
914        <tr>
915          <td class="memname">uint8_t fxos8700_spiRead_CmdBuffer[<a class="el" href="a00086.html#ad89f882a69cd721c555e5af680ff7ef8">FXOS8700_SPI_MAX_MSG_SIZE</a>] = {0}</td>
916        </tr>
917      </table>
918</div><div class="memdoc">
919
920<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00023">23</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
921
922<p class="reference">Referenced by <a class="el" href="a00083_source.html#l00030">FXOS8700_SPI_ReadPreprocess()</a>.</p>
923
924</div>
925</div>
926<a id="ae36472529c24785462ed3b641a0cf6da"></a>
927<h2 class="memtitle"><span class="permalink"><a href="#ae36472529c24785462ed3b641a0cf6da">&#9670;&nbsp;</a></span>fxos8700_spiRead_DataBuffer</h2>
928
929<div class="memitem">
930<div class="memproto">
931      <table class="memname">
932        <tr>
933          <td class="memname">uint8_t fxos8700_spiRead_DataBuffer[<a class="el" href="a00086.html#ad89f882a69cd721c555e5af680ff7ef8">FXOS8700_SPI_MAX_MSG_SIZE</a>] = {0}</td>
934        </tr>
935      </table>
936</div><div class="memdoc">
937
938<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00024">24</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
939
940<p class="reference">Referenced by <a class="el" href="a00083_source.html#l00030">FXOS8700_SPI_ReadPreprocess()</a>.</p>
941
942</div>
943</div>
944<a id="ab7698075f38450881056227bf9ff9adf"></a>
945<h2 class="memtitle"><span class="permalink"><a href="#ab7698075f38450881056227bf9ff9adf">&#9670;&nbsp;</a></span>fxos8700_spiWrite_CmdDataBuffer</h2>
946
947<div class="memitem">
948<div class="memproto">
949      <table class="memname">
950        <tr>
951          <td class="memname">uint8_t fxos8700_spiWrite_CmdDataBuffer[<a class="el" href="a00086.html#ad89f882a69cd721c555e5af680ff7ef8">FXOS8700_SPI_MAX_MSG_SIZE</a>] = {0}</td>
952        </tr>
953      </table>
954</div><div class="memdoc">
955
956<p class="definition">Definition at line <a class="el" href="a00083_source.html#l00025">25</a> of file <a class="el" href="a00083_source.html">fxos8700_drv.c</a>.</p>
957
958<p class="reference">Referenced by <a class="el" href="a00083_source.html#l00047">FXOS8700_SPI_WritePreprocess()</a>.</p>
959
960</div>
961</div>
962</div><!-- contents -->
963
964<hr class="footer"/><address class="footer"><small>
965&copy; Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause
966</small></address>
967</body>
968</html>
969