1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6<meta name="generator" content="Doxygen 1.8.13"/>
7<meta name="viewport" content="width=device-width, initial-scale=1"/>
8<title>ISSDK: driverexamples/demos/orientaion_application_baremetal_agmp03.c File Reference</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="issdk_stylesheet.css" rel="stylesheet" type="text/css" />
13</head>
14<body>
15<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
16<div id="titlearea">
17<table cellspacing="0" cellpadding="0">
18 <tbody>
19 <tr style="height: 56px;">
20  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
21  <td id="projectalign" style="padding-left: 0.5em;">
22   <div id="projectname">ISSDK
23   &#160;<span id="projectnumber">1.8</span>
24   </div>
25   <div id="projectbrief">IoT Sensing Software Development Kit</div>
26  </td>
27 </tr>
28 </tbody>
29</table>
30</div>
31<!-- end header part -->
32<!-- Generated by Doxygen 1.8.13 -->
33<script type="text/javascript" src="menudata.js"></script>
34<script type="text/javascript" src="menu.js"></script>
35<script type="text/javascript">
36$(function() {
37  initMenu('',false,false,'search.php','Search');
38});
39</script>
40<div id="main-nav"></div>
41<div id="nav-path" class="navpath">
42  <ul>
43<li class="navelem"><a class="el" href="dir_63958a0a083234c4c5a126855d7f4594.html">driverexamples</a></li><li class="navelem"><a class="el" href="dir_75b6ec340b7293f2efc92c9371853817.html">demos</a></li>  </ul>
44</div>
45</div><!-- top -->
46<div class="header">
47  <div class="summary">
48<a href="#define-members">Macros</a> &#124;
49<a href="#func-members">Functions</a> &#124;
50<a href="#var-members">Variables</a>  </div>
51  <div class="headertitle">
52<div class="title">orientaion_application_baremetal_agmp03.c File Reference</div>  </div>
53</div><!--header-->
54<div class="contents">
55
56<p>The <a class="el" href="a00476.html" title="The orientaion_application_baremetal_agmp03.c file implements the ISSDK baremetal orientation applica...">orientaion_application_baremetal_agmp03.c</a> file implements the ISSDK baremetal orientation application for FRDM-STBC-AGMP03 using sensor fusion core functional interfaces and host i/o interface.
57<a href="#details">More...</a></p>
58<div class="textblock"><code>#include &quot;board.h&quot;</code><br />
59<code>#include &quot;pin_mux.h&quot;</code><br />
60<code>#include &quot;clock_config.h&quot;</code><br />
61<code>#include &quot;fsl_port.h&quot;</code><br />
62<code>#include &quot;fsl_i2c.h&quot;</code><br />
63<code>#include &quot;fsl_pit.h&quot;</code><br />
64<code>#include &quot;Driver_USART.h&quot;</code><br />
65<code>#include &quot;fsl_i2c_cmsis.h&quot;</code><br />
66<code>#include &quot;fsl_uart_cmsis.h&quot;</code><br />
67<code>#include &quot;<a class="el" href="a00170_source.html">register_io_i2c.h</a>&quot;</code><br />
68<code>#include &quot;<a class="el" href="a00101_source.html">host_io_uart.h</a>&quot;</code><br />
69<code>#include &quot;gpio_driver.h&quot;</code><br />
70<code>#include &quot;auto_detection_service.h&quot;</code><br />
71<code>#include &quot;<a class="el" href="a00533_source.html">systick_utils.h</a>&quot;</code><br />
72<code>#include &quot;<a class="el" href="a00914_source.html">sensor_fusion.h</a>&quot;</code><br />
73<code>#include &quot;<a class="el" href="a00779_source.html">control.h</a>&quot;</code><br />
74<code>#include &quot;<a class="el" href="a00923_source.html">status.h</a>&quot;</code><br />
75<code>#include &quot;<a class="el" href="a00842_source.html">drivers.h</a>&quot;</code><br />
76<code>#include &quot;<a class="el" href="a00836_source.html">driver_pit.h</a>&quot;</code><br />
77</div><div class="textblock"><div class="dynheader">
78Include dependency graph for orientaion_application_baremetal_agmp03.c:</div>
79<div class="dyncontent">
80<div class="center"><img src="a00477.png" border="0" usemap="#driverexamples_2demos_2orientaion__application__baremetal__agmp03_8c" alt=""/></div>
81<map name="driverexamples_2demos_2orientaion__application__baremetal__agmp03_8c" id="driverexamples_2demos_2orientaion__application__baremetal__agmp03_8c">
82<area shape="rect" id="node11" href="a00170.html" title="The register_io_i2c.h file declares low&#45;level interface functions for reading and writing sensor regi..." alt="" coords="946,109,1063,136"/>
83<area shape="rect" id="node12" href="a00101.html" title="The host_io_uart.h file contains the Host Protocol interface definitions and configuration. " alt="" coords="1087,109,1191,136"/>
84<area shape="rect" id="node15" href="a00533.html" title="ARM Systick Utilities. " alt="" coords="1525,109,1631,136"/>
85<area shape="rect" id="node16" href="a00914.html" title="The sensor_fusion.h file implements the top level programming interface. " alt="" coords="1656,109,1769,136"/>
86<area shape="rect" id="node17" href="a00779.html" title="Defines control sub&#45;system. " alt="" coords="1794,109,1866,136"/>
87<area shape="rect" id="node18" href="a00923.html" title="Application&#45;specific status subsystem. " alt="" coords="1890,109,1959,136"/>
88<area shape="rect" id="node19" href="a00842.html" title="Provides function prototypes for driver level interfaces. " alt="" coords="1984,109,2055,136"/>
89<area shape="rect" id="node20" href="a00836.html" title="Provides a simple abstraction for a periodic interval timer. " alt="" coords="2079,109,2163,136"/>
90</map>
91</div>
92</div>
93<p><a href="a00476_source.html">Go to the source code of this file.</a></p>
94<table class="memberdecls">
95<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
96Macros</h2></td></tr>
97<tr class="memitem:ad35aa53071a58d71bf2e6b0969dcb9ff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#ad35aa53071a58d71bf2e6b0969dcb9ff">TIMESTAMP_DATA_SIZE</a>&#160;&#160;&#160;(4)                             /* Orientation Packet: TimeStamp field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
98<tr class="separator:ad35aa53071a58d71bf2e6b0969dcb9ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
99<tr class="memitem:af1ca867d8bda62a5d05bc7b7076bf0cc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#af1ca867d8bda62a5d05bc7b7076bf0cc">NINEAXISSENSOR_DATA_SIZE</a>&#160;&#160;&#160;(18)                            /* Orientation Packet: 9 Axis Sensor Data, Accel, Mag, Gyro field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
100<tr class="separator:af1ca867d8bda62a5d05bc7b7076bf0cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
101<tr class="memitem:a7d10b4fe945d6eaad527773e84835341"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a7d10b4fe945d6eaad527773e84835341">QUATERNION_SIZE</a>&#160;&#160;&#160;(8)                             /* Orientation Packet: <a class="el" href="a03979.html">Quaternion</a> field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
102<tr class="separator:a7d10b4fe945d6eaad527773e84835341"><td class="memSeparator" colspan="2">&#160;</td></tr>
103<tr class="memitem:a57acace0eb7ea3d82f09773287d905ca"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a57acace0eb7ea3d82f09773287d905ca">EULERANGLE_DATA_SIZE</a>&#160;&#160;&#160;(6)                             /* Orientation Packet: Roll,Pitch,Compass Euler angles packet field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
104<tr class="separator:a57acace0eb7ea3d82f09773287d905ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
105<tr class="memitem:a4bacf46ced48e561f654169d78f32ba2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a4bacf46ced48e561f654169d78f32ba2">FITERROR_DATA_SIZE</a>&#160;&#160;&#160;(2)                             /* Orientation Packet: FitError% field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
106<tr class="separator:a4bacf46ced48e561f654169d78f32ba2"><td class="memSeparator" colspan="2">&#160;</td></tr>
107<tr class="memitem:a83a0c0694e47645c3e42be4491f2e5e0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a83a0c0694e47645c3e42be4491f2e5e0">COORDINATES_SIZE</a>&#160;&#160;&#160;(1)                             /* Orientation Packet: coordinates field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
108<tr class="separator:a83a0c0694e47645c3e42be4491f2e5e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
109<tr class="memitem:a930f8c6c3310e382be6a72ca8f14cb8c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a930f8c6c3310e382be6a72ca8f14cb8c">BOARDINFO_SIZE</a>&#160;&#160;&#160;(1)                             /* Orientation Packet: BoardInfo field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
110<tr class="separator:a930f8c6c3310e382be6a72ca8f14cb8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
111<tr class="memitem:a6a45d9695319d28f8901f42d88df3778"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a6a45d9695319d28f8901f42d88df3778">BUILDNAME_SIZE</a>&#160;&#160;&#160;(2)                             /* Orientation Packet: BuildInfo field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
112<tr class="separator:a6a45d9695319d28f8901f42d88df3778"><td class="memSeparator" colspan="2">&#160;</td></tr>
113<tr class="memitem:a6326f5d80c5fc4299c64f82e9765a27a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a6326f5d80c5fc4299c64f82e9765a27a">SYSTICKINFO_SIZE</a>&#160;&#160;&#160;(2)                             /* Orientation Packet: SysTick field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td></tr>
114<tr class="separator:a6326f5d80c5fc4299c64f82e9765a27a"><td class="memSeparator" colspan="2">&#160;</td></tr>
115<tr class="memitem:adf41b2857036247c970bc8594b6a636a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#adf41b2857036247c970bc8594b6a636a">APPLICATION_NAME</a>&#160;&#160;&#160;&quot;9 Axis Orientation Sensor Demo&quot;                /* Orientation Application Name */</td></tr>
116<tr class="memdesc:adf41b2857036247c970bc8594b6a636a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unique Name for this application which should match the target GUI pkg name.  <a href="#adf41b2857036247c970bc8594b6a636a">More...</a><br /></td></tr>
117<tr class="separator:adf41b2857036247c970bc8594b6a636a"><td class="memSeparator" colspan="2">&#160;</td></tr>
118<tr class="memitem:a6efa9917d91d75dcb9036443bc2483cd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a6efa9917d91d75dcb9036443bc2483cd">APPLICATION_VERSION</a>&#160;&#160;&#160;&quot;2.5&quot;</td></tr>
119<tr class="memdesc:a6efa9917d91d75dcb9036443bc2483cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Version to distinguish between instances the same application based on target Shield and updates.  <a href="#a6efa9917d91d75dcb9036443bc2483cd">More...</a><br /></td></tr>
120<tr class="separator:a6efa9917d91d75dcb9036443bc2483cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
121<tr class="memitem:ad02dd76540fcad6aa2f8413f4e3b7bf8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#ad02dd76540fcad6aa2f8413f4e3b7bf8">STREAMING_PAYLOAD_LEN</a>&#160;&#160;&#160;(<a class="el" href="a00476.html#ad35aa53071a58d71bf2e6b0969dcb9ff">TIMESTAMP_DATA_SIZE</a> + <a class="el" href="a00476.html#af1ca867d8bda62a5d05bc7b7076bf0cc">NINEAXISSENSOR_DATA_SIZE</a> + <a class="el" href="a00476.html#a7d10b4fe945d6eaad527773e84835341">QUATERNION_SIZE</a> + <a class="el" href="a00476.html#a57acace0eb7ea3d82f09773287d905ca">EULERANGLE_DATA_SIZE</a> + <a class="el" href="a00476.html#a4bacf46ced48e561f654169d78f32ba2">FITERROR_DATA_SIZE</a> + <a class="el" href="a00476.html#a83a0c0694e47645c3e42be4491f2e5e0">COORDINATES_SIZE</a> + <a class="el" href="a00476.html#a930f8c6c3310e382be6a72ca8f14cb8c">BOARDINFO_SIZE</a> + <a class="el" href="a00476.html#a6a45d9695319d28f8901f42d88df3778">BUILDNAME_SIZE</a> + <a class="el" href="a00476.html#a6326f5d80c5fc4299c64f82e9765a27a">SYSTICKINFO_SIZE</a>)</td></tr>
122<tr class="separator:ad02dd76540fcad6aa2f8413f4e3b7bf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
123</table><table class="memberdecls">
124<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
125Functions</h2></td></tr>
126<tr class="memitem:afc1406a51c0cc9804d56dc92ef0d950e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#afc1406a51c0cc9804d56dc92ef0d950e">readAlgoParams</a> (<a class="el" href="a00914.html#a3fe0b3e3d934e9d4af406ff60f451387">SV_ptr</a> <a class="el" href="a00428.html#a0155cf01983779a6f386fb8eac40d37c">data</a>, <a class="el" href="a03979.html">Quaternion</a> *fq, int16_t *iPhi, int16_t *iThe, int16_t *iRho, int16_t iOmega[], uint16_t *isystick)</td></tr>
127<tr class="memdesc:afc1406a51c0cc9804d56dc92ef0d950e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function for reading common algorithm parameters.  <a href="#afc1406a51c0cc9804d56dc92ef0d950e">More...</a><br /></td></tr>
128<tr class="separator:afc1406a51c0cc9804d56dc92ef0d950e"><td class="memSeparator" colspan="2">&#160;</td></tr>
129<tr class="memitem:a0076d28c9a17cd6908c7b3b0f5c6006c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a0076d28c9a17cd6908c7b3b0f5c6006c">process_host_command</a> (uint8_t tag, uint8_t *hostCommand, uint8_t *hostResponse, size_t *hostMsgSize, size_t respBufferSize)</td></tr>
130<tr class="separator:a0076d28c9a17cd6908c7b3b0f5c6006c"><td class="memSeparator" colspan="2">&#160;</td></tr>
131<tr class="memitem:affc6785c2a861503e9d86d9ab0b09330"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#affc6785c2a861503e9d86d9ab0b09330">appendZerosOrientBuf</a> (uint8_t *pDest, uint16_t *pIndex, uint16_t numZeros)</td></tr>
132<tr class="memdesc:affc6785c2a861503e9d86d9ab0b09330"><td class="mdescLeft">&#160;</td><td class="mdescRight">appendZerosOrientBuf utility function  <a href="#affc6785c2a861503e9d86d9ab0b09330">More...</a><br /></td></tr>
133<tr class="separator:affc6785c2a861503e9d86d9ab0b09330"><td class="memSeparator" colspan="2">&#160;</td></tr>
134<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
135<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br /></td></tr>
136<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
137</table><table class="memberdecls">
138<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
139Variables</h2></td></tr>
140<tr class="memitem:afa81c629d378fe700f351a1bce411ad5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a04047.html">SensorFusionGlobals</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#afa81c629d378fe700f351a1bce411ad5">sfg</a></td></tr>
141<tr class="separator:afa81c629d378fe700f351a1bce411ad5"><td class="memSeparator" colspan="2">&#160;</td></tr>
142<tr class="memitem:aac92dd324ab87fabfb7a61647e6273fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03967.html">ControlSubsystem</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#aac92dd324ab87fabfb7a61647e6273fe">gOrientationControlSubsystem</a></td></tr>
143<tr class="separator:aac92dd324ab87fabfb7a61647e6273fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
144<tr class="memitem:a875f795e25aaef1b828061bbfae4764a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a04051.html">StatusSubsystem</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a875f795e25aaef1b828061bbfae4764a">statusSubsystem</a></td></tr>
145<tr class="separator:a875f795e25aaef1b828061bbfae4764a"><td class="memSeparator" colspan="2">&#160;</td></tr>
146<tr class="memitem:a9410ef028d5df163bf575ae767fa3b2c"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a9410ef028d5df163bf575ae767fa3b2c">gStreamingEnabled</a></td></tr>
147<tr class="separator:a9410ef028d5df163bf575ae767fa3b2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
148<tr class="memitem:ae69294e40b64a92ce4a1c9636db4118a"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#ae69294e40b64a92ce4a1c9636db4118a">gPrimaryStreamID</a></td></tr>
149<tr class="separator:ae69294e40b64a92ce4a1c9636db4118a"><td class="memSeparator" colspan="2">&#160;</td></tr>
150<tr class="memitem:a44681c771b24906b93d52a830b4ec968"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a44681c771b24906b93d52a830b4ec968">boardString</a> [<a class="el" href="a04838.html#a4296d0603c5898f7baef119cbfe42858">ADS_MAX_STRING_LENGTH</a>] = {0}</td></tr>
151<tr class="separator:a44681c771b24906b93d52a830b4ec968"><td class="memSeparator" colspan="2">&#160;</td></tr>
152<tr class="memitem:a1c419755be00b2aebbd8d31da9b66142"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a1c419755be00b2aebbd8d31da9b66142">shieldString</a> [<a class="el" href="a04838.html#a4296d0603c5898f7baef119cbfe42858">ADS_MAX_STRING_LENGTH</a>] = {0}</td></tr>
153<tr class="separator:a1c419755be00b2aebbd8d31da9b66142"><td class="memSeparator" colspan="2">&#160;</td></tr>
154<tr class="memitem:a70385ff3e0081022336573247e5ecaec"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a70385ff3e0081022336573247e5ecaec">embAppName</a> [<a class="el" href="a04838.html#a4296d0603c5898f7baef119cbfe42858">ADS_MAX_STRING_LENGTH</a>] = {0}</td></tr>
155<tr class="separator:a70385ff3e0081022336573247e5ecaec"><td class="memSeparator" colspan="2">&#160;</td></tr>
156<tr class="memitem:abb44e114427310fd48b45c61bbb5b066"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#abb44e114427310fd48b45c61bbb5b066">orientOutputBuffer</a> [<a class="el" href="a00101.html#adc72f7a14386aae7a4025ca511c06f54">STREAMING_HEADER_LEN</a>+<a class="el" href="a00476.html#ad02dd76540fcad6aa2f8413f4e3b7bf8">STREAMING_PAYLOAD_LEN</a>]</td></tr>
157<tr class="separator:abb44e114427310fd48b45c61bbb5b066"><td class="memSeparator" colspan="2">&#160;</td></tr>
158<tr class="memitem:ac77ede8cd8ed3202149e4e4e79862772"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a03991.html">PhysicalSensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#ac77ede8cd8ed3202149e4e4e79862772">sensors</a> [4]</td></tr>
159<tr class="memdesc:ac77ede8cd8ed3202149e4e4e79862772"><td class="mdescLeft">&#160;</td><td class="mdescRight">This implementation uses up to 4 sensors.  <a href="#ac77ede8cd8ed3202149e4e4e79862772">More...</a><br /></td></tr>
160<tr class="separator:ac77ede8cd8ed3202149e4e4e79862772"><td class="memSeparator" colspan="2">&#160;</td></tr>
161<tr class="memitem:a75f40af5caf43ce58b7a18015c210e4a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03819.html">registerDeviceInfo_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00476.html#a75f40af5caf43ce58b7a18015c210e4a">i2cBusInfo</a></td></tr>
162<tr class="separator:a75f40af5caf43ce58b7a18015c210e4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
163</table>
164<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
165<div class="textblock"><p>The <a class="el" href="a00476.html" title="The orientaion_application_baremetal_agmp03.c file implements the ISSDK baremetal orientation applica...">orientaion_application_baremetal_agmp03.c</a> file implements the ISSDK baremetal orientation application for FRDM-STBC-AGMP03 using sensor fusion core functional interfaces and host i/o interface. </p>
166
167<p class="definition">Definition in file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
168</div><h2 class="groupheader">Macro Definition Documentation</h2>
169<a id="adf41b2857036247c970bc8594b6a636a"></a>
170<h2 class="memtitle"><span class="permalink"><a href="#adf41b2857036247c970bc8594b6a636a">&#9670;&nbsp;</a></span>APPLICATION_NAME</h2>
171
172<div class="memitem">
173<div class="memproto">
174      <table class="memname">
175        <tr>
176          <td class="memname">#define APPLICATION_NAME&#160;&#160;&#160;&quot;9 Axis Orientation Sensor Demo&quot;                /* Orientation Application Name */</td>
177        </tr>
178      </table>
179</div><div class="memdoc">
180
181<p>Unique Name for this application which should match the target GUI pkg name. </p>
182
183<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00063">63</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
184
185<p class="reference">Referenced by <a class="el" href="a00476_source.html#l00436">main()</a>.</p>
186
187</div>
188</div>
189<a id="a6efa9917d91d75dcb9036443bc2483cd"></a>
190<h2 class="memtitle"><span class="permalink"><a href="#a6efa9917d91d75dcb9036443bc2483cd">&#9670;&nbsp;</a></span>APPLICATION_VERSION</h2>
191
192<div class="memitem">
193<div class="memproto">
194      <table class="memname">
195        <tr>
196          <td class="memname">#define APPLICATION_VERSION&#160;&#160;&#160;&quot;2.5&quot;</td>
197        </tr>
198      </table>
199</div><div class="memdoc">
200
201<p>Version to distinguish between instances the same application based on target Shield and updates. </p>
202
203<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00065">65</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
204
205<p class="reference">Referenced by <a class="el" href="a00476_source.html#l00436">main()</a>.</p>
206
207</div>
208</div>
209<a id="a930f8c6c3310e382be6a72ca8f14cb8c"></a>
210<h2 class="memtitle"><span class="permalink"><a href="#a930f8c6c3310e382be6a72ca8f14cb8c">&#9670;&nbsp;</a></span>BOARDINFO_SIZE</h2>
211
212<div class="memitem">
213<div class="memproto">
214      <table class="memname">
215        <tr>
216          <td class="memname">#define BOARDINFO_SIZE&#160;&#160;&#160;(1)                             /* Orientation Packet: BoardInfo field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
217        </tr>
218      </table>
219</div><div class="memdoc">
220
221<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00059">59</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
222
223</div>
224</div>
225<a id="a6a45d9695319d28f8901f42d88df3778"></a>
226<h2 class="memtitle"><span class="permalink"><a href="#a6a45d9695319d28f8901f42d88df3778">&#9670;&nbsp;</a></span>BUILDNAME_SIZE</h2>
227
228<div class="memitem">
229<div class="memproto">
230      <table class="memname">
231        <tr>
232          <td class="memname">#define BUILDNAME_SIZE&#160;&#160;&#160;(2)                             /* Orientation Packet: BuildInfo field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
233        </tr>
234      </table>
235</div><div class="memdoc">
236
237<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00060">60</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
238
239</div>
240</div>
241<a id="a83a0c0694e47645c3e42be4491f2e5e0"></a>
242<h2 class="memtitle"><span class="permalink"><a href="#a83a0c0694e47645c3e42be4491f2e5e0">&#9670;&nbsp;</a></span>COORDINATES_SIZE</h2>
243
244<div class="memitem">
245<div class="memproto">
246      <table class="memname">
247        <tr>
248          <td class="memname">#define COORDINATES_SIZE&#160;&#160;&#160;(1)                             /* Orientation Packet: coordinates field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
249        </tr>
250      </table>
251</div><div class="memdoc">
252
253<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00058">58</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
254
255</div>
256</div>
257<a id="a57acace0eb7ea3d82f09773287d905ca"></a>
258<h2 class="memtitle"><span class="permalink"><a href="#a57acace0eb7ea3d82f09773287d905ca">&#9670;&nbsp;</a></span>EULERANGLE_DATA_SIZE</h2>
259
260<div class="memitem">
261<div class="memproto">
262      <table class="memname">
263        <tr>
264          <td class="memname">#define EULERANGLE_DATA_SIZE&#160;&#160;&#160;(6)                             /* Orientation Packet: Roll,Pitch,Compass Euler angles packet field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
265        </tr>
266      </table>
267</div><div class="memdoc">
268
269<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00056">56</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
270
271</div>
272</div>
273<a id="a4bacf46ced48e561f654169d78f32ba2"></a>
274<h2 class="memtitle"><span class="permalink"><a href="#a4bacf46ced48e561f654169d78f32ba2">&#9670;&nbsp;</a></span>FITERROR_DATA_SIZE</h2>
275
276<div class="memitem">
277<div class="memproto">
278      <table class="memname">
279        <tr>
280          <td class="memname">#define FITERROR_DATA_SIZE&#160;&#160;&#160;(2)                             /* Orientation Packet: FitError% field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
281        </tr>
282      </table>
283</div><div class="memdoc">
284
285<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00057">57</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
286
287</div>
288</div>
289<a id="af1ca867d8bda62a5d05bc7b7076bf0cc"></a>
290<h2 class="memtitle"><span class="permalink"><a href="#af1ca867d8bda62a5d05bc7b7076bf0cc">&#9670;&nbsp;</a></span>NINEAXISSENSOR_DATA_SIZE</h2>
291
292<div class="memitem">
293<div class="memproto">
294      <table class="memname">
295        <tr>
296          <td class="memname">#define NINEAXISSENSOR_DATA_SIZE&#160;&#160;&#160;(18)                            /* Orientation Packet: 9 Axis Sensor Data, Accel, Mag, Gyro field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
297        </tr>
298      </table>
299</div><div class="memdoc">
300
301<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00054">54</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
302
303</div>
304</div>
305<a id="a7d10b4fe945d6eaad527773e84835341"></a>
306<h2 class="memtitle"><span class="permalink"><a href="#a7d10b4fe945d6eaad527773e84835341">&#9670;&nbsp;</a></span>QUATERNION_SIZE</h2>
307
308<div class="memitem">
309<div class="memproto">
310      <table class="memname">
311        <tr>
312          <td class="memname">#define QUATERNION_SIZE&#160;&#160;&#160;(8)                             /* Orientation Packet: <a class="el" href="a03979.html">Quaternion</a> field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
313        </tr>
314      </table>
315</div><div class="memdoc">
316
317<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00055">55</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
318
319</div>
320</div>
321<a id="ad02dd76540fcad6aa2f8413f4e3b7bf8"></a>
322<h2 class="memtitle"><span class="permalink"><a href="#ad02dd76540fcad6aa2f8413f4e3b7bf8">&#9670;&nbsp;</a></span>STREAMING_PAYLOAD_LEN</h2>
323
324<div class="memitem">
325<div class="memproto">
326      <table class="memname">
327        <tr>
328          <td class="memname">#define STREAMING_PAYLOAD_LEN&#160;&#160;&#160;(<a class="el" href="a00476.html#ad35aa53071a58d71bf2e6b0969dcb9ff">TIMESTAMP_DATA_SIZE</a> + <a class="el" href="a00476.html#af1ca867d8bda62a5d05bc7b7076bf0cc">NINEAXISSENSOR_DATA_SIZE</a> + <a class="el" href="a00476.html#a7d10b4fe945d6eaad527773e84835341">QUATERNION_SIZE</a> + <a class="el" href="a00476.html#a57acace0eb7ea3d82f09773287d905ca">EULERANGLE_DATA_SIZE</a> + <a class="el" href="a00476.html#a4bacf46ced48e561f654169d78f32ba2">FITERROR_DATA_SIZE</a> + <a class="el" href="a00476.html#a83a0c0694e47645c3e42be4491f2e5e0">COORDINATES_SIZE</a> + <a class="el" href="a00476.html#a930f8c6c3310e382be6a72ca8f14cb8c">BOARDINFO_SIZE</a> + <a class="el" href="a00476.html#a6a45d9695319d28f8901f42d88df3778">BUILDNAME_SIZE</a> + <a class="el" href="a00476.html#a6326f5d80c5fc4299c64f82e9765a27a">SYSTICKINFO_SIZE</a>)</td>
329        </tr>
330      </table>
331</div><div class="memdoc">
332<p>Orientation Streaming Packet Payload Size </p>
333
334<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00068">68</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
335
336</div>
337</div>
338<a id="a6326f5d80c5fc4299c64f82e9765a27a"></a>
339<h2 class="memtitle"><span class="permalink"><a href="#a6326f5d80c5fc4299c64f82e9765a27a">&#9670;&nbsp;</a></span>SYSTICKINFO_SIZE</h2>
340
341<div class="memitem">
342<div class="memproto">
343      <table class="memname">
344        <tr>
345          <td class="memname">#define SYSTICKINFO_SIZE&#160;&#160;&#160;(2)                             /* Orientation Packet: SysTick field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
346        </tr>
347      </table>
348</div><div class="memdoc">
349
350<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00061">61</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
351
352</div>
353</div>
354<a id="ad35aa53071a58d71bf2e6b0969dcb9ff"></a>
355<h2 class="memtitle"><span class="permalink"><a href="#ad35aa53071a58d71bf2e6b0969dcb9ff">&#9670;&nbsp;</a></span>TIMESTAMP_DATA_SIZE</h2>
356
357<div class="memitem">
358<div class="memproto">
359      <table class="memname">
360        <tr>
361          <td class="memname">#define TIMESTAMP_DATA_SIZE&#160;&#160;&#160;(4)                             /* Orientation Packet: TimeStamp field <a class="el" href="a00521.html#a18e09d6eabccd6dfc2d5066542020e59">size</a> */</td>
362        </tr>
363      </table>
364</div><div class="memdoc">
365<h2>Orient Packet Structure: 44 Bytes </h2>
366<h2>| TimeStamp | 9 Axis Sensor data | <a class="el" href="a03979.html" title="quaternion structure definition ">Quaternion</a> data | Euler angles data | FitError% data | Co-ordinates data | BoardInfo data | BuildInfo data | SysTick data | | </h2>
367<h2>| 4 Bytes | 18 Bytes | 8 Bytes | 6 Bytes | 2 Bytes | 1 Bytes | 1 Byte | 2 Bytes | 2 Bytes | | </h2>
368
369<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00053">53</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
370
371</div>
372</div>
373<h2 class="groupheader">Function Documentation</h2>
374<a id="affc6785c2a861503e9d86d9ab0b09330"></a>
375<h2 class="memtitle"><span class="permalink"><a href="#affc6785c2a861503e9d86d9ab0b09330">&#9670;&nbsp;</a></span>appendZerosOrientBuf()</h2>
376
377<div class="memitem">
378<div class="memproto">
379      <table class="memname">
380        <tr>
381          <td class="memname">void appendZerosOrientBuf </td>
382          <td>(</td>
383          <td class="paramtype">uint8_t *&#160;</td>
384          <td class="paramname"><em>pDest</em>, </td>
385        </tr>
386        <tr>
387          <td class="paramkey"></td>
388          <td></td>
389          <td class="paramtype">uint16_t *&#160;</td>
390          <td class="paramname"><em>pIndex</em>, </td>
391        </tr>
392        <tr>
393          <td class="paramkey"></td>
394          <td></td>
395          <td class="paramtype">uint16_t&#160;</td>
396          <td class="paramname"><em>numZeros</em>&#160;</td>
397        </tr>
398        <tr>
399          <td></td>
400          <td>)</td>
401          <td></td><td></td>
402        </tr>
403      </table>
404</div><div class="memdoc">
405
406<p>appendZerosOrientBuf utility function </p>
407
408<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00214">214</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
409
410<p class="reference">References <a class="el" href="a00902_source.html#l00037">sBufAppendItem()</a>.</p>
411<div class="dynheader">
412Here is the call graph for this function:</div>
413<div class="dyncontent">
414<div class="center"><img src="a00476_affc6785c2a861503e9d86d9ab0b09330_cgraph.png" border="0" usemap="#a00476_affc6785c2a861503e9d86d9ab0b09330_cgraph" alt=""/></div>
415<map name="a00476_affc6785c2a861503e9d86d9ab0b09330_cgraph" id="a00476_affc6785c2a861503e9d86d9ab0b09330_cgraph">
416<area shape="rect" id="node2" href="a00779.html#a7ad6e53b35d6fc860a1299ceff40a299" title="Utility function used to place data in output buffer about to be transmitted via UART. " alt="" coords="204,5,321,32"/>
417</map>
418</div>
419
420</div>
421</div>
422<a id="a840291bc02cba5474a4cb46a9b9566fe"></a>
423<h2 class="memtitle"><span class="permalink"><a href="#a840291bc02cba5474a4cb46a9b9566fe">&#9670;&nbsp;</a></span>main()</h2>
424
425<div class="memitem">
426<div class="memproto">
427      <table class="memname">
428        <tr>
429          <td class="memname">int main </td>
430          <td>(</td>
431          <td class="paramtype">void&#160;</td>
432          <td class="paramname"></td><td>)</td>
433          <td></td>
434        </tr>
435      </table>
436</div><div class="memdoc">
437
438<p>Main function. </p>
439<p>Initialize the MCU hardware.</p>
440<p>Run ADS.</p>
441<p>Initialize and set the KSDK driver for the I2C port</p>
442<p>Initialize the UART driver.</p>
443<p>Set UART Power mode.</p>
444<p>Set UART Baud Rate.</p>
445<p>Initialize control sub-system for orientation packet streaming</p>
446<p>Initialize sensor fusion status sub-system</p>
447<p>Initialize sensor fusion global metadata</p>
448<p>Install the sensors to be used by sensor fusion</p>
449<p>Initialize streaming and assign Stream IDs.</p>
450<p>Initialize sensor fusion engine</p>
451<p>pitIsrFlag will be set true at FUSION_HZ periodic intervals</p>
452<p>Check whether occur interupt</p>
453<p>Check for incoming commands form Host.</p>
454<p>Reads sensors, applies HAL and does averaging (if applicable)</p>
455<p>Condition sensor data, magCal is run as part of this</p>
456<p>Run fusion algorithms</p>
457<p>Apply debug perturbation</p>
458<p>Required to check incoming host command and send response before host times out</p>
459<p>assume NORMAL status for next pass through the loop</p>
460<p>Required to check incoming host command and send response before host times out</p>
461<p>Encode Orietantion Stream Packet and send packet to host </p>
462
463<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00436">436</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
464
465<p class="reference">References <a class="el" href="a04832_source.html#l00024">ADS_MAX_STRING_LENGTH</a>, <a class="el" href="a00476_source.html#l00063">APPLICATION_NAME</a>, <a class="el" href="a00476_source.html#l00065">APPLICATION_VERSION</a>, <a class="el" href="a04292_source.html#l00019">BOARD_BootClockRUN</a>, <a class="el" href="a04166_source.html#l00031">BOARD_DEBUG_UART_BAUDRATE</a>, <a class="el" href="a04823_source.html#l00917">BOARD_RunADS()</a>, <a class="el" href="a00530_source.html#l00035">BOARD_SystickEnable()</a>, <a class="el" href="a00476_source.html#l00079">boardString</a>, <a class="el" href="a00476_source.html#l00081">embAppName</a>, <a class="el" href="a00578_source.html#l00093">HOST_S_DRIVER</a>, <a class="el" href="a00578_source.html#l00094">HOST_S_SIGNAL_EVENT</a>, <a class="el" href="a04343_source.html#l00033">I2C_S_DRIVER</a>, <a class="el" href="a04343_source.html#l00034">I2C_S_SIGNAL_EVENT</a>, <a class="el" href="a00368_source.html#l00083">I2Cdrv</a>, <a class="el" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f">int32_t()</a>, <a class="el" href="a04337_source.html#l00019">SHIELD_NAME</a>, <a class="el" href="a00476_source.html#l00080">shieldString</a>, and <a class="el" href="a00359_source.html#l00248">status</a>.</p>
466<div class="dynheader">
467Here is the call graph for this function:</div>
468<div class="dyncontent">
469<div class="center"><img src="a00476_a840291bc02cba5474a4cb46a9b9566fe_cgraph.png" border="0" usemap="#a00476_a840291bc02cba5474a4cb46a9b9566fe_cgraph" alt=""/></div>
470<map name="a00476_a840291bc02cba5474a4cb46a9b9566fe_cgraph" id="a00476_a840291bc02cba5474a4cb46a9b9566fe_cgraph">
471<area shape="rect" id="node2" href="a04823.html#a95285f14f6707e326e523c82d926c900" title="The function to register Application Name and initialte ADS. " alt="" coords="121,5,246,32"/>
472<area shape="rect" id="node3" href="a00530.html#ad43629969994e92bd3620e630bda24c8" title="Function to enable systicks framework. " alt="" coords="104,56,263,83"/>
473<area shape="rect" id="node4" href="a00521.html#a5d7069350a7d7e65686c77a8038f462f" title="The interface function to append the data on the formated stream. " alt="" coords="153,107,214,133"/>
474</map>
475</div>
476
477</div>
478</div>
479<a id="a0076d28c9a17cd6908c7b3b0f5c6006c"></a>
480<h2 class="memtitle"><span class="permalink"><a href="#a0076d28c9a17cd6908c7b3b0f5c6006c">&#9670;&nbsp;</a></span>process_host_command()</h2>
481
482<div class="memitem">
483<div class="memproto">
484      <table class="memname">
485        <tr>
486          <td class="memname">bool process_host_command </td>
487          <td>(</td>
488          <td class="paramtype">uint8_t&#160;</td>
489          <td class="paramname"><em>tag</em>, </td>
490        </tr>
491        <tr>
492          <td class="paramkey"></td>
493          <td></td>
494          <td class="paramtype">uint8_t *&#160;</td>
495          <td class="paramname"><em>hostCommand</em>, </td>
496        </tr>
497        <tr>
498          <td class="paramkey"></td>
499          <td></td>
500          <td class="paramtype">uint8_t *&#160;</td>
501          <td class="paramname"><em>hostResponse</em>, </td>
502        </tr>
503        <tr>
504          <td class="paramkey"></td>
505          <td></td>
506          <td class="paramtype">size_t *&#160;</td>
507          <td class="paramname"><em>hostMsgSize</em>, </td>
508        </tr>
509        <tr>
510          <td class="paramkey"></td>
511          <td></td>
512          <td class="paramtype">size_t&#160;</td>
513          <td class="paramname"><em>respBufferSize</em>&#160;</td>
514        </tr>
515        <tr>
516          <td></td>
517          <td>)</td>
518          <td></td><td></td>
519        </tr>
520      </table>
521</div><div class="memdoc">
522
523<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00117">117</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
524
525<p class="reference">References <a class="el" href="a00476_source.html#l00079">boardString</a>, <a class="el" href="a00476_source.html#l00081">embAppName</a>, <a class="el" href="a00476_source.html#l00078">gPrimaryStreamID</a>, <a class="el" href="a00476_source.html#l00077">gStreamingEnabled</a>, <a class="el" href="a00101_source.html#l00102">HOST_CMD_START</a>, <a class="el" href="a00101_source.html#l00103">HOST_CMD_STOP</a>, <a class="el" href="a00101_source.html#l00086">HOST_MSG_CMD_ACT_OFFSET</a>, <a class="el" href="a00101_source.html#l00084">HOST_MSG_LEN_LSB_OFFSET</a>, <a class="el" href="a00101_source.html#l00063">HOST_PRO_CMD_W_CFG_TAG</a>, <a class="el" href="a00101_source.html#l00057">HOST_PRO_INT_CMD_TAG</a>, <a class="el" href="a00101_source.html#l00059">HOST_PRO_INT_DEV_TAG</a>, <a class="el" href="a04166_source.html#l00089">LED_GREEN_ON</a>, and <a class="el" href="a00476_source.html#l00080">shieldString</a>.</p>
526
527</div>
528</div>
529<a id="afc1406a51c0cc9804d56dc92ef0d950e"></a>
530<h2 class="memtitle"><span class="permalink"><a href="#afc1406a51c0cc9804d56dc92ef0d950e">&#9670;&nbsp;</a></span>readAlgoParams()</h2>
531
532<div class="memitem">
533<div class="memproto">
534      <table class="memname">
535        <tr>
536          <td class="memname">void readAlgoParams </td>
537          <td>(</td>
538          <td class="paramtype"><a class="el" href="a00914.html#a3fe0b3e3d934e9d4af406ff60f451387">SV_ptr</a>&#160;</td>
539          <td class="paramname"><em>data</em>, </td>
540        </tr>
541        <tr>
542          <td class="paramkey"></td>
543          <td></td>
544          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
545          <td class="paramname"><em>fq</em>, </td>
546        </tr>
547        <tr>
548          <td class="paramkey"></td>
549          <td></td>
550          <td class="paramtype">int16_t *&#160;</td>
551          <td class="paramname"><em>iPhi</em>, </td>
552        </tr>
553        <tr>
554          <td class="paramkey"></td>
555          <td></td>
556          <td class="paramtype">int16_t *&#160;</td>
557          <td class="paramname"><em>iThe</em>, </td>
558        </tr>
559        <tr>
560          <td class="paramkey"></td>
561          <td></td>
562          <td class="paramtype">int16_t *&#160;</td>
563          <td class="paramname"><em>iRho</em>, </td>
564        </tr>
565        <tr>
566          <td class="paramkey"></td>
567          <td></td>
568          <td class="paramtype">int16_t&#160;</td>
569          <td class="paramname"><em>iOmega</em>[], </td>
570        </tr>
571        <tr>
572          <td class="paramkey"></td>
573          <td></td>
574          <td class="paramtype">uint16_t *&#160;</td>
575          <td class="paramname"><em>isystick</em>&#160;</td>
576        </tr>
577        <tr>
578          <td></td>
579          <td>)</td>
580          <td></td><td></td>
581        </tr>
582      </table>
583</div><div class="memdoc">
584
585<p>Utility function for reading common algorithm parameters. </p>
586
587<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00225">225</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
588
589<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00914_source.html#l00444">SV_COMMON::fOmega</a>, <a class="el" href="a00914_source.html#l00436">SV_COMMON::fPhi</a>, <a class="el" href="a00914_source.html#l00442">SV_COMMON::fq</a>, <a class="el" href="a00914_source.html#l00439">SV_COMMON::fRho</a>, <a class="el" href="a00914_source.html#l00437">SV_COMMON::fThe</a>, and <a class="el" href="a00914_source.html#l00445">SV_COMMON::systick</a>.</p>
590
591</div>
592</div>
593<h2 class="groupheader">Variable Documentation</h2>
594<a id="a44681c771b24906b93d52a830b4ec968"></a>
595<h2 class="memtitle"><span class="permalink"><a href="#a44681c771b24906b93d52a830b4ec968">&#9670;&nbsp;</a></span>boardString</h2>
596
597<div class="memitem">
598<div class="memproto">
599      <table class="memname">
600        <tr>
601          <td class="memname">char boardString[<a class="el" href="a04838.html#a4296d0603c5898f7baef119cbfe42858">ADS_MAX_STRING_LENGTH</a>] = {0}</td>
602        </tr>
603      </table>
604</div><div class="memdoc">
605
606<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00079">79</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
607
608<p class="reference">Referenced by <a class="el" href="a00476_source.html#l00436">main()</a>, and <a class="el" href="a00476_source.html#l00117">process_host_command()</a>.</p>
609
610</div>
611</div>
612<a id="a70385ff3e0081022336573247e5ecaec"></a>
613<h2 class="memtitle"><span class="permalink"><a href="#a70385ff3e0081022336573247e5ecaec">&#9670;&nbsp;</a></span>embAppName</h2>
614
615<div class="memitem">
616<div class="memproto">
617      <table class="memname">
618        <tr>
619          <td class="memname">char embAppName[<a class="el" href="a04838.html#a4296d0603c5898f7baef119cbfe42858">ADS_MAX_STRING_LENGTH</a>] = {0}</td>
620        </tr>
621      </table>
622</div><div class="memdoc">
623
624<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00081">81</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
625
626<p class="reference">Referenced by <a class="el" href="a00476_source.html#l00436">main()</a>, and <a class="el" href="a00476_source.html#l00117">process_host_command()</a>.</p>
627
628</div>
629</div>
630<a id="aac92dd324ab87fabfb7a61647e6273fe"></a>
631<h2 class="memtitle"><span class="permalink"><a href="#aac92dd324ab87fabfb7a61647e6273fe">&#9670;&nbsp;</a></span>gOrientationControlSubsystem</h2>
632
633<div class="memitem">
634<div class="memproto">
635      <table class="memname">
636        <tr>
637          <td class="memname"><a class="el" href="a03967.html">ControlSubsystem</a> gOrientationControlSubsystem</td>
638        </tr>
639      </table>
640</div><div class="memdoc">
641
642<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00075">75</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
643
644</div>
645</div>
646<a id="ae69294e40b64a92ce4a1c9636db4118a"></a>
647<h2 class="memtitle"><span class="permalink"><a href="#ae69294e40b64a92ce4a1c9636db4118a">&#9670;&nbsp;</a></span>gPrimaryStreamID</h2>
648
649<div class="memitem">
650<div class="memproto">
651      <table class="memname">
652        <tr>
653          <td class="memname">uint8_t gPrimaryStreamID</td>
654        </tr>
655      </table>
656</div><div class="memdoc">
657
658<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00078">78</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
659
660<p class="reference">Referenced by <a class="el" href="a00476_source.html#l00117">process_host_command()</a>.</p>
661
662</div>
663</div>
664<a id="a9410ef028d5df163bf575ae767fa3b2c"></a>
665<h2 class="memtitle"><span class="permalink"><a href="#a9410ef028d5df163bf575ae767fa3b2c">&#9670;&nbsp;</a></span>gStreamingEnabled</h2>
666
667<div class="memitem">
668<div class="memproto">
669      <table class="memname">
670        <tr>
671          <td class="memname">volatile bool gStreamingEnabled</td>
672        </tr>
673      </table>
674</div><div class="memdoc">
675
676<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00077">77</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
677
678<p class="reference">Referenced by <a class="el" href="a00476_source.html#l00117">process_host_command()</a>.</p>
679
680</div>
681</div>
682<a id="a75f40af5caf43ce58b7a18015c210e4a"></a>
683<h2 class="memtitle"><span class="permalink"><a href="#a75f40af5caf43ce58b7a18015c210e4a">&#9670;&nbsp;</a></span>i2cBusInfo</h2>
684
685<div class="memitem">
686<div class="memproto">
687      <table class="memname">
688        <tr>
689          <td class="memname"><a class="el" href="a03819.html">registerDeviceInfo_t</a> i2cBusInfo</td>
690        </tr>
691      </table>
692</div><div class="memdoc">
693<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line">    .deviceInstance     = <a class="code" href="a04343.html#ab0c7969a7fffaabe78d43db2b12ad840">I2C_S_DEVICE_INDEX</a>,</div><div class="line">    .functionParam      = NULL,</div><div class="line">    .idleFunction       = NULL</div><div class="line">}</div><div class="ttc" id="a04343_html_ab0c7969a7fffaabe78d43db2b12ad840"><div class="ttname"><a href="a04343.html#ab0c7969a7fffaabe78d43db2b12ad840">I2C_S_DEVICE_INDEX</a></div><div class="ttdeci">#define I2C_S_DEVICE_INDEX</div><div class="ttdef"><b>Definition:</b> <a href="a04343_source.html#l00035">issdk_hal.h:35</a></div></div>
694</div><!-- fragment -->
695<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00086">86</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
696
697</div>
698</div>
699<a id="abb44e114427310fd48b45c61bbb5b066"></a>
700<h2 class="memtitle"><span class="permalink"><a href="#abb44e114427310fd48b45c61bbb5b066">&#9670;&nbsp;</a></span>orientOutputBuffer</h2>
701
702<div class="memitem">
703<div class="memproto">
704      <table class="memname">
705        <tr>
706          <td class="memname">uint8_t orientOutputBuffer[<a class="el" href="a00101.html#adc72f7a14386aae7a4025ca511c06f54">STREAMING_HEADER_LEN</a>+<a class="el" href="a00476.html#ad02dd76540fcad6aa2f8413f4e3b7bf8">STREAMING_PAYLOAD_LEN</a>]</td>
707        </tr>
708      </table>
709</div><div class="memdoc">
710
711<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00083">83</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
712
713</div>
714</div>
715<a id="ac77ede8cd8ed3202149e4e4e79862772"></a>
716<h2 class="memtitle"><span class="permalink"><a href="#ac77ede8cd8ed3202149e4e4e79862772">&#9670;&nbsp;</a></span>sensors</h2>
717
718<div class="memitem">
719<div class="memproto">
720      <table class="memname">
721        <tr>
722          <td class="memname">struct <a class="el" href="a03991.html">PhysicalSensor</a> sensors[4]</td>
723        </tr>
724      </table>
725</div><div class="memdoc">
726
727<p>This implementation uses up to 4 sensors. </p>
728
729<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00084">84</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
730
731</div>
732</div>
733<a id="afa81c629d378fe700f351a1bce411ad5"></a>
734<h2 class="memtitle"><span class="permalink"><a href="#afa81c629d378fe700f351a1bce411ad5">&#9670;&nbsp;</a></span>sfg</h2>
735
736<div class="memitem">
737<div class="memproto">
738      <table class="memname">
739        <tr>
740          <td class="memname"><a class="el" href="a04047.html">SensorFusionGlobals</a> sfg</td>
741        </tr>
742      </table>
743</div><div class="memdoc">
744
745<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00074">74</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
746
747</div>
748</div>
749<a id="a1c419755be00b2aebbd8d31da9b66142"></a>
750<h2 class="memtitle"><span class="permalink"><a href="#a1c419755be00b2aebbd8d31da9b66142">&#9670;&nbsp;</a></span>shieldString</h2>
751
752<div class="memitem">
753<div class="memproto">
754      <table class="memname">
755        <tr>
756          <td class="memname">char shieldString[<a class="el" href="a04838.html#a4296d0603c5898f7baef119cbfe42858">ADS_MAX_STRING_LENGTH</a>] = {0}</td>
757        </tr>
758      </table>
759</div><div class="memdoc">
760
761<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00080">80</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
762
763<p class="reference">Referenced by <a class="el" href="a00476_source.html#l00436">main()</a>, and <a class="el" href="a00476_source.html#l00117">process_host_command()</a>.</p>
764
765</div>
766</div>
767<a id="a875f795e25aaef1b828061bbfae4764a"></a>
768<h2 class="memtitle"><span class="permalink"><a href="#a875f795e25aaef1b828061bbfae4764a">&#9670;&nbsp;</a></span>statusSubsystem</h2>
769
770<div class="memitem">
771<div class="memproto">
772      <table class="memname">
773        <tr>
774          <td class="memname"><a class="el" href="a04051.html">StatusSubsystem</a> statusSubsystem</td>
775        </tr>
776      </table>
777</div><div class="memdoc">
778
779<p class="definition">Definition at line <a class="el" href="a00476_source.html#l00076">76</a> of file <a class="el" href="a00476_source.html">orientaion_application_baremetal_agmp03.c</a>.</p>
780
781</div>
782</div>
783</div><!-- contents -->
784
785<hr class="footer"/><address class="footer"><small>
786&copy; Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause
787</small></address>
788</body>
789</html>
790