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/fxas21002_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  <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> | 49<a href="#var-members">Variables</a> </div> 50 <div class="headertitle"> 51<div class="title">fxas21002_drv.c File Reference</div> </div> 52</div><!--header--> 53<div class="contents"> 54 55<p>The <a class="el" href="a00029.html" title="The fxas21002_drv.c file implements the FXAS21002 sensor driver interfaces. ">fxas21002_drv.c</a> file implements the FXAS21002 sensor driver interfaces. 56<a href="#details">More...</a></p> 57<div class="textblock"><code>#include "gpio_driver.h"</code><br /> 58<code>#include "<a class="el" href="a00032_source.html">fxas21002_drv.h</a>"</code><br /> 59</div><div class="textblock"><div class="dynheader"> 60Include dependency graph for fxas21002_drv.c:</div> 61<div class="dyncontent"> 62<div class="center"><img src="a00030.png" border="0" usemap="#sensors_2fxas21002__drv_8c" alt=""/></div> 63<map name="sensors_2fxas21002__drv_8c" id="sensors_2fxas21002__drv_8c"> 64<area shape="rect" id="node3" href="a00032.html" title="The fxas21002_drv.h file describes the fxas21002 driver interface and structures. ..." alt="" coords="125,80,239,107"/> 65</map> 66</div> 67</div> 68<p><a href="a00029_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:afceee373b0c1d2801fddd1c705631bf9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#afceee373b0c1d2801fddd1c705631bf9">FXAS21002_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:afceee373b0c1d2801fddd1c705631bf9"><td class="mdescLeft"> </td><td class="mdescRight">The SPI Read Pre-Process function to generate Sensor specific SPI Message Header. <a href="#afceee373b0c1d2801fddd1c705631bf9">More...</a><br /></td></tr> 74<tr class="separator:afceee373b0c1d2801fddd1c705631bf9"><td class="memSeparator" colspan="2"> </td></tr> 75<tr class="memitem:aa1f967ba54b41d16346172871061b35d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#aa1f967ba54b41d16346172871061b35d">FXAS21002_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:aa1f967ba54b41d16346172871061b35d"><td class="mdescLeft"> </td><td class="mdescRight">The SPI Write Pre-Process function to generate Sensor specific SPI Message Header. <a href="#aa1f967ba54b41d16346172871061b35d">More...</a><br /></td></tr> 77<tr class="separator:aa1f967ba54b41d16346172871061b35d"><td class="memSeparator" colspan="2"> </td></tr> 78<tr class="memitem:a6a3e2b9d7fd78d3bcfbeae10000473c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#a6a3e2b9d7fd78d3bcfbeae10000473c7">FXAS21002_SPI_Initialize</a> (<a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> *pSensorHandle, ARM_DRIVER_SPI *pBus, uint8_t index, void *pSlaveSelect, uint8_t whoAmi)</td></tr> 79<tr class="memdesc:a6a3e2b9d7fd78d3bcfbeae10000473c7"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to initialize the sensor. <a href="#a6a3e2b9d7fd78d3bcfbeae10000473c7">More...</a><br /></td></tr> 80<tr class="separator:a6a3e2b9d7fd78d3bcfbeae10000473c7"><td class="memSeparator" colspan="2"> </td></tr> 81<tr class="memitem:a77b65a7e717aaa720fc11a273ecaf23e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#a77b65a7e717aaa720fc11a273ecaf23e">FXAS21002_SPI_SetIdleTask</a> (<a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> *pSensorHandle, <a class="el" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a> idleTask, void *userParam)</td></tr> 82<tr class="memdesc:a77b65a7e717aaa720fc11a273ecaf23e"><td class="mdescLeft"> </td><td class="mdescRight">: The interface function to set the SPI Idle Task. <a href="#a77b65a7e717aaa720fc11a273ecaf23e">More...</a><br /></td></tr> 83<tr class="separator:a77b65a7e717aaa720fc11a273ecaf23e"><td class="memSeparator" colspan="2"> </td></tr> 84<tr class="memitem:aa0589840af24d3ff0f4121e9345cf000"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#aa0589840af24d3ff0f4121e9345cf000">FXAS21002_SPI_Configure</a> (<a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> *pSensorHandle, const <a class="el" href="a03807.html">registerwritelist_t</a> *pRegWriteList)</td></tr> 85<tr class="memdesc:aa0589840af24d3ff0f4121e9345cf000"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to configure he sensor. <a href="#aa0589840af24d3ff0f4121e9345cf000">More...</a><br /></td></tr> 86<tr class="separator:aa0589840af24d3ff0f4121e9345cf000"><td class="memSeparator" colspan="2"> </td></tr> 87<tr class="memitem:a7d9d71cedd7f34f0cec84627fa94a73f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#a7d9d71cedd7f34f0cec84627fa94a73f">FXAS21002_SPI_ReadData</a> (<a class="el" href="a01219.html">fxas21002_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:a7d9d71cedd7f34f0cec84627fa94a73f"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to read the sensor data. <a href="#a7d9d71cedd7f34f0cec84627fa94a73f">More...</a><br /></td></tr> 89<tr class="separator:a7d9d71cedd7f34f0cec84627fa94a73f"><td class="memSeparator" colspan="2"> </td></tr> 90<tr class="memitem:aab5046784ac58fbf4cf1fa3a738122fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#aab5046784ac58fbf4cf1fa3a738122fa">FXAS21002_SPI_Deinit</a> (<a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> *pSensorHandle)</td></tr> 91<tr class="memdesc:aab5046784ac58fbf4cf1fa3a738122fa"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to De Initialize sensor.. <a href="#aab5046784ac58fbf4cf1fa3a738122fa">More...</a><br /></td></tr> 92<tr class="separator:aab5046784ac58fbf4cf1fa3a738122fa"><td class="memSeparator" colspan="2"> </td></tr> 93<tr class="memitem:a7f37a7feae5b901922063add1aba3bff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#a7f37a7feae5b901922063add1aba3bff">FXAS21002_I2C_Initialize</a> (<a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t whoAmi)</td></tr> 94<tr class="memdesc:a7f37a7feae5b901922063add1aba3bff"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to initialize the sensor. <a href="#a7f37a7feae5b901922063add1aba3bff">More...</a><br /></td></tr> 95<tr class="separator:a7f37a7feae5b901922063add1aba3bff"><td class="memSeparator" colspan="2"> </td></tr> 96<tr class="memitem:afc93f0f28efa87fc4d37087683602709"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#afc93f0f28efa87fc4d37087683602709">FXAS21002_I2C_SetIdleTask</a> (<a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> *pSensorHandle, <a class="el" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a> idleTask, void *userParam)</td></tr> 97<tr class="memdesc:afc93f0f28efa87fc4d37087683602709"><td class="mdescLeft"> </td><td class="mdescRight">: The interface function to set the I2C Idle Task. <a href="#afc93f0f28efa87fc4d37087683602709">More...</a><br /></td></tr> 98<tr class="separator:afc93f0f28efa87fc4d37087683602709"><td class="memSeparator" colspan="2"> </td></tr> 99<tr class="memitem:abef3b2c3849b49331142f7a6266fde9a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#abef3b2c3849b49331142f7a6266fde9a">FXAS21002_I2C_Configure</a> (<a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> *pSensorHandle, const <a class="el" href="a03807.html">registerwritelist_t</a> *pRegWriteList)</td></tr> 100<tr class="memdesc:abef3b2c3849b49331142f7a6266fde9a"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to configure he sensor. <a href="#abef3b2c3849b49331142f7a6266fde9a">More...</a><br /></td></tr> 101<tr class="separator:abef3b2c3849b49331142f7a6266fde9a"><td class="memSeparator" colspan="2"> </td></tr> 102<tr class="memitem:a2772f78de8e7ae03383d86c47fdb544c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#a2772f78de8e7ae03383d86c47fdb544c">FXAS21002_I2C_ReadData</a> (<a class="el" href="a01223.html">fxas21002_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:a2772f78de8e7ae03383d86c47fdb544c"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to read the sensor data. <a href="#a2772f78de8e7ae03383d86c47fdb544c">More...</a><br /></td></tr> 104<tr class="separator:a2772f78de8e7ae03383d86c47fdb544c"><td class="memSeparator" colspan="2"> </td></tr> 105<tr class="memitem:a8a1d6a2e0e6f3b38de621553409faeab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#a8a1d6a2e0e6f3b38de621553409faeab">FXAS21002_I2C_Deinit</a> (<a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> *pSensorHandle)</td></tr> 106<tr class="memdesc:a8a1d6a2e0e6f3b38de621553409faeab"><td class="mdescLeft"> </td><td class="mdescRight">The interface function to De Initialize sensor.. <a href="#a8a1d6a2e0e6f3b38de621553409faeab">More...</a><br /></td></tr> 107<tr class="separator:a8a1d6a2e0e6f3b38de621553409faeab"><td class="memSeparator" colspan="2"> </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:aaf98f99ffff795b86e488ac43c806a22"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#aaf98f99ffff795b86e488ac43c806a22">fxas21002_spiRead_CmdBuffer</a> [<a class="el" href="a00032.html#ac1f8ff2da867d0c0d9b9d440d38ad82a">FXAS21002_SPI_MAX_MSG_SIZE</a>] = {0}</td></tr> 112<tr class="separator:aaf98f99ffff795b86e488ac43c806a22"><td class="memSeparator" colspan="2"> </td></tr> 113<tr class="memitem:a096e9df8d8b2f795ea1001b883777ac0"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#a096e9df8d8b2f795ea1001b883777ac0">fxas21002_spiRead_DataBuffer</a> [<a class="el" href="a00032.html#ac1f8ff2da867d0c0d9b9d440d38ad82a">FXAS21002_SPI_MAX_MSG_SIZE</a>] = {0}</td></tr> 114<tr class="separator:a096e9df8d8b2f795ea1001b883777ac0"><td class="memSeparator" colspan="2"> </td></tr> 115<tr class="memitem:a54d1d2ef4c0821940afc2fa343407dd7"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#a54d1d2ef4c0821940afc2fa343407dd7">fxas21002_spiWrite_CmdDataBuffer</a> [<a class="el" href="a00032.html#ac1f8ff2da867d0c0d9b9d440d38ad82a">FXAS21002_SPI_MAX_MSG_SIZE</a>] = {0}</td></tr> 116<tr class="separator:a54d1d2ef4c0821940afc2fa343407dd7"><td class="memSeparator" colspan="2"> </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="a00029.html" title="The fxas21002_drv.c file implements the FXAS21002 sensor driver interfaces. ">fxas21002_drv.c</a> file implements the FXAS21002 sensor driver interfaces. </p> 120 121<p class="definition">Definition in file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 122</div><h2 class="groupheader">Function Documentation</h2> 123<a id="abef3b2c3849b49331142f7a6266fde9a"></a> 124<h2 class="memtitle"><span class="permalink"><a href="#abef3b2c3849b49331142f7a6266fde9a">◆ </a></span>FXAS21002_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> FXAS21002_I2C_Configure </td> 131 <td>(</td> 132 <td class="paramtype"><a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> * </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> * </td> 139 <td class="paramname"><em>pRegWriteList</em> </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="a00032.html#a7f37a7feae5b901922063add1aba3bff" title="The interface function to initialize the sensor. ">FXAS21002_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="a00032.html#abef3b2c3849b49331142f7a6266fde9a" title="The interface function to configure he sensor. ">FXAS21002_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<p>Put the device into standby mode so that configuration can be applied.</p> 162<p>Apply the Sensor Configuration based on the Register Write List</p> 163<p>Put the device into active mode and ready for reading data. </p> 164 165<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00267">267</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 166 167<p class="reference">References <a class="el" href="a00032_source.html#l00046">fxas21002_i2c_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00026_source.html#l00046">FXAS21002_CTRL_REG1</a>, <a class="el" href="a00026_source.html#l00702">FXAS21002_CTRL_REG1_MODE_ACTIVE</a>, <a class="el" href="a00026_source.html#l00681">FXAS21002_CTRL_REG1_MODE_MASK</a>, <a class="el" href="a00026_source.html#l00697">FXAS21002_CTRL_REG1_MODE_STANDBY</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00032_source.html#l00048">fxas21002_i2c_sensorhandle_t::isInitialized</a>, <a class="el" href="a00032_source.html#l00047">fxas21002_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="a00032_source.html#l00049">fxas21002_i2c_sensorhandle_t::slaveAddress</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p> 168 169<p class="reference">Referenced by <a class="el" href="a00401_source.html#l00227">main()</a>.</p> 170<div class="dynheader"> 171Here is the call graph for this function:</div> 172<div class="dyncontent"> 173<div class="center"><img src="a00029_abef3b2c3849b49331142f7a6266fde9a_cgraph.png" border="0" usemap="#a00029_abef3b2c3849b49331142f7a6266fde9a_cgraph" alt=""/></div> 174<map name="a00029_abef3b2c3849b49331142f7a6266fde9a_cgraph" id="a00029_abef3b2c3849b49331142f7a6266fde9a_cgraph"> 175<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="588,28,649,55"/> 176<area shape="rect" id="node3" href="a00167.html#ad08d2c7880bc5f09fd27eee247311448" title="The interface function to write a sensor register. " alt="" coords="405,28,540,55"/> 177<area shape="rect" id="node4" href="a00182.html#aaac4c4f34b4dd37d3f202a1dbb4b000b" title="Write register data to a sensor. " alt="" coords="231,79,357,106"/> 178</map> 179</div> 180<div class="dynheader"> 181Here is the caller graph for this function:</div> 182<div class="dyncontent"> 183<div class="center"><img src="a00029_abef3b2c3849b49331142f7a6266fde9a_icgraph.png" border="0" usemap="#a00029_abef3b2c3849b49331142f7a6266fde9a_icgraph" alt=""/></div> 184<map name="a00029_abef3b2c3849b49331142f7a6266fde9a_icgraph" id="a00029_abef3b2c3849b49331142f7a6266fde9a_icgraph"> 185<area shape="rect" id="node2" href="a00401.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="231,5,281,32"/> 186</map> 187</div> 188 189</div> 190</div> 191<a id="a8a1d6a2e0e6f3b38de621553409faeab"></a> 192<h2 class="memtitle"><span class="permalink"><a href="#a8a1d6a2e0e6f3b38de621553409faeab">◆ </a></span>FXAS21002_I2C_Deinit()</h2> 193 194<div class="memitem"> 195<div class="memproto"> 196 <table class="memname"> 197 <tr> 198 <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXAS21002_I2C_Deinit </td> 199 <td>(</td> 200 <td class="paramtype"><a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> * </td> 201 <td class="paramname"><em>pSensorHandle</em></td><td>)</td> 202 <td></td> 203 </tr> 204 </table> 205</div><div class="memdoc"> 206 207<p>The interface function to De Initialize sensor.. </p> 208<p>This function made sensor in a power safe state and de initialize its handle. </p><dl class="params"><dt>Parameters</dt><dd> 209 <table class="params"> 210 <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr> 211 </table> 212 </dd> 213</dl> 214<dl class="section user"><dt>Constraints:</dt><dd>This can be called only after <a class="el" href="a00032.html#a7f37a7feae5b901922063add1aba3bff" title="The interface function to initialize the sensor. ">FXAS21002_I2C_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation. No </dd></dl> 215<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00032.html#a8a1d6a2e0e6f3b38de621553409faeab" title="The interface function to De Initialize sensor.. ">FXAS21002_I2C_Deinit()</a> returns the status . </dd></dl> 216<p>Check whether sensor handle is initialized before triggering sensor reset.</p> 217<p>Trigger sensor device reset.</p> 218<p>De-initialize sensor handle. </p> 219 220<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00341">341</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 221 222<p class="reference">References <a class="el" href="a00032_source.html#l00046">fxas21002_i2c_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00026_source.html#l00046">FXAS21002_CTRL_REG1</a>, <a class="el" href="a00026_source.html#l00690">FXAS21002_CTRL_REG1_RST_MASK</a>, <a class="el" href="a00026_source.html#l00713">FXAS21002_CTRL_REG1_RST_TRIGGER</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00032_source.html#l00048">fxas21002_i2c_sensorhandle_t::isInitialized</a>, <a class="el" href="a00032_source.html#l00047">fxas21002_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="a00032_source.html#l00049">fxas21002_i2c_sensorhandle_t::slaveAddress</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p> 223<div class="dynheader"> 224Here is the call graph for this function:</div> 225<div class="dyncontent"> 226<div class="center"><img src="a00029_a8a1d6a2e0e6f3b38de621553409faeab_cgraph.png" border="0" usemap="#a00029_a8a1d6a2e0e6f3b38de621553409faeab_cgraph" alt=""/></div> 227<map name="a00029_a8a1d6a2e0e6f3b38de621553409faeab_cgraph" id="a00029_a8a1d6a2e0e6f3b38de621553409faeab_cgraph"> 228<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="392,5,453,32"/> 229<area shape="rect" id="node3" href="a00167.html#ad08d2c7880bc5f09fd27eee247311448" title="The interface function to write a sensor register. " alt="" coords="209,31,344,57"/> 230</map> 231</div> 232 233</div> 234</div> 235<a id="a7f37a7feae5b901922063add1aba3bff"></a> 236<h2 class="memtitle"><span class="permalink"><a href="#a7f37a7feae5b901922063add1aba3bff">◆ </a></span>FXAS21002_I2C_Initialize()</h2> 237 238<div class="memitem"> 239<div class="memproto"> 240 <table class="memname"> 241 <tr> 242 <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXAS21002_I2C_Initialize </td> 243 <td>(</td> 244 <td class="paramtype"><a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> * </td> 245 <td class="paramname"><em>pSensorHandle</em>, </td> 246 </tr> 247 <tr> 248 <td class="paramkey"></td> 249 <td></td> 250 <td class="paramtype">ARM_DRIVER_I2C * </td> 251 <td class="paramname"><em>pBus</em>, </td> 252 </tr> 253 <tr> 254 <td class="paramkey"></td> 255 <td></td> 256 <td class="paramtype">uint8_t </td> 257 <td class="paramname"><em>index</em>, </td> 258 </tr> 259 <tr> 260 <td class="paramkey"></td> 261 <td></td> 262 <td class="paramtype">uint16_t </td> 263 <td class="paramname"><em>sAddress</em>, </td> 264 </tr> 265 <tr> 266 <td class="paramkey"></td> 267 <td></td> 268 <td class="paramtype">uint8_t </td> 269 <td class="paramname"><em>whoAmi</em> </td> 270 </tr> 271 <tr> 272 <td></td> 273 <td>)</td> 274 <td></td><td></td> 275 </tr> 276 </table> 277</div><div class="memdoc"> 278 279<p>The interface function to initialize the sensor. </p> 280<p>This function initialize the sensor and sensor handle. </p><dl class="params"><dt>Parameters</dt><dd> 281 <table class="params"> 282 <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr> 283 <tr><td class="paramdir">[in]</td><td class="paramname">pBus</td><td>pointer to the CMSIS API compatible I2C bus object. </td></tr> 284 <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the I2C device number. </td></tr> 285 <tr><td class="paramdir">[in]</td><td class="paramname">sAddress</td><td>slave address of the device on the bus. </td></tr> 286 <tr><td class="paramdir">[in]</td><td class="paramname">whoami</td><td>WHO_AM_I value of the device. </td></tr> 287 </table> 288 </dd> 289</dl> 290<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> 291<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00032.html#a7f37a7feae5b901922063add1aba3bff" title="The interface function to initialize the sensor. ">FXAS21002_I2C_Initialize()</a> returns the status . </dd></dl> 292<p>Check the input parameters.</p> 293<p>Read and store the device's WHO_AM_I.</p> 294<p>Initialize the sensor handle. </p> 295 296<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00228">228</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 297 298<p class="reference">References <a class="el" href="a00032_source.html#l00046">fxas21002_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="a00026_source.html#l00039">FXAS21002_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="a00032_source.html#l00048">fxas21002_i2c_sensorhandle_t::isInitialized</a>, <a class="el" href="a00032_source.html#l00047">fxas21002_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="a00032_source.html#l00049">fxas21002_i2c_sensorhandle_t::slaveAddress</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p> 299 300<p class="reference">Referenced by <a class="el" href="a00401_source.html#l00227">main()</a>.</p> 301<div class="dynheader"> 302Here is the call graph for this function:</div> 303<div class="dyncontent"> 304<div class="center"><img src="a00029_a7f37a7feae5b901922063add1aba3bff_cgraph.png" border="0" usemap="#a00029_a7f37a7feae5b901922063add1aba3bff_cgraph" alt=""/></div> 305<map name="a00029_a7f37a7feae5b901922063add1aba3bff_cgraph" id="a00029_a7f37a7feae5b901922063add1aba3bff_cgraph"> 306<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"/> 307<area shape="rect" id="node3" href="a00167.html#ac8a60c799d9dbc84531b4680762eb8dc" title="The interface function to read a sensor register. " alt="" coords="224,31,357,57"/> 308</map> 309</div> 310<div class="dynheader"> 311Here is the caller graph for this function:</div> 312<div class="dyncontent"> 313<div class="center"><img src="a00029_a7f37a7feae5b901922063add1aba3bff_icgraph.png" border="0" usemap="#a00029_a7f37a7feae5b901922063add1aba3bff_icgraph" alt=""/></div> 314<map name="a00029_a7f37a7feae5b901922063add1aba3bff_icgraph" id="a00029_a7f37a7feae5b901922063add1aba3bff_icgraph"> 315<area shape="rect" id="node2" href="a00401.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="224,5,275,32"/> 316</map> 317</div> 318 319</div> 320</div> 321<a id="a2772f78de8e7ae03383d86c47fdb544c"></a> 322<h2 class="memtitle"><span class="permalink"><a href="#a2772f78de8e7ae03383d86c47fdb544c">◆ </a></span>FXAS21002_I2C_ReadData()</h2> 323 324<div class="memitem"> 325<div class="memproto"> 326 <table class="memname"> 327 <tr> 328 <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXAS21002_I2C_ReadData </td> 329 <td>(</td> 330 <td class="paramtype"><a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> * </td> 331 <td class="paramname"><em>pSensorHandle</em>, </td> 332 </tr> 333 <tr> 334 <td class="paramkey"></td> 335 <td></td> 336 <td class="paramtype">const <a class="el" href="a03811.html">registerreadlist_t</a> * </td> 337 <td class="paramname"><em>pReadList</em>, </td> 338 </tr> 339 <tr> 340 <td class="paramkey"></td> 341 <td></td> 342 <td class="paramtype">uint8_t * </td> 343 <td class="paramname"><em>pBuffer</em> </td> 344 </tr> 345 <tr> 346 <td></td> 347 <td>)</td> 348 <td></td><td></td> 349 </tr> 350 </table> 351</div><div class="memdoc"> 352 353<p>The interface function to read the sensor data. </p> 354<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> 355 <table class="params"> 356 <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr> 357 <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> 358 <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> 359 </table> 360 </dd> 361</dl> 362<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00032.html#a7f37a7feae5b901922063add1aba3bff" title="The interface function to initialize the sensor. ">FXAS21002_I2C_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation. No </dd></dl> 363<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00032.html#a2772f78de8e7ae03383d86c47fdb544c" title="The interface function to read the sensor data. ">FXAS21002_I2C_ReadData()</a> returns the status . </dd></dl> 364<p>Validate for the correct handle and register read list.</p> 365<p>Check whether sensor handle is initialized before reading sensor data.</p> 366<p>Parse through the read list and read the data one by one. </p> 367 368<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00312">312</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 369 370<p class="reference">References <a class="el" href="a00032_source.html#l00046">fxas21002_i2c_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00032_source.html#l00048">fxas21002_i2c_sensorhandle_t::isInitialized</a>, <a class="el" href="a00032_source.html#l00047">fxas21002_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="a00032_source.html#l00049">fxas21002_i2c_sensorhandle_t::slaveAddress</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p> 371 372<p class="reference">Referenced by <a class="el" href="a00401_source.html#l00227">main()</a>.</p> 373<div class="dynheader"> 374Here is the call graph for this function:</div> 375<div class="dyncontent"> 376<div class="center"><img src="a00029_a2772f78de8e7ae03383d86c47fdb544c_cgraph.png" border="0" usemap="#a00029_a2772f78de8e7ae03383d86c47fdb544c_cgraph" alt=""/></div> 377<map name="a00029_a2772f78de8e7ae03383d86c47fdb544c_cgraph" id="a00029_a2772f78de8e7ae03383d86c47fdb544c_cgraph"> 378<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="408,5,469,32"/> 379<area shape="rect" id="node3" href="a00182.html#aa75349faed7c77807cb88d9224aa2636" title="Read register data from a sensor. " alt="" coords="233,31,360,57"/> 380</map> 381</div> 382<div class="dynheader"> 383Here is the caller graph for this function:</div> 384<div class="dyncontent"> 385<div class="center"><img src="a00029_a2772f78de8e7ae03383d86c47fdb544c_icgraph.png" border="0" usemap="#a00029_a2772f78de8e7ae03383d86c47fdb544c_icgraph" alt=""/></div> 386<map name="a00029_a2772f78de8e7ae03383d86c47fdb544c_icgraph" id="a00029_a2772f78de8e7ae03383d86c47fdb544c_icgraph"> 387<area shape="rect" id="node2" href="a00401.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="233,5,284,32"/> 388</map> 389</div> 390 391</div> 392</div> 393<a id="afc93f0f28efa87fc4d37087683602709"></a> 394<h2 class="memtitle"><span class="permalink"><a href="#afc93f0f28efa87fc4d37087683602709">◆ </a></span>FXAS21002_I2C_SetIdleTask()</h2> 395 396<div class="memitem"> 397<div class="memproto"> 398 <table class="memname"> 399 <tr> 400 <td class="memname">void FXAS21002_I2C_SetIdleTask </td> 401 <td>(</td> 402 <td class="paramtype"><a class="el" href="a01223.html">fxas21002_i2c_sensorhandle_t</a> * </td> 403 <td class="paramname"><em>pSensorHandle</em>, </td> 404 </tr> 405 <tr> 406 <td class="paramkey"></td> 407 <td></td> 408 <td class="paramtype"><a class="el" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a> </td> 409 <td class="paramname"><em>idleTask</em>, </td> 410 </tr> 411 <tr> 412 <td class="paramkey"></td> 413 <td></td> 414 <td class="paramtype">void * </td> 415 <td class="paramname"><em>userParam</em> </td> 416 </tr> 417 <tr> 418 <td></td> 419 <td>)</td> 420 <td></td><td></td> 421 </tr> 422 </table> 423</div><div class="memdoc"> 424 425<p>: The interface function to set the I2C Idle Task. </p> 426<dl class="params"><dt>Parameters</dt><dd> 427 <table class="params"> 428 <tr><td class="paramdir">[in]</td><td class="paramname"></td><td><a class="el" href="a01223.html" title="This defines the sensor specific information for I2C. ">fxas21002_i2c_sensorhandle_t</a> *pSensorHandle, handle to the sensor handle. </td></tr> 429 <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> 430 <tr><td class="paramdir">[in]</td><td class="paramname"></td><td>void *userParam, the pointer to the user idle ftask parameters. </td></tr> 431 </table> 432 </dd> 433</dl> 434<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl> 435<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00032.html#a7f37a7feae5b901922063add1aba3bff" title="The interface function to initialize the sensor. ">FXAS21002_I2C_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation. No </dd></dl> 436 437<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00259">259</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 438 439<p class="reference">References <a class="el" href="a00032_source.html#l00046">fxas21002_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> 440 441<p class="reference">Referenced by <a class="el" href="a00401_source.html#l00227">main()</a>.</p> 442<div class="dynheader"> 443Here is the caller graph for this function:</div> 444<div class="dyncontent"> 445<div class="center"><img src="a00029_afc93f0f28efa87fc4d37087683602709_icgraph.png" border="0" usemap="#a00029_afc93f0f28efa87fc4d37087683602709_icgraph" alt=""/></div> 446<map name="a00029_afc93f0f28efa87fc4d37087683602709_icgraph" id="a00029_afc93f0f28efa87fc4d37087683602709_icgraph"> 447<area shape="rect" id="node2" href="a00401.html#a840291bc02cba5474a4cb46a9b9566fe" title="Main function. " alt="" coords="244,5,295,32"/> 448</map> 449</div> 450 451</div> 452</div> 453<a id="aa0589840af24d3ff0f4121e9345cf000"></a> 454<h2 class="memtitle"><span class="permalink"><a href="#aa0589840af24d3ff0f4121e9345cf000">◆ </a></span>FXAS21002_SPI_Configure()</h2> 455 456<div class="memitem"> 457<div class="memproto"> 458 <table class="memname"> 459 <tr> 460 <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXAS21002_SPI_Configure </td> 461 <td>(</td> 462 <td class="paramtype"><a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> * </td> 463 <td class="paramname"><em>pSensorHandle</em>, </td> 464 </tr> 465 <tr> 466 <td class="paramkey"></td> 467 <td></td> 468 <td class="paramtype">const <a class="el" href="a03807.html">registerwritelist_t</a> * </td> 469 <td class="paramname"><em>pRegWriteList</em> </td> 470 </tr> 471 <tr> 472 <td></td> 473 <td>)</td> 474 <td></td><td></td> 475 </tr> 476 </table> 477</div><div class="memdoc"> 478 479<p>The interface function to configure he sensor. </p> 480<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> 481 <table class="params"> 482 <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr> 483 <tr><td class="paramdir">[in]</td><td class="paramname">pRegWriteList</td><td>pointer to the register list. </td></tr> 484 </table> 485 </dd> 486</dl> 487<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00032.html#a6a3e2b9d7fd78d3bcfbeae10000473c7" title="The interface function to initialize the sensor. ">FXAS21002_SPI_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation. No </dd></dl> 488<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00032.html#aa0589840af24d3ff0f4121e9345cf000" title="The interface function to configure he sensor. ">FXAS21002_SPI_Configure()</a> returns the status . </dd></dl> 489<p>Validate for the correct handle and register write list.</p> 490<p>Check whether sensor handle is initialized before applying configuration.</p> 491<p>Put the device into standby mode so that configuration can be applied.</p> 492<p>Apply the Sensor Configuration based on the Register Write List</p> 493<p>Put the device into active mode and ready for reading data. </p> 494 495<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00125">125</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 496 497<p class="reference">References <a class="el" href="a00032_source.html#l00035">fxas21002_spi_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00026_source.html#l00046">FXAS21002_CTRL_REG1</a>, <a class="el" href="a00026_source.html#l00702">FXAS21002_CTRL_REG1_MODE_ACTIVE</a>, <a class="el" href="a00026_source.html#l00681">FXAS21002_CTRL_REG1_MODE_MASK</a>, <a class="el" href="a00026_source.html#l00697">FXAS21002_CTRL_REG1_MODE_STANDBY</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00032_source.html#l00037">fxas21002_spi_sensorhandle_t::isInitialized</a>, <a class="el" href="a00032_source.html#l00036">fxas21002_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="a00032_source.html#l00038">fxas21002_spi_sensorhandle_t::slaveParams</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p> 498 499<p class="reference">Referenced by <a class="el" href="a00203_source.html#l00062">main()</a>.</p> 500<div class="dynheader"> 501Here is the call graph for this function:</div> 502<div class="dyncontent"> 503<div class="center"><img src="a00029_aa0589840af24d3ff0f4121e9345cf000_cgraph.png" border="0" usemap="#a00029_aa0589840af24d3ff0f4121e9345cf000_cgraph" alt=""/></div> 504<map name="a00029_aa0589840af24d3ff0f4121e9345cf000_cgraph" id="a00029_aa0589840af24d3ff0f4121e9345cf000_cgraph"> 505<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="593,29,655,55"/> 506<area shape="rect" id="node3" href="a00173.html#ac4eb16e5a939fce81270bab7f6707754" title="The interface function to write a sensor register. " alt="" coords="409,29,545,55"/> 507<area shape="rect" id="node4" href="a00188.html#aaadd5fc1d790e7922e5303b4d61b67b4" title="Write register data to a sensor. " alt="" coords="232,79,361,106"/> 508</map> 509</div> 510<div class="dynheader"> 511Here is the caller graph for this function:</div> 512<div class="dyncontent"> 513<div class="center"><img src="a00029_aa0589840af24d3ff0f4121e9345cf000_icgraph.png" border="0" usemap="#a00029_aa0589840af24d3ff0f4121e9345cf000_icgraph" alt=""/></div> 514<map name="a00029_aa0589840af24d3ff0f4121e9345cf000_icgraph" id="a00029_aa0589840af24d3ff0f4121e9345cf000_icgraph"> 515<area shape="rect" id="node2" href="a00203.html#a840291bc02cba5474a4cb46a9b9566fe" title="This is the The main function implementation. " alt="" coords="232,5,283,32"/> 516</map> 517</div> 518 519</div> 520</div> 521<a id="aab5046784ac58fbf4cf1fa3a738122fa"></a> 522<h2 class="memtitle"><span class="permalink"><a href="#aab5046784ac58fbf4cf1fa3a738122fa">◆ </a></span>FXAS21002_SPI_Deinit()</h2> 523 524<div class="memitem"> 525<div class="memproto"> 526 <table class="memname"> 527 <tr> 528 <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXAS21002_SPI_Deinit </td> 529 <td>(</td> 530 <td class="paramtype"><a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> * </td> 531 <td class="paramname"><em>pSensorHandle</em></td><td>)</td> 532 <td></td> 533 </tr> 534 </table> 535</div><div class="memdoc"> 536 537<p>The interface function to De Initialize sensor.. </p> 538<p>This function made sensor in a power safe state and de initialize its handle. </p><dl class="params"><dt>Parameters</dt><dd> 539 <table class="params"> 540 <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr> 541 </table> 542 </dd> 543</dl> 544<dl class="section user"><dt>Constraints:</dt><dd>This can be called only after after <a class="el" href="a00032.html#a6a3e2b9d7fd78d3bcfbeae10000473c7" title="The interface function to initialize the sensor. ">FXAS21002_SPI_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation. No </dd></dl> 545<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00032.html#aab5046784ac58fbf4cf1fa3a738122fa" title="The interface function to De Initialize sensor.. ">FXAS21002_SPI_Deinit()</a> returns the status . </dd></dl> 546<p>Check whether sensor handle is initialized before triggering sensor reset.</p> 547<p>Trigger sensor device reset.</p> 548<p>De-initialize sensor handle. </p> 549 550<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00197">197</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 551 552<p class="reference">References <a class="el" href="a00032_source.html#l00035">fxas21002_spi_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00026_source.html#l00046">FXAS21002_CTRL_REG1</a>, <a class="el" href="a00026_source.html#l00690">FXAS21002_CTRL_REG1_RST_MASK</a>, <a class="el" href="a00026_source.html#l00713">FXAS21002_CTRL_REG1_RST_TRIGGER</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00032_source.html#l00037">fxas21002_spi_sensorhandle_t::isInitialized</a>, <a class="el" href="a00032_source.html#l00036">fxas21002_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="a00032_source.html#l00038">fxas21002_spi_sensorhandle_t::slaveParams</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p> 553<div class="dynheader"> 554Here is the call graph for this function:</div> 555<div class="dyncontent"> 556<div class="center"><img src="a00029_aab5046784ac58fbf4cf1fa3a738122fa_cgraph.png" border="0" usemap="#a00029_aab5046784ac58fbf4cf1fa3a738122fa_cgraph" alt=""/></div> 557<map name="a00029_aab5046784ac58fbf4cf1fa3a738122fa_cgraph" id="a00029_aab5046784ac58fbf4cf1fa3a738122fa_cgraph"> 558<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="396,5,457,32"/> 559<area shape="rect" id="node3" href="a00173.html#ac4eb16e5a939fce81270bab7f6707754" title="The interface function to write a sensor register. " alt="" coords="212,31,348,57"/> 560</map> 561</div> 562 563</div> 564</div> 565<a id="a6a3e2b9d7fd78d3bcfbeae10000473c7"></a> 566<h2 class="memtitle"><span class="permalink"><a href="#a6a3e2b9d7fd78d3bcfbeae10000473c7">◆ </a></span>FXAS21002_SPI_Initialize()</h2> 567 568<div class="memitem"> 569<div class="memproto"> 570 <table class="memname"> 571 <tr> 572 <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXAS21002_SPI_Initialize </td> 573 <td>(</td> 574 <td class="paramtype"><a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> * </td> 575 <td class="paramname"><em>pSensorHandle</em>, </td> 576 </tr> 577 <tr> 578 <td class="paramkey"></td> 579 <td></td> 580 <td class="paramtype">ARM_DRIVER_SPI * </td> 581 <td class="paramname"><em>pBus</em>, </td> 582 </tr> 583 <tr> 584 <td class="paramkey"></td> 585 <td></td> 586 <td class="paramtype">uint8_t </td> 587 <td class="paramname"><em>index</em>, </td> 588 </tr> 589 <tr> 590 <td class="paramkey"></td> 591 <td></td> 592 <td class="paramtype">void * </td> 593 <td class="paramname"><em>pSlaveSelect</em>, </td> 594 </tr> 595 <tr> 596 <td class="paramkey"></td> 597 <td></td> 598 <td class="paramtype">uint8_t </td> 599 <td class="paramname"><em>whoAmi</em> </td> 600 </tr> 601 <tr> 602 <td></td> 603 <td>)</td> 604 <td></td><td></td> 605 </tr> 606 </table> 607</div><div class="memdoc"> 608 609<p>The interface function to initialize the sensor. </p> 610<p>This function initializes the sensor and sensor handle. </p><dl class="params"><dt>Parameters</dt><dd> 611 <table class="params"> 612 <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr> 613 <tr><td class="paramdir">[in]</td><td class="paramname">pBus</td><td>pointer to the CMSIS API compatible SPI bus object. </td></tr> 614 <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the I2C device number. </td></tr> 615 <tr><td class="paramdir">[in]</td><td class="paramname">pSlaveSelect</td><td>slave select hndle of the device on the bus. </td></tr> 616 <tr><td class="paramdir">[in]</td><td class="paramname">whoami</td><td>WHO_AM_I value of the device. </td></tr> 617 </table> 618 </dd> 619</dl> 620<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> 621<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00032.html#a6a3e2b9d7fd78d3bcfbeae10000473c7" title="The interface function to initialize the sensor. ">FXAS21002_SPI_Initialize()</a> returns the status . </dd></dl> 622<p>Check the input parameters.</p> 623<p>Initialize the sensor handle.</p> 624<p>Read and store the device's WHO_AM_I. </p> 625 626<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00065">65</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 627 628<p class="reference">References <a class="el" href="a00482_source.html#l00047">GENERIC_DRIVER_GPIO::clr_pin</a>, <a class="el" href="a00032_source.html#l00035">fxas21002_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="a00032_source.html#l00069">FXAS21002_SPI_CMD_LEN</a>, <a class="el" href="a00029_source.html#l00030">FXAS21002_SPI_ReadPreprocess()</a>, <a class="el" href="a00029_source.html#l00046">FXAS21002_SPI_WritePreprocess()</a>, <a class="el" href="a00032_source.html#l00073">FXAS21002_SS_ACTIVE_VALUE</a>, <a class="el" href="a00026_source.html#l00039">FXAS21002_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="a00032_source.html#l00037">fxas21002_spi_sensorhandle_t::isInitialized</a>, <a class="el" href="a00032_source.html#l00036">fxas21002_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="a00032_source.html#l00038">fxas21002_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> 629 630<p class="reference">Referenced by <a class="el" href="a00203_source.html#l00062">main()</a>.</p> 631<div class="dynheader"> 632Here is the call graph for this function:</div> 633<div class="dyncontent"> 634<div class="center"><img src="a00029_a6a3e2b9d7fd78d3bcfbeae10000473c7_cgraph.png" border="0" usemap="#a00029_a6a3e2b9d7fd78d3bcfbeae10000473c7_cgraph" alt=""/></div> 635<map name="a00029_a6a3e2b9d7fd78d3bcfbeae10000473c7_cgraph" id="a00029_a6a3e2b9d7fd78d3bcfbeae10000473c7_cgraph"> 636<area shape="rect" id="node2" href="a00029.html#afceee373b0c1d2801fddd1c705631bf9" title="The SPI Read Pre-Process function to generate Sensor specific SPI Message Header. ..." alt="" coords="226,5,447,32"/> 637<area shape="rect" id="node3" href="a00029.html#aa1f967ba54b41d16346172871061b35d" title="The SPI Write Pre-Process function to generate Sensor specific SPI Message Header. " alt="" coords="225,56,448,83"/> 638<area shape="rect" id="node4" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="496,132,557,159"/> 639<area shape="rect" id="node5" href="a00173.html#a76a3aee498397854509b81ae2da2f85e" title="The interface function to read a sensor register. " alt="" coords="269,157,404,184"/> 640</map> 641</div> 642<div class="dynheader"> 643Here is the caller graph for this function:</div> 644<div class="dyncontent"> 645<div class="center"><img src="a00029_a6a3e2b9d7fd78d3bcfbeae10000473c7_icgraph.png" border="0" usemap="#a00029_a6a3e2b9d7fd78d3bcfbeae10000473c7_icgraph" alt=""/></div> 646<map name="a00029_a6a3e2b9d7fd78d3bcfbeae10000473c7_icgraph" id="a00029_a6a3e2b9d7fd78d3bcfbeae10000473c7_icgraph"> 647<area shape="rect" id="node2" href="a00203.html#a840291bc02cba5474a4cb46a9b9566fe" title="This is the The main function implementation. " alt="" coords="225,5,276,32"/> 648</map> 649</div> 650 651</div> 652</div> 653<a id="a7d9d71cedd7f34f0cec84627fa94a73f"></a> 654<h2 class="memtitle"><span class="permalink"><a href="#a7d9d71cedd7f34f0cec84627fa94a73f">◆ </a></span>FXAS21002_SPI_ReadData()</h2> 655 656<div class="memitem"> 657<div class="memproto"> 658 <table class="memname"> 659 <tr> 660 <td class="memname"><a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> FXAS21002_SPI_ReadData </td> 661 <td>(</td> 662 <td class="paramtype"><a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> * </td> 663 <td class="paramname"><em>pSensorHandle</em>, </td> 664 </tr> 665 <tr> 666 <td class="paramkey"></td> 667 <td></td> 668 <td class="paramtype">const <a class="el" href="a03811.html">registerreadlist_t</a> * </td> 669 <td class="paramname"><em>pReadList</em>, </td> 670 </tr> 671 <tr> 672 <td class="paramkey"></td> 673 <td></td> 674 <td class="paramtype">uint8_t * </td> 675 <td class="paramname"><em>pBuffer</em> </td> 676 </tr> 677 <tr> 678 <td></td> 679 <td>)</td> 680 <td></td><td></td> 681 </tr> 682 </table> 683</div><div class="memdoc"> 684 685<p>The interface function to read the sensor data. </p> 686<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> 687 <table class="params"> 688 <tr><td class="paramdir">[in]</td><td class="paramname">pSensorHandle</td><td>handle to the sensor. </td></tr> 689 <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> 690 <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> 691 </table> 692 </dd> 693</dl> 694<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00032.html#a6a3e2b9d7fd78d3bcfbeae10000473c7" title="The interface function to initialize the sensor. ">FXAS21002_SPI_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation. No </dd></dl> 695<dl class="section return"><dt>Returns</dt><dd><a class="el" href="a00032.html#a7d9d71cedd7f34f0cec84627fa94a73f" title="The interface function to read the sensor data. ">FXAS21002_SPI_ReadData()</a> returns the status . </dd></dl> 696<p>Validate for the correct handle and register read list.</p> 697<p>Check whether sensor handle is initialized before reading sensor data.</p> 698<p>Parse through the read list and read the data one by one. </p> 699 700<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00168">168</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 701 702<p class="reference">References <a class="el" href="a00032_source.html#l00035">fxas21002_spi_sensorhandle_t::deviceInfo</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a00032_source.html#l00037">fxas21002_spi_sensorhandle_t::isInitialized</a>, <a class="el" href="a00032_source.html#l00036">fxas21002_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="a00032_source.html#l00038">fxas21002_spi_sensorhandle_t::slaveParams</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p> 703 704<p class="reference">Referenced by <a class="el" href="a00203_source.html#l00062">main()</a>.</p> 705<div class="dynheader"> 706Here is the call graph for this function:</div> 707<div class="dyncontent"> 708<div class="center"><img src="a00029_a7d9d71cedd7f34f0cec84627fa94a73f_cgraph.png" border="0" usemap="#a00029_a7d9d71cedd7f34f0cec84627fa94a73f_cgraph" alt=""/></div> 709<map name="a00029_a7d9d71cedd7f34f0cec84627fa94a73f_cgraph" id="a00029_a7d9d71cedd7f34f0cec84627fa94a73f_cgraph"> 710<area shape="rect" id="node2" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="412,5,473,32"/> 711<area shape="rect" id="node3" href="a00188.html#a77509913bc008bceacf1e5f500e7499d" title="Read register data from a sensor. " alt="" coords="236,31,364,57"/> 712</map> 713</div> 714<div class="dynheader"> 715Here is the caller graph for this function:</div> 716<div class="dyncontent"> 717<div class="center"><img src="a00029_a7d9d71cedd7f34f0cec84627fa94a73f_icgraph.png" border="0" usemap="#a00029_a7d9d71cedd7f34f0cec84627fa94a73f_icgraph" alt=""/></div> 718<map name="a00029_a7d9d71cedd7f34f0cec84627fa94a73f_icgraph" id="a00029_a7d9d71cedd7f34f0cec84627fa94a73f_icgraph"> 719<area shape="rect" id="node2" href="a00203.html#a840291bc02cba5474a4cb46a9b9566fe" title="This is the The main function implementation. " alt="" coords="236,5,287,32"/> 720</map> 721</div> 722 723</div> 724</div> 725<a id="afceee373b0c1d2801fddd1c705631bf9"></a> 726<h2 class="memtitle"><span class="permalink"><a href="#afceee373b0c1d2801fddd1c705631bf9">◆ </a></span>FXAS21002_SPI_ReadPreprocess()</h2> 727 728<div class="memitem"> 729<div class="memproto"> 730 <table class="memname"> 731 <tr> 732 <td class="memname">void FXAS21002_SPI_ReadPreprocess </td> 733 <td>(</td> 734 <td class="paramtype">void * </td> 735 <td class="paramname"><em>pCmdOut</em>, </td> 736 </tr> 737 <tr> 738 <td class="paramkey"></td> 739 <td></td> 740 <td class="paramtype">uint32_t </td> 741 <td class="paramname"><em>offset</em>, </td> 742 </tr> 743 <tr> 744 <td class="paramkey"></td> 745 <td></td> 746 <td class="paramtype">uint32_t </td> 747 <td class="paramname"><em>size</em> </td> 748 </tr> 749 <tr> 750 <td></td> 751 <td>)</td> 752 <td></td><td></td> 753 </tr> 754 </table> 755</div><div class="memdoc"> 756 757<p>The SPI Read Pre-Process function to generate Sensor specific SPI Message Header. </p> 758<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> 759 <table class="params"> 760 <tr><td class="paramdir">[out]</td><td class="paramname">pCmdOut</td><td>handle to the output buffer. </td></tr> 761 <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>the address of the register to start reading from. </td></tr> 762 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>number of bytes to read. </td></tr> 763 </table> 764 </dd> 765</dl> 766<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> 767<dl class="section return"><dt>Returns</dt><dd>:: None. </dd></dl> 768 769<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00030">30</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 770 771<p class="reference">References <a class="el" href="a00032_source.html#l00069">FXAS21002_SPI_CMD_LEN</a>, <a class="el" href="a00029_source.html#l00023">fxas21002_spiRead_CmdBuffer</a>, <a class="el" href="a00029_source.html#l00024">fxas21002_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> 772 773<p class="reference">Referenced by <a class="el" href="a00029_source.html#l00065">FXAS21002_SPI_Initialize()</a>.</p> 774<div class="dynheader"> 775Here is the caller graph for this function:</div> 776<div class="dyncontent"> 777<div class="center"><img src="a00029_afceee373b0c1d2801fddd1c705631bf9_icgraph.png" border="0" usemap="#a00029_afceee373b0c1d2801fddd1c705631bf9_icgraph" alt=""/></div> 778<map name="a00029_afceee373b0c1d2801fddd1c705631bf9_icgraph" id="a00029_afceee373b0c1d2801fddd1c705631bf9_icgraph"> 779<area shape="rect" id="node2" href="a00032.html#a6a3e2b9d7fd78d3bcfbeae10000473c7" title="The interface function to initialize the sensor. " alt="" coords="275,5,447,32"/> 780</map> 781</div> 782 783</div> 784</div> 785<a id="a77b65a7e717aaa720fc11a273ecaf23e"></a> 786<h2 class="memtitle"><span class="permalink"><a href="#a77b65a7e717aaa720fc11a273ecaf23e">◆ </a></span>FXAS21002_SPI_SetIdleTask()</h2> 787 788<div class="memitem"> 789<div class="memproto"> 790 <table class="memname"> 791 <tr> 792 <td class="memname">void FXAS21002_SPI_SetIdleTask </td> 793 <td>(</td> 794 <td class="paramtype"><a class="el" href="a01219.html">fxas21002_spi_sensorhandle_t</a> * </td> 795 <td class="paramname"><em>pSensorHandle</em>, </td> 796 </tr> 797 <tr> 798 <td class="paramkey"></td> 799 <td></td> 800 <td class="paramtype"><a class="el" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a> </td> 801 <td class="paramname"><em>idleTask</em>, </td> 802 </tr> 803 <tr> 804 <td class="paramkey"></td> 805 <td></td> 806 <td class="paramtype">void * </td> 807 <td class="paramname"><em>userParam</em> </td> 808 </tr> 809 <tr> 810 <td></td> 811 <td>)</td> 812 <td></td><td></td> 813 </tr> 814 </table> 815</div><div class="memdoc"> 816 817<p>: The interface function to set the SPI Idle Task. </p> 818<dl class="params"><dt>Parameters</dt><dd> 819 <table class="params"> 820 <tr><td class="paramdir">[in]</td><td class="paramname"></td><td><a class="el" href="a01219.html" title="This defines the sensor specific information for SPI. ">fxas21002_spi_sensorhandle_t</a> *pSensorHandle, handle to the sensor handle. </td></tr> 821 <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> 822 <tr><td class="paramdir">[in]</td><td class="paramname"></td><td>void *userParam, the pointer to the user idle ftask parameters. </td></tr> 823 </table> 824 </dd> 825</dl> 826<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl> 827<dl class="section user"><dt>Constraints:</dt><dd>This can be called any number of times only after <a class="el" href="a00032.html#a6a3e2b9d7fd78d3bcfbeae10000473c7" title="The interface function to initialize the sensor. ">FXAS21002_SPI_Initialize()</a>. Application has to ensure that previous instances of these APIs have exited before invocation. No </dd></dl> 828 829<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00117">117</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 830 831<p class="reference">References <a class="el" href="a00032_source.html#l00035">fxas21002_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> 832 833<p class="reference">Referenced by <a class="el" href="a00203_source.html#l00062">main()</a>.</p> 834<div class="dynheader"> 835Here is the caller graph for this function:</div> 836<div class="dyncontent"> 837<div class="center"><img src="a00029_a77b65a7e717aaa720fc11a273ecaf23e_icgraph.png" border="0" usemap="#a00029_a77b65a7e717aaa720fc11a273ecaf23e_icgraph" alt=""/></div> 838<map name="a00029_a77b65a7e717aaa720fc11a273ecaf23e_icgraph" id="a00029_a77b65a7e717aaa720fc11a273ecaf23e_icgraph"> 839<area shape="rect" id="node2" href="a00203.html#a840291bc02cba5474a4cb46a9b9566fe" title="This is the The main function implementation. " alt="" coords="247,5,297,32"/> 840</map> 841</div> 842 843</div> 844</div> 845<a id="aa1f967ba54b41d16346172871061b35d"></a> 846<h2 class="memtitle"><span class="permalink"><a href="#aa1f967ba54b41d16346172871061b35d">◆ </a></span>FXAS21002_SPI_WritePreprocess()</h2> 847 848<div class="memitem"> 849<div class="memproto"> 850 <table class="memname"> 851 <tr> 852 <td class="memname">void FXAS21002_SPI_WritePreprocess </td> 853 <td>(</td> 854 <td class="paramtype">void * </td> 855 <td class="paramname"><em>pCmdOut</em>, </td> 856 </tr> 857 <tr> 858 <td class="paramkey"></td> 859 <td></td> 860 <td class="paramtype">uint32_t </td> 861 <td class="paramname"><em>offset</em>, </td> 862 </tr> 863 <tr> 864 <td class="paramkey"></td> 865 <td></td> 866 <td class="paramtype">uint32_t </td> 867 <td class="paramname"><em>size</em>, </td> 868 </tr> 869 <tr> 870 <td class="paramkey"></td> 871 <td></td> 872 <td class="paramtype">void * </td> 873 <td class="paramname"><em>pWritebuffer</em> </td> 874 </tr> 875 <tr> 876 <td></td> 877 <td>)</td> 878 <td></td><td></td> 879 </tr> 880 </table> 881</div><div class="memdoc"> 882 883<p>The SPI Write Pre-Process function to generate Sensor specific SPI Message Header. </p> 884<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> 885 <table class="params"> 886 <tr><td class="paramdir">[out]</td><td class="paramname">pCmdOut</td><td>handle to the output buffer. </td></tr> 887 <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>the address of the register to start writing from. </td></tr> 888 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>number of bytes to write. </td></tr> 889 </table> 890 </dd> 891</dl> 892<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> 893<dl class="section return"><dt>Returns</dt><dd>:: None. </dd></dl> 894 895<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00046">46</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 896 897<p class="reference">References <a class="el" href="a00032_source.html#l00069">FXAS21002_SPI_CMD_LEN</a>, <a class="el" href="a00029_source.html#l00025">fxas21002_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> 898 899<p class="reference">Referenced by <a class="el" href="a00029_source.html#l00065">FXAS21002_SPI_Initialize()</a>.</p> 900<div class="dynheader"> 901Here is the caller graph for this function:</div> 902<div class="dyncontent"> 903<div class="center"><img src="a00029_aa1f967ba54b41d16346172871061b35d_icgraph.png" border="0" usemap="#a00029_aa1f967ba54b41d16346172871061b35d_icgraph" alt=""/></div> 904<map name="a00029_aa1f967ba54b41d16346172871061b35d_icgraph" id="a00029_aa1f967ba54b41d16346172871061b35d_icgraph"> 905<area shape="rect" id="node2" href="a00032.html#a6a3e2b9d7fd78d3bcfbeae10000473c7" title="The interface function to initialize the sensor. " alt="" coords="276,5,448,32"/> 906</map> 907</div> 908 909</div> 910</div> 911<h2 class="groupheader">Variable Documentation</h2> 912<a id="aaf98f99ffff795b86e488ac43c806a22"></a> 913<h2 class="memtitle"><span class="permalink"><a href="#aaf98f99ffff795b86e488ac43c806a22">◆ </a></span>fxas21002_spiRead_CmdBuffer</h2> 914 915<div class="memitem"> 916<div class="memproto"> 917 <table class="memname"> 918 <tr> 919 <td class="memname">uint8_t fxas21002_spiRead_CmdBuffer[<a class="el" href="a00032.html#ac1f8ff2da867d0c0d9b9d440d38ad82a">FXAS21002_SPI_MAX_MSG_SIZE</a>] = {0}</td> 920 </tr> 921 </table> 922</div><div class="memdoc"> 923 924<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00023">23</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 925 926<p class="reference">Referenced by <a class="el" href="a00029_source.html#l00030">FXAS21002_SPI_ReadPreprocess()</a>.</p> 927 928</div> 929</div> 930<a id="a096e9df8d8b2f795ea1001b883777ac0"></a> 931<h2 class="memtitle"><span class="permalink"><a href="#a096e9df8d8b2f795ea1001b883777ac0">◆ </a></span>fxas21002_spiRead_DataBuffer</h2> 932 933<div class="memitem"> 934<div class="memproto"> 935 <table class="memname"> 936 <tr> 937 <td class="memname">uint8_t fxas21002_spiRead_DataBuffer[<a class="el" href="a00032.html#ac1f8ff2da867d0c0d9b9d440d38ad82a">FXAS21002_SPI_MAX_MSG_SIZE</a>] = {0}</td> 938 </tr> 939 </table> 940</div><div class="memdoc"> 941 942<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00024">24</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 943 944<p class="reference">Referenced by <a class="el" href="a00029_source.html#l00030">FXAS21002_SPI_ReadPreprocess()</a>.</p> 945 946</div> 947</div> 948<a id="a54d1d2ef4c0821940afc2fa343407dd7"></a> 949<h2 class="memtitle"><span class="permalink"><a href="#a54d1d2ef4c0821940afc2fa343407dd7">◆ </a></span>fxas21002_spiWrite_CmdDataBuffer</h2> 950 951<div class="memitem"> 952<div class="memproto"> 953 <table class="memname"> 954 <tr> 955 <td class="memname">uint8_t fxas21002_spiWrite_CmdDataBuffer[<a class="el" href="a00032.html#ac1f8ff2da867d0c0d9b9d440d38ad82a">FXAS21002_SPI_MAX_MSG_SIZE</a>] = {0}</td> 956 </tr> 957 </table> 958</div><div class="memdoc"> 959 960<p class="definition">Definition at line <a class="el" href="a00029_source.html#l00025">25</a> of file <a class="el" href="a00029_source.html">fxas21002_drv.c</a>.</p> 961 962<p class="reference">Referenced by <a class="el" href="a00029_source.html#l00046">FXAS21002_SPI_WritePreprocess()</a>.</p> 963 964</div> 965</div> 966</div><!-- contents --> 967 968<hr class="footer"/><address class="footer"><small> 969© Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause 970</small></address> 971</body> 972</html> 973