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/dbap_drv.c Source File</title> 9<link href="tabs.css" rel="stylesheet" type="text/css"/> 10<script type="text/javascript" src="jquery.js"></script> 11<script type="text/javascript" src="dynsections.js"></script> 12<link href="issdk_stylesheet.css" rel="stylesheet" type="text/css" /> 13</head> 14<body> 15<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 16<div id="titlearea"> 17<table cellspacing="0" cellpadding="0"> 18 <tbody> 19 <tr style="height: 56px;"> 20 <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td> 21 <td id="projectalign" style="padding-left: 0.5em;"> 22 <div id="projectname">ISSDK 23  <span id="projectnumber">1.8</span> 24 </div> 25 <div id="projectbrief">IoT Sensing Software Development Kit</div> 26 </td> 27 </tr> 28 </tbody> 29</table> 30</div> 31<!-- end header part --> 32<!-- Generated by Doxygen 1.8.13 --> 33<script type="text/javascript" src="menudata.js"></script> 34<script type="text/javascript" src="menu.js"></script> 35<script type="text/javascript"> 36$(function() { 37 initMenu('',false,false,'search.php','Search'); 38}); 39</script> 40<div id="main-nav"></div> 41<div id="nav-path" class="navpath"> 42 <ul> 43<li class="navelem"><a class="el" href="dir_c77a8e2546a9c75bbba96be2ef542c8e.html">sensors</a></li> </ul> 44</div> 45</div><!-- top --> 46<div class="header"> 47 <div class="headertitle"> 48<div class="title">dbap_drv.c</div> </div> 49</div><!--header--> 50<div class="contents"> 51<a href="a00020.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">* Copyright 2020 NXP</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">* All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">*</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">* SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">*/</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">/**</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * @file dbap_drv.c</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * @brief The dbap_drv.c file implements the dbap functional interface.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> */</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// ISSDK Includes</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">//-----------------------------------------------------------------------</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "gpio_driver.h"</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="a00023.html">dbap_drv.h</a>"</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="a00533.html">systick_utils.h</a>"</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="a00023.html#a323da7d733afd26537b253eb88b03ddd"> 21</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00020.html#a323da7d733afd26537b253eb88b03ddd">DBAP_I2C_Initialize</a>(</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <a class="code" href="a01107.html">dbap_i2c_sensorhandle_t</a> *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t whoAmi)</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> {</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  uint8_t reg = 1;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> /*! Check the input parameters. */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordflow">if</span> ((pSensorHandle == NULL) || (pBus == NULL))</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7">SENSOR_ERROR_INVALID_PARAM</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  }</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  pSensorHandle-><a class="code" href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>.<a class="code" href="a03819.html#a693f84e28d48677a73cd40d7e5fc79ed">deviceInstance</a> = index;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  pSensorHandle-><a class="code" href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>.<a class="code" href="a03819.html#abb8c8f961a02b447e127bd6ef3215c7d">functionParam</a> = NULL;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  pSensorHandle-><a class="code" href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>.<a class="code" href="a03819.html#acf9a866fc6b31f72a8e26437420e0354">idleFunction</a> = NULL;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment"></span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> /*! Read and store the device's WHO_AM_I.*/</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  status = <a class="code" href="a00167.html#ac8a60c799d9dbc84531b4680762eb8dc">Register_I2C_Read</a>(pBus, &pSensorHandle-><a class="code" href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>, sAddress, <a class="code" href="a00017.html#a06fc87d81c62e9abb8790b6e5713c55ba39745f7be8f811a2e83250e775c2c3f5">FXPS7250_WHO_AM_I</a>, 1, &reg);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordflow">if</span> ((ARM_DRIVER_OK != status) || (whoAmi != reg))</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  pSensorHandle-><a class="code" href="a01107.html#a1fdc2bf5595c2e64dc06d987769834eb">isInitialized</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca7f5031b1497c3a8a4bcb78cce879dedd">SENSOR_ERROR_INIT</a>;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment"></span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"> /*! Initialize the sensor handle. */</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  pSensorHandle-><a class="code" href="a01107.html#af6d4d51d4fb48cfb392eeb03ac26abed">pCommDrv</a> = pBus;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  pSensorHandle-><a class="code" href="a01107.html#a67af74c3fc959654c6dc8bcff3a2ea80">slaveAddress</a> = sAddress;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  pSensorHandle-><a class="code" href="a01107.html#a1fdc2bf5595c2e64dc06d987769834eb">isInitialized</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> }</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="a00023.html#a94b27fc5b6a2f0cf6bef7a29662e26dd"> 53</a></span> <span class="keywordtype">void</span> <a class="code" href="a00020.html#a94b27fc5b6a2f0cf6bef7a29662e26dd">DBAP_I2C_SetIdleTask</a>(<a class="code" href="a01107.html">dbap_i2c_sensorhandle_t</a> *pSensorHandle, <a class="code" href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a> idleTask, <span class="keywordtype">void</span> *userParam)</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> {</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  pSensorHandle-><a class="code" href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>.<a class="code" href="a03819.html#abb8c8f961a02b447e127bd6ef3215c7d">functionParam</a> = userParam;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  pSensorHandle-><a class="code" href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>.<a class="code" href="a03819.html#acf9a866fc6b31f72a8e26437420e0354">idleFunction</a> = idleTask;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> }</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="a00023.html#a849b79b8590f04ee48ca7cca38b69106"> 59</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00020.html#a849b79b8590f04ee48ca7cca38b69106">DBAP_I2C_Configure</a>(<a class="code" href="a01107.html">dbap_i2c_sensorhandle_t</a> *pSensorHandle, <span class="keyword">const</span> <a class="code" href="a03807.html">registerwritelist_t</a> *pRegWriteList)</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment"></span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="comment"> /*! Validate for the correct handle and register write list.*/</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">if</span> ((pSensorHandle == NULL) || (pRegWriteList == NULL))</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7">SENSOR_ERROR_INVALID_PARAM</a>;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  }</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment"></span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> /*! Check whether sensor handle is initialized before applying configuration.*/</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">if</span> (pSensorHandle-><a class="code" href="a01107.html#a1fdc2bf5595c2e64dc06d987769834eb">isInitialized</a> != <span class="keyword">true</span>)</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  {</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca7f5031b1497c3a8a4bcb78cce879dedd">SENSOR_ERROR_INIT</a>;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  }</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment"></span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> /*! Apply the Sensor Configuration based on the Register Write List */</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  status = <a class="code" href="a00182.html#aaac4c4f34b4dd37d3f202a1dbb4b000b">Sensor_I2C_Write</a>(pSensorHandle-><a class="code" href="a01107.html#af6d4d51d4fb48cfb392eeb03ac26abed">pCommDrv</a>, &pSensorHandle-><a class="code" href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>, pSensorHandle-><a class="code" href="a01107.html#a67af74c3fc959654c6dc8bcff3a2ea80">slaveAddress</a>,</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  pRegWriteList);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  {</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acae2a1d27a0c4405ab02566a7fc618d193">SENSOR_ERROR_WRITE</a>;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a>;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> }</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="a00023.html#aec2b12b56472df621f961aa34ddb0ff1"> 86</a></span> <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00020.html#aec2b12b56472df621f961aa34ddb0ff1">DBAP_I2C_ReadData</a>(<a class="code" href="a01107.html">dbap_i2c_sensorhandle_t</a> *pSensorHandle,</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keyword">const</span> <a class="code" href="a03811.html">registerreadlist_t</a> *pReadList,</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  uint8_t *pBuffer)</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <a class="code" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a> <a class="code" href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a>;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"></span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> /*! Validate for the correct handle and register read list.*/</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">if</span> ((pSensorHandle == NULL) || (pReadList == NULL) || (pBuffer == NULL))</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7">SENSOR_ERROR_INVALID_PARAM</a>;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  }</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"></span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> /*! Check whether sensor handle is initialized before reading sensor data.*/</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">if</span> (pSensorHandle-><a class="code" href="a01107.html#a1fdc2bf5595c2e64dc06d987769834eb">isInitialized</a> != <span class="keyword">true</span>)</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  {</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca7f5031b1497c3a8a4bcb78cce879dedd">SENSOR_ERROR_INIT</a>;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  }</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"></span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> /*! Parse through the read list and read the data one by one. */</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  status = <a class="code" href="a00182.html#aa75349faed7c77807cb88d9224aa2636">Sensor_I2C_Read</a>(pSensorHandle-><a class="code" href="a01107.html#af6d4d51d4fb48cfb392eeb03ac26abed">pCommDrv</a>, &pSensorHandle-><a class="code" href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">deviceInfo</a>, pSensorHandle-><a class="code" href="a01107.html#a67af74c3fc959654c6dc8bcff3a2ea80">slaveAddress</a>,</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  pReadList, pBuffer);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">if</span> (ARM_DRIVER_OK != status)</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acab93ad77156e08d1bebe52bf46936cccc">SENSOR_ERROR_READ</a>;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">return</span> <a class="code" href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a>;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> }</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div><div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5acae2a1d27a0c4405ab02566a7fc618d193"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acae2a1d27a0c4405ab02566a7fc618d193">SENSOR_ERROR_WRITE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00037">sensor_drv.h:37</a></div></div> 52<div class="ttc" id="a00020_html_aec2b12b56472df621f961aa34ddb0ff1"><div class="ttname"><a href="a00020.html#aec2b12b56472df621f961aa34ddb0ff1">DBAP_I2C_ReadData</a></div><div class="ttdeci">int32_t DBAP_I2C_ReadData(dbap_i2c_sensorhandle_t *pSensorHandle, const registerreadlist_t *pReadList, uint8_t *pBuffer)</div><div class="ttdoc">The interface function to read the sensor data. </div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00086">dbap_drv.c:86</a></div></div> 53<div class="ttc" id="a00182_html_aa75349faed7c77807cb88d9224aa2636"><div class="ttname"><a href="a00182.html#aa75349faed7c77807cb88d9224aa2636">Sensor_I2C_Read</a></div><div class="ttdeci">int32_t Sensor_I2C_Read(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, const registerreadlist_t *pReadList, uint8_t *pOutBuffer)</div><div class="ttdoc">Read register data from a sensor. </div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l00105">sensor_io_i2c.c:105</a></div></div> 54<div class="ttc" id="a03807_html"><div class="ttname"><a href="a03807.html">registerwritelist_t</a></div><div class="ttdoc">This structure defines the Write command List. </div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00068">sensor_drv.h:68</a></div></div> 55<div class="ttc" id="a00359_html_a369536ebfe385731562c0b55dd6f3a7c"><div class="ttname"><a href="a00359.html#a369536ebfe385731562c0b55dd6f3a7c">status</a></div><div class="ttdeci">int32_t status</div><div class="ttdef"><b>Definition:</b> <a href="a00359_source.html#l00248">fxls896xaf_freemaster_demo.c:248</a></div></div> 56<div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca961b6871536a27c9e4718100e0024274">SENSOR_ERROR_NONE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00033">sensor_drv.h:33</a></div></div> 57<div class="ttc" id="a01107_html"><div class="ttname"><a href="a01107.html">dbap_i2c_sensorhandle_t</a></div><div class="ttdoc">This defines the sensor specific information for I2C. </div><div class="ttdef"><b>Definition:</b> <a href="a00023_source.html#l00033">dbap_drv.h:33</a></div></div> 58<div class="ttc" id="a00020_html_a94b27fc5b6a2f0cf6bef7a29662e26dd"><div class="ttname"><a href="a00020.html#a94b27fc5b6a2f0cf6bef7a29662e26dd">DBAP_I2C_SetIdleTask</a></div><div class="ttdeci">void DBAP_I2C_SetIdleTask(dbap_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)</div><div class="ttdoc">: The interface function to set the I2C Idle Task. </div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00053">dbap_drv.c:53</a></div></div> 59<div class="ttc" id="a00167_html_ac8a60c799d9dbc84531b4680762eb8dc"><div class="ttname"><a href="a00167.html#ac8a60c799d9dbc84531b4680762eb8dc">Register_I2C_Read</a></div><div class="ttdeci">int32_t Register_I2C_Read(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, uint8_t offset, uint8_t length, uint8_t *pOutBuffer)</div><div class="ttdoc">The interface function to read a sensor register. </div><div class="ttdef"><b>Definition:</b> <a href="a00167_source.html#l00310">register_io_i2c.c:310</a></div></div> 60<div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5aca7f5031b1497c3a8a4bcb78cce879dedd"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca7f5031b1497c3a8a4bcb78cce879dedd">SENSOR_ERROR_INIT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00036">sensor_drv.h:36</a></div></div> 61<div class="ttc" id="a01107_html_a1fdc2bf5595c2e64dc06d987769834eb"><div class="ttname"><a href="a01107.html#a1fdc2bf5595c2e64dc06d987769834eb">dbap_i2c_sensorhandle_t::isInitialized</a></div><div class="ttdeci">bool isInitialized</div><div class="ttdef"><b>Definition:</b> <a href="a00023_source.html#l00037">dbap_drv.h:37</a></div></div> 62<div class="ttc" id="a01107_html_a67af74c3fc959654c6dc8bcff3a2ea80"><div class="ttname"><a href="a01107.html#a67af74c3fc959654c6dc8bcff3a2ea80">dbap_i2c_sensorhandle_t::slaveAddress</a></div><div class="ttdeci">uint16_t slaveAddress</div><div class="ttdef"><b>Definition:</b> <a href="a00023_source.html#l00038">dbap_drv.h:38</a></div></div> 63<div class="ttc" id="a00023_html"><div class="ttname"><a href="a00023.html">dbap_drv.h</a></div><div class="ttdoc">The dbap_drv.h file describes the DBAP driver interface and structures. </div></div> 64<div class="ttc" id="a03819_html_a693f84e28d48677a73cd40d7e5fc79ed"><div class="ttname"><a href="a03819.html#a693f84e28d48677a73cd40d7e5fc79ed">registerDeviceInfo_t::deviceInstance</a></div><div class="ttdeci">uint8_t deviceInstance</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00106">sensor_drv.h:106</a></div></div> 65<div class="ttc" id="a01107_html_af6d4d51d4fb48cfb392eeb03ac26abed"><div class="ttname"><a href="a01107.html#af6d4d51d4fb48cfb392eeb03ac26abed">dbap_i2c_sensorhandle_t::pCommDrv</a></div><div class="ttdeci">ARM_DRIVER_I2C * pCommDrv</div><div class="ttdef"><b>Definition:</b> <a href="a00023_source.html#l00036">dbap_drv.h:36</a></div></div> 66<div class="ttc" id="a00521_html_a5d7069350a7d7e65686c77a8038f462f"><div class="ttname"><a href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t</a></div><div class="ttdeci">typedef int32_t(DATA_FORMAT_Append_t))(void *pData</div><div class="ttdoc">The interface function to append the data on the formated stream. </div></div> 67<div class="ttc" id="a01107_html_ae75b47fd9e098d6bd3b28f6be6586998"><div class="ttname"><a href="a01107.html#ae75b47fd9e098d6bd3b28f6be6586998">dbap_i2c_sensorhandle_t::deviceInfo</a></div><div class="ttdeci">registerDeviceInfo_t deviceInfo</div><div class="ttdef"><b>Definition:</b> <a href="a00023_source.html#l00035">dbap_drv.h:35</a></div></div> 68<div class="ttc" id="a00182_html_aaac4c4f34b4dd37d3f202a1dbb4b000b"><div class="ttname"><a href="a00182.html#aaac4c4f34b4dd37d3f202a1dbb4b000b">Sensor_I2C_Write</a></div><div class="ttdeci">int32_t Sensor_I2C_Write(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, const registerwritelist_t *pRegWriteList)</div><div class="ttdoc">Write register data to a sensor. </div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l00071">sensor_io_i2c.c:71</a></div></div> 69<div class="ttc" id="a00179_html_a5deff6bd688b60b97b84fc7e78d3ea63"><div class="ttname"><a href="a00179.html#a5deff6bd688b60b97b84fc7e78d3ea63">registeridlefunction_t</a></div><div class="ttdeci">void(* registeridlefunction_t)(void *userParam)</div><div class="ttdoc">This is the register idle function type. </div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00097">sensor_drv.h:97</a></div></div> 70<div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5acab93ad77156e08d1bebe52bf46936cccc"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5acab93ad77156e08d1bebe52bf46936cccc">SENSOR_ERROR_READ</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00038">sensor_drv.h:38</a></div></div> 71<div class="ttc" id="a03819_html_abb8c8f961a02b447e127bd6ef3215c7d"><div class="ttname"><a href="a03819.html#abb8c8f961a02b447e127bd6ef3215c7d">registerDeviceInfo_t::functionParam</a></div><div class="ttdeci">void * functionParam</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00105">sensor_drv.h:105</a></div></div> 72<div class="ttc" id="a00179_html_a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7"><div class="ttname"><a href="a00179.html#a18a00cbfd8ad83c7fd229cd0d5fad5aca78230e17f41b0ec3e31a708f36c7eaa7">SENSOR_ERROR_INVALID_PARAM</a></div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00034">sensor_drv.h:34</a></div></div> 73<div class="ttc" id="a00017_html_a06fc87d81c62e9abb8790b6e5713c55ba39745f7be8f811a2e83250e775c2c3f5"><div class="ttname"><a href="a00017.html#a06fc87d81c62e9abb8790b6e5713c55ba39745f7be8f811a2e83250e775c2c3f5">FXPS7250_WHO_AM_I</a></div><div class="ttdef"><b>Definition:</b> <a href="a00017_source.html#l00042">dbap.h:42</a></div></div> 74<div class="ttc" id="a00020_html_a323da7d733afd26537b253eb88b03ddd"><div class="ttname"><a href="a00020.html#a323da7d733afd26537b253eb88b03ddd">DBAP_I2C_Initialize</a></div><div class="ttdeci">int32_t DBAP_I2C_Initialize(dbap_i2c_sensorhandle_t *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t whoAmi)</div><div class="ttdoc">The interface function to initialize the sensor. </div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00021">dbap_drv.c:21</a></div></div> 75<div class="ttc" id="a03811_html"><div class="ttname"><a href="a03811.html">registerreadlist_t</a></div><div class="ttdoc">This structure defines the Read command List. </div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00078">sensor_drv.h:78</a></div></div> 76<div class="ttc" id="a00533_html"><div class="ttname"><a href="a00533.html">systick_utils.h</a></div><div class="ttdoc">ARM Systick Utilities. </div></div> 77<div class="ttc" id="a00020_html_a849b79b8590f04ee48ca7cca38b69106"><div class="ttname"><a href="a00020.html#a849b79b8590f04ee48ca7cca38b69106">DBAP_I2C_Configure</a></div><div class="ttdeci">int32_t DBAP_I2C_Configure(dbap_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)</div><div class="ttdoc">The interface function to configure he sensor. </div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00059">dbap_drv.c:59</a></div></div> 78<div class="ttc" id="a03819_html_acf9a866fc6b31f72a8e26437420e0354"><div class="ttname"><a href="a03819.html#acf9a866fc6b31f72a8e26437420e0354">registerDeviceInfo_t::idleFunction</a></div><div class="ttdeci">registeridlefunction_t idleFunction</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00104">sensor_drv.h:104</a></div></div> 79</div><!-- fragment --></div><!-- contents --> 80 81<hr class="footer"/><address class="footer"><small> 82© Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause 83</small></address> 84</body> 85</html> 86