ISSDK  1.7
IoT Sensing Software Development Kit
fxos8700_poll_demo.c
Go to the documentation of this file.
1 /*
2  * The Clear BSD License
3  * Copyright (c) 2015 - 2016, Freescale Semiconductor, Inc.
4  * Copyright 2016-2017 NXP
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without modification,
8  * are permitted (subject to the limitations in the disclaimer below) provided
9  * that the following conditions are met:
10  *
11  * o Redistributions of source code must retain the above copyright notice, this list
12  * of conditions and the following disclaimer.
13  *
14  * o Redistributions in binary form must reproduce the above copyright notice, this
15  * list of conditions and the following disclaimer in the documentation and/or
16  * other materials provided with the distribution.
17  *
18  * o Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from this
20  * software without specific prior written permission.
21  *
22  * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
27  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
30  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 /**
36  * @file fxos8700_demo.c
37  * @brief The fxos8700_demo.c file implements the ISSDK FXOS8700 sensor
38  * driver example demonstration with Poll mode.
39  */
40 
41 //-----------------------------------------------------------------------
42 // SDK Includes
43 //-----------------------------------------------------------------------
44 #include "board.h"
45 #include "pin_mux.h"
46 #include "clock_config.h"
47 
48 //-----------------------------------------------------------------------
49 // CMSIS Includes
50 //-----------------------------------------------------------------------
51 #include "Driver_I2C.h"
52 #include "Driver_USART.h"
53 
54 //-----------------------------------------------------------------------
55 // ISSDK Includes
56 //-----------------------------------------------------------------------
57 #include "issdk_hal.h"
58 #include "gpio_driver.h"
59 #include "fxos8700_drv.h"
60 #include "host_io_uart.h"
61 #include "systick_utils.h"
62 #include "auto_detection_service.h"
63 
64 //-----------------------------------------------------------------------
65 // Macros
66 //-----------------------------------------------------------------------
67 #define RAW_ACCEL_MAG_DATA_SIZE 12
68 #define FXOS8700_STREAM_DATA_SIZE 17
69 
70 /*! @brief Unique Name for this application which should match the target GUI pkg name. */
71 #define APPLICATION_NAME "FXOS8700 6-axis (Accel, Mag) Demo"
72 /*! @brief Version to distinguish between instances the same application based on target Shield and updates. */
73 #define APPLICATION_VERSION "2.5"
74 
75 /*! @brief This structure defines the fxos8700 raw data buffer.*/
76 typedef struct
77 {
78  uint32_t timestamp; /*! The time, this sample was recorded. */
79  int16_t accel[3]; /*!< The accel data */
80  int16_t mag[3]; /*!< The mag data */
81  uint8_t intsrc;
83 
84 //-----------------------------------------------------------------------
85 // Constants
86 //-----------------------------------------------------------------------
87 /*! Prepare the register write list to configure FXOS8700 in non-FIFO mode. */
89  /*! Clear F_SETUP. */
90  {FXOS8700_F_SETUP, 0x00, 0x00},
91  /*! Set FS 2G Mode. */
93  /*! Configure the FXOS8700 to 100Hz sampling rate. */
95  /*! Configure the FXOS8700 to Set High Resolution Mode. */
100  {FXOS8700_CTRL_REG5,0x7E,0x00},
101  {FXOS8700_CTRL_REG4,255,0x00},
102 
103  //PL registers
106  {FXOS8700_PL_COUNT, 0x40, 0x00},//ff
109  {FXOS8700_PL_THS_REG,132,0x00},
110 
111  //Freefall registers
117  {FXOS8700_A_FFMT_COUNT,6,0x00},
118 
119  //Pulse registers
120  {FXOS8700_PULSE_CFG,21,0x00},
121  {FXOS8700_PULSE_TMLT,80,0x00},
122  {FXOS8700_PULSE_LTCY,240,0x00},
123  {FXOS8700_PULSE_THSX,55,0x00},
124  {FXOS8700_PULSE_THSY,55,0x00},
125  {FXOS8700_PULSE_THSZ,82,0x00},
126 
127  //VECM
128  { FXOS8700_A_VECM_CNT,15,0x00},
129  { FXOS8700_A_VECM_THS_LSB,88,0x00},
130  { FXOS8700_A_VECM_CFG,72,0x00},
133 
135 
136 /*! Command definition to read the Accel+Mag Data */
139 
140 /*! Command definition to read the Data Ready Status */
142 
144  {.readFrom = FXOS8700_INT_SOURCE, .numBytes = 1}, __END_READ_DATA__};
145 
147  {.readFrom = FXOS8700_A_FFMT_SRC , .numBytes = 1}, __END_READ_DATA__};
148 
150  {.readFrom = FXOS8700_PL_STATUS, .numBytes = 1}, __END_READ_DATA__};
151 
152 //-----------------------------------------------------------------------
153 // Global Variables
154 //-----------------------------------------------------------------------
157 volatile bool bStreamingEnabled = false, bFxos8700Ready = false;
158 uint8_t gStreamID; /* The auto assigned Stream ID. */
161 
162 //-----------------------------------------------------------------------
163 // Functions
164 //-----------------------------------------------------------------------
165 /* Handler for Device Info and Streaming Control Commands. */
167  uint8_t tag, uint8_t *hostCommand, uint8_t *hostResponse, size_t *hostMsgSize, size_t respBufferSize)
168 {
169  bool success = false;
170 
171  /* If it is Host requesting Device Info, send Board Name and Shield Name. */
172  if (tag == HOST_PRO_INT_DEV_TAG)
173  { /* Byte 1 : Payload - Length of APPLICATION_NAME (b)
174  * Bytes=b : Payload Application Name
175  * Byte b+1 : Payload - Length of BOARD_NAME (s)
176  * Bytes=s : Payload Board Name
177  * Byte b+s+2 : Payload - Length of SHIELD_NAME (v)
178  * Bytes=v : Payload Shield Name */
179 
180  size_t appNameLen = strlen(embAppName);
181  size_t boardNameLen = strlen(boardString);
182  size_t shieldNameLen = strlen(shieldString);
183 
184  if (respBufferSize >= boardNameLen + shieldNameLen + appNameLen + 3)
185  { /* We have sufficient buffer. */
186  *hostMsgSize = 0;
187  }
188  else
189  {
190  return false;
191  }
192 
193  hostResponse[*hostMsgSize] = appNameLen;
194  *hostMsgSize += 1;
195 
196  memcpy(hostResponse + *hostMsgSize, embAppName, appNameLen);
197  *hostMsgSize += appNameLen;
198 
199  hostResponse[*hostMsgSize] = boardNameLen;
200  *hostMsgSize += 1;
201 
202  memcpy(hostResponse + *hostMsgSize, boardString, boardNameLen);
203  *hostMsgSize += boardNameLen;
204 
205  hostResponse[*hostMsgSize] = shieldNameLen;
206  *hostMsgSize += 1;
207 
208  memcpy(hostResponse + *hostMsgSize, shieldString, shieldNameLen);
209  *hostMsgSize += shieldNameLen;
210 
211  return true;
212  }
213 
214  /* If it is Host sending Streaming Commands, take necessary actions. */
215  if ((tag == (HOST_PRO_INT_CMD_TAG | HOST_PRO_CMD_W_CFG_TAG)) &&
217  { /* Byte 1 : Payload - Operation Code (Start/Stop Operation Code)
218  * Byte 2 : Payload - Stream ID (Target Stream for carrying out operation) */
219  switch (hostCommand[0]) /* Execute desired operation (Start/Stop) on the requested Stream. */
220  {
221  case HOST_CMD_START:
222  if (hostCommand[1] == gStreamID && bFxos8700Ready && bStreamingEnabled == false)
223  {
225  bStreamingEnabled = true;
226  success = true;
227  }
228  break;
229  case HOST_CMD_STOP:
230  if (hostCommand[1] == gStreamID && bFxos8700Ready && bStreamingEnabled == true)
231  {
232  pGpioDriver->clr_pin(&GREEN_LED);
233  bStreamingEnabled = false;
234  success = true;
235  }
236  break;
237  default:
238  break;
239  }
240  *hostMsgSize = 0; /* Zero payload in response. */
241  }
242 
243  return success;
244 }
245 
246 /*!
247  * @brief Main function
248  */
249 int main(void)
250 {
251  int32_t status;
253 
254  fxos8700_i2c_sensorhandle_t fxos8700Driver;
256 
257  ARM_DRIVER_I2C *I2Cdrv = &I2C_S_DRIVER;
258  ARM_DRIVER_USART *pUartDriver = &HOST_S_DRIVER;
259 
260  /*! Initialize the MCU hardware. */
263 
264  /* Create the Short Application Name String for ADS. */
265  sprintf(embAppName, "%s:%s", APPLICATION_NAME, APPLICATION_VERSION);
266 
267  /* Run ADS. */
269 
270  /* Create the Full Application Name String for Device Info Response. */
272 
273  /*! Initialize RGB LED pin used by FRDM board */
274  pGpioDriver->pin_init(&GREEN_LED, GPIO_DIRECTION_OUT, NULL, NULL, NULL);
275 
276  /*! Initialize the I2C driver. */
277  status = I2Cdrv->Initialize(I2C_S_SIGNAL_EVENT);
278  if (ARM_DRIVER_OK != status)
279  {
280  return -1;
281  }
282 
283  /*! Set the I2C Power mode. */
284  status = I2Cdrv->PowerControl(ARM_POWER_FULL);
285  if (ARM_DRIVER_OK != status)
286  {
287  return -1;
288  }
289 
290  /*! Set the I2C bus speed. */
291  status = I2Cdrv->Control(ARM_I2C_BUS_SPEED, ARM_I2C_BUS_SPEED_FAST);
292  if (ARM_DRIVER_OK != status)
293  {
294  return -1;
295  }
296 
297  /*! Initialize the UART driver. */
298  status = pUartDriver->Initialize(HOST_S_SIGNAL_EVENT);
299  if (ARM_DRIVER_OK != status)
300  {
301  return -1;
302  }
303 
304  /*! Set the UART Power mode. */
305  status = pUartDriver->PowerControl(ARM_POWER_FULL);
306  if (ARM_DRIVER_OK != status)
307  {
308  return -1;
309  }
310 
311  /*! Set UART Baud Rate. */
312  status = pUartDriver->Control(ARM_USART_MODE_ASYNCHRONOUS, BOARD_DEBUG_UART_BAUDRATE);
313  if (ARM_DRIVER_OK != status)
314  {
315  return -1;
316  }
317 
318  /*! Initialize the FXOS8700 sensor driver. */
321  if (SENSOR_ERROR_NONE == status)
322  {
323  /*! Set the task to be executed while waiting for I2C transactions to complete. */
325 
326  /*! Configure the fxos8700 sensor driver. */
327  status = FXOS8700_I2C_Configure(&fxos8700Driver, fxos8700_Config_InterruptHybrid);
328  if (SENSOR_ERROR_NONE == status)
329  {
330  bFxos8700Ready = true;
331  }
332  }
333 
334  /*! Initialize streaming and assign a Stream ID. */
335  gStreamID =
336  Host_IO_Init(pUartDriver, (void *)fxos8700Driver.pCommDrv, &fxos8700Driver.deviceInfo, NULL, FXOS8700_I2C_ADDR);
337  /* Confirm if a valid Stream ID has been allocated for this stream. */
338  if (0 == gStreamID)
339  {
340  bFxos8700Ready = false;
341  }
342  else
343  {
344  /*! Populate streaming header. */
346  pGpioDriver->clr_pin(&GREEN_LED);
347  }
348 
349  for (;;) /* Forever loop */
350  { /* Call UART Non-Blocking Receive. */
352 
353  /* Process packets only if streaming has been enabled by Host and ISR is available.
354  * In ISR Mode we do not need to check Data Ready Register.
355  * The receipt of interrupt will indicate data is ready. */
356  if (false == bStreamingEnabled)
357  {
358  SMC_SetPowerModeWait(SMC); /* Power save, wait if nothing to do. */
359  continue;
360  }
361 
362  do /*! Keep checking the Status FLAG for completion. */
363  {
364  status = FXOS8700_I2C_ReadData(&fxos8700Driver, FXOS8700_STATUS_READ, &dataReady);
365  if (ARM_DRIVER_OK != status)
366  {
367  return -1;
368  }
369  /* Call UART Non-Blocking Receive while waiting for OST. */
371  } /* Loop, untill sample acquisition is not completed. */
372  while (0 == (dataReady & FXOS8700_DR_STATUS_ZYXDR_MASK));
373  pGpioDriver->toggle_pin(&GREEN_LED);
374 
375  /*! Read the raw sensor data from the fxos8700. */
376  status = FXOS8700_I2C_ReadData(&fxos8700Driver, FXOS8700_ACCEL_READ, data);
377  if (ARM_DRIVER_OK != status)
378  { /* Loop, if sample read failed. */
379  continue;
380  }
381 
382  /* Update timestamp from Systick framework. */
384 
385  /*! Convert the raw sensor data to signed 16-bit container for display to the debug port. */
386  rawData.accel[0] = ((int16_t)data[0] << 8) | data[1];
387  rawData.accel[0] /= 4;
388  rawData.accel[1] = ((int16_t)data[2] << 8) | data[3];
389  rawData.accel[1] /= 4;
390  rawData.accel[2] = ((int16_t)data[4] << 8) | data[5];
391  rawData.accel[2] /= 4;
392  rawData.mag[0] = ((int16_t)data[6] << 8) | data[7];
393  rawData.mag[1] = ((int16_t)data[8] << 8) | data[9];
394  rawData.mag[2] = ((int16_t)data[10] << 8) | data[11];
395 
396  status = FXOS8700_I2C_ReadData(&fxos8700Driver, cFXOS8700_int_src, &regdata);
397 
398  // The following condition checks for multiple interrupts occuring at the same time and sends only one out as per order below.
399  // Check for Freefall interrupt
400  if((regdata & 0x04) == 0x04)
401  {
402  rawData.intsrc = 0x04;
403  }
404  // Check for Vector Magnitude change interrupt
405  else if((regdata & 0x02) == 0x02)
406  {
407  rawData.intsrc = 0x02;
408  }
409  // Else send other interrupts
410  else
411  {
412  rawData.intsrc = regdata;
413  }
414 
415  // read FFMT interrupt source register to clear flags
416  status = FXOS8700_I2C_ReadData(&fxos8700Driver, cFXOS8700_int_src, &regdata);
417  status = FXOS8700_I2C_ReadData(&fxos8700Driver, cFXOS8700_ffmt_src, &regdata);
418  status = FXOS8700_I2C_ReadData(&fxos8700Driver, cFXOS8700_pl_status, &regdata);
419 
420  /* Copy Raw samples to Streaming Buffer. */
421  memcpy(streamingPacket + STREAMING_HEADER_LEN, &rawData, FXOS8700_STREAM_DATA_SIZE);
422  /* Send streaming packet to Host. */
423  Host_IO_Send(streamingPacket, sizeof(streamingPacket), HOST_FORMAT_HDLC);
424  }
425 }
#define FXOS8700_M_CTRL_REG1_M_HMS_MASK
Definition: fxos8700.h:2573
uint32_t BOARD_SystickElapsedTime_us(int32_t *pStart)
Function to compute the Elapsed Time.
Definition: systick_utils.c:99
#define FXOS8700_PL_CFG_DBCNTM_MASK
Definition: fxos8700.h:796
#define FXOS8700_M_CTRL_REG1_M_ACAL_EN
Definition: fxos8700.h:2592
GENERIC_DRIVER_GPIO * pGpioDriver
#define FXOS8700_PL_CFG_DBCNTM_CLEAR_MODE
Definition: fxos8700.h:805
#define __END_WRITE_DATA__
Definition: sensor_drv.h:71
The fxos8700_drv.h file describes the fxos8700 driver interface and structures.
const registerreadlist_t cFXOS8700_ffmt_src[]
#define HOST_PRO_CMD_W_CFG_TAG
Definition: host_io_uart.h:89
void FXOS8700_I2C_SetIdleTask(fxos8700_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
: The interface function to set the I2C Idle Task.
Definition: fxos8700_drv.c:278
#define FXOS8700_CTRL_REG2_MODS_HIGH_RES
Definition: fxos8700.h:1625
#define APPLICATION_NAME
Unique Name for this application which should match the target GUI pkg name.
#define HOST_S_SIGNAL_EVENT
Definition: frdm_k64f.h:120
void Host_IO_Receive(host_cmd_proc_fn_t process_host_command, uint8_t encoding)
Definition: host_io_uart.c:233
void(* pin_init)(pinID_t aPinId, gpio_direction_t dir, void *apPinConfig, gpio_isr_handler_t aIsrHandler, void *apUserData)
Definition: Driver_GPIO.h:67
#define BOARD_BootClockRUN
Definition: clock_config.h:45
bool process_host_command(uint8_t tag, uint8_t *hostCommand, uint8_t *hostResponse, size_t *hostMsgSize, size_t respBufferSize)
#define RAW_ACCEL_MAG_DATA_SIZE
#define FXOS8700_PL_CFG_PL_EN_ENABLE
Definition: fxos8700.h:808
#define FXOS8700_A_FFMT_CFG_ZEFE_RAISE_EVENT
Definition: fxos8700.h:979
uint8_t data[FXLS8962_DATA_SIZE]
#define FXOS8700_A_VECM_THS_MSB_A_VBECM_THS_MASK
Definition: fxos8700.h:2853
int32_t status
This structure defines the fxos8700 raw data buffer.
Definition: fxos8700_demo.c:76
void(* toggle_pin)(pinID_t aPinId)
Definition: Driver_GPIO.h:74
#define SHIELD_NAME
#define FXOS8700_XYZ_DATA_CFG_FS_2G_0P244
Definition: fxos8700.h:686
ARM_DRIVER_I2C * pCommDrv
Definition: fxos8700_drv.h:73
const registerreadlist_t cFXOS8700_pl_status[]
#define FXOS8700_A_FFMT_CFG_OAE_FREEFALL
Definition: fxos8700.h:976
#define ADS_MAX_STRING_LENGTH
const registerreadlist_t cFXOS8700_int_src[]
const registerreadlist_t FXOS8700_STATUS_READ[]
#define HOST_PRO_INT_DEV_TAG
Definition: host_io_uart.h:85
uint8_t streamingPacket[STREAMING_HEADER_LEN+FXLS8962_STREAM_DATA_SIZE]
void(* registeridlefunction_t)(void *userParam)
This is the register idle function type.
Definition: sensor_drv.h:123
This defines the sensor specific information for I2C.
Definition: fxos8700_drv.h:70
int main(void)
Main function.
#define HOST_PRO_INT_CMD_TAG
Bit aligned values for Host Protocol Interface IDs (Bits 5-6).
Definition: host_io_uart.h:83
volatile bool bFxos8700Ready
char embAppName[ADS_MAX_STRING_LENGTH]
#define __END_READ_DATA__
Definition: sensor_drv.h:77
#define FXOS8700_A_VECM_THS_MSB_A_VBECM_DBCNTM_MASK
Definition: fxos8700.h:2856
#define FXOS8700_CTRL_REG2_MODS_MASK
Definition: fxos8700.h:1594
#define FXOS8700_WHO_AM_I_PROD_VALUE
Definition: fxos8700.h:172
#define FXOS8700_A_FFMT_CFG_ZEFE_MASK
Definition: fxos8700.h:961
gpioHandleKSDK_t GREEN_LED
Definition: frdm_k64f.c:214
char shieldString[ADS_MAX_STRING_LENGTH]
#define FXOS8700_M_CTRL_REG2_M_AUTOINC_MASK
Definition: fxos8700.h:2660
const registerwritelist_t fxos8700_Config_InterruptHybrid[]
#define FXOS8700_M_CTRL_REG1_M_ACAL_MASK
Definition: fxos8700.h:2585
const registerreadlist_t FXOS8700_ACCEL_READ[]
#define FXOS8700_CTRL_REG1_DR_HYBRID_100_HZ
Definition: fxos8700.h:1554
#define FXOS8700_A_FFMT_CFG_XEFE_MASK
Definition: fxos8700.h:955
#define APPLICATION_VERSION
Version to distinguish between instances the same application based on target Shield and updates...
int32_t gSystick
void Host_IO_Add_ISO_Header(uint8_t streamID, uint8_t *pStreamingPacket, size_t sizePayload)
Definition: host_io_uart.c:112
void Host_IO_Send(uint8_t *pMsg, size_t size, uint8_t encoding)
Definition: host_io_uart.c:162
void(* clr_pin)(pinID_t aPinId)
Definition: Driver_GPIO.h:73
int32_t FXOS8700_I2C_Initialize(fxos8700_i2c_sensorhandle_t *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t whoAmi)
The interface function to initialize the sensor.
Definition: fxos8700_drv.c:248
void BOARD_SystickEnable(void)
Function to enable systicks framework.
Definition: systick_utils.c:70
int32_t FXOS8700_I2C_ReadData(fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerreadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data.
Definition: fxos8700_drv.c:331
registerDeviceInfo_t deviceInfo
Definition: fxos8700_drv.h:72
#define FXOS8700_M_CTRL_REG2_M_AUTOINC_HYBRID_MODE
Definition: fxos8700.h:2667
#define I2C_S_DEVICE_INDEX
Definition: issdk_hal.h:61
#define FXOS8700_A_FFMT_CFG_YEFE_RAISE_EVENT
Definition: fxos8700.h:982
#define FXOS8700_PL_BF_ZCOMP_ZLOCK_MASK
Definition: fxos8700.h:857
#define FXOS8700_M_CTRL_REG1_M_OS_MASK
Definition: fxos8700.h:2576
#define FXOS8700_A_FFMT_THS_THS_MASK
Definition: fxos8700.h:1059
#define I2C_S_DRIVER
Definition: issdk_hal.h:59
#define FXOS8700_A_FFMT_CFG_YEFE_MASK
Definition: fxos8700.h:958
GENERIC_DRIVER_GPIO Driver_GPIO_KSDK
Definition: gpio_driver.c:203
int32_t FXOS8700_I2C_Configure(fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)
The interface function to configure he sensor.
Definition: fxos8700_drv.c:286
typedef int32_t(DATA_FORMAT_Append_t))(void *pData
The interface function to append the data on the formated stream.
#define BOARD_DEBUG_UART_BAUDRATE
Definition: board.h:57
uint8_t gStreamID
volatile bool bStreamingEnabled
#define FXOS8700_CTRL_REG1_DR_MASK
Definition: fxos8700.h:1530
#define FXOS8700_XYZ_DATA_CFG_FS_MASK
Definition: fxos8700.h:673
Access structure of the GPIO Driver.
Definition: Driver_GPIO.h:64
void BOARD_SystickStart(int32_t *pStart)
Function to Record the Start systick.
Definition: systick_utils.c:79
ARM Systick Utilities.
void BOARD_RunADS(const char *appName, char *boardString, char *shieldString, size_t bufferLength)
The function to register Application Name and initialte ADS.
fxls8962_acceldataUser_t rawData
#define FXOS8700_DR_STATUS_ZYXDR_MASK
Definition: fxos8700.h:212
uint8_t Host_IO_Init(ARM_DRIVER_USART *pDrv, void *pBus, void *pDevInfo, void *spiSlaveParams, uint16_t slaveAddress)
Definition: host_io_uart.c:126
#define FXOS8700_STREAM_DATA_SIZE
#define FXOS8700_A_FFMT_CFG_OAE_MASK
Definition: fxos8700.h:964
This structure defines the Write command List.
Definition: sensor_drv.h:94
This structure defines the Read command List.
Definition: sensor_drv.h:104
#define SMC
Definition: lpc54114.h:144
#define FXOS8700_M_CTRL_REG1_M_OS_OSR0
Definition: fxos8700.h:2603
The host_io_uart.h file contains the Host Protocol interface definitions and configuration.
#define STREAMING_HEADER_LEN
Definition: host_io_uart.h:51
#define FXOS8700_PL_CFG_PL_EN_MASK
Definition: fxos8700.h:793
#define FXOS8700_PL_BF_ZCOMP_BKFR_MASK
Definition: fxos8700.h:860
status_t SMC_SetPowerModeWait(void *arg)
Configures the system to WAIT power mode. API name used from Kinetis family to maintain compatibility...
Definition: lpc54114.c:181
#define FXOS8700_A_FFMT_CFG_XEFE_RAISE_EVENT
Definition: fxos8700.h:985
#define FXOS8700_I2C_ADDR
#define FXOS8700_M_CTRL_REG1_M_HMS_HYBRID_MODE
Definition: fxos8700.h:2621
#define I2C_S_SIGNAL_EVENT
Definition: issdk_hal.h:60
#define HOST_S_DRIVER
Definition: frdm_k64f.h:119
char boardString[ADS_MAX_STRING_LENGTH]