ISSDK  1.8
IoT Sensing Software Development Kit
Macros | Functions | Variables
fxls8962_normal.c File Reference

The fxls8962_normal.c file implements the ISSDK FXLS8962 sensor driver example demonstration with polling mode. More...

#include "pin_mux.h"
#include "clock_config.h"
#include "board.h"
#include "fsl_debug_console.h"
#include "Driver_I2C.h"
#include "issdk_hal.h"
#include "fxls8962_drv.h"
#include "systick_utils.h"
Include dependency graph for fxls8962_normal.c:

Go to the source code of this file.

Macros

#define FXLS8962_DATA_SIZE   6
 

Functions

int main (void)
 Main function. More...
 

Variables

const registerwritelist_t cFxls8962ConfigNormal []
 Register settings for Normal (non buffered) mode. More...
 
const registerreadlist_t cFxls8962DRDYEvent [] = {{.readFrom = FXLS8962_INT_STATUS, .numBytes = 1}, __END_READ_DATA__}
 Address of DATA Ready Status Register. More...
 
const registerreadlist_t cFxls8962OutputNormal []
 Address of Raw Accel Data in Normal Mode. More...
 

Detailed Description

The fxls8962_normal.c file implements the ISSDK FXLS8962 sensor driver example demonstration with polling mode.

Definition in file fxls8962_normal.c.

Macro Definition Documentation

◆ FXLS8962_DATA_SIZE

#define FXLS8962_DATA_SIZE   6

Definition at line 32 of file fxls8962_normal.c.

Referenced by main().

Function Documentation

◆ main()

int main ( void  )

Main function.

Initialize the MCU hardware.

Initialize the I2C driver.

Set the I2C Power mode.

Set the I2C bus speed.

Initialize FXLS8962 sensor driver.

Set the task to be executed while waiting for I2C transactions to complete.

Configure the FXLS8962 sensor.

Wait for data ready from the FXLS8962.

Read new raw sensor data from the FXLS8962.

Convert the raw sensor data to signed 16-bit container for display to the debug port.

Definition at line 58 of file fxls8962_normal.c.

References fxls8962_acceldata_t::accel, ASK_USER_TO_RESUME, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), BOARD_SystickEnable(), data, FXLS8962_DATA_SIZE, FXLS8962_I2C_ADDR, FXLS8962_I2C_Configure(), FXLS8962_I2C_Initialize(), FXLS8962_I2C_ReadData(), FXLS8962_I2C_SetIdleTask(), FXLS8962_INT_STATUS_SRC_DRDY_MASK, FXLS8962_WHOAMI_VALUE, fxls8962Driver, FXLS8964_WHOAMI_VALUE, FXLS8967_WHOAMI_VALUE, FXLS8974_WHOAMI_VALUE, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), rawData, SMC, SMC_SetPowerModeVlpr(), and status.

Here is the call graph for this function:

Variable Documentation

◆ cFxls8962ConfigNormal

const registerwritelist_t cFxls8962ConfigNormal[]
Initial value:

Register settings for Normal (non buffered) mode.

Definition at line 38 of file fxls8962_normal.c.

◆ cFxls8962DRDYEvent

const registerreadlist_t cFxls8962DRDYEvent[] = {{.readFrom = FXLS8962_INT_STATUS, .numBytes = 1}, __END_READ_DATA__}

Address of DATA Ready Status Register.

Definition at line 46 of file fxls8962_normal.c.

◆ cFxls8962OutputNormal

const registerreadlist_t cFxls8962OutputNormal[]
Initial value:
= {{.readFrom = FXLS8962_OUT_X_LSB, .numBytes = FXLS8962_DATA_SIZE},
#define FXLS8962_DATA_SIZE
#define __END_READ_DATA__
Definition: sensor_drv.h:51

Address of Raw Accel Data in Normal Mode.

Definition at line 49 of file fxls8962_normal.c.