ISSDK  1.8
IoT Sensing Software Development Kit
Macros | Functions | Variables
fxls896xaf_poll.c File Reference
#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 "fxls896x_drv.h"
#include "systick_utils.h"
Include dependency graph for fxls896xaf_poll.c:

Go to the source code of this file.

Macros

#define FXLS896x_DATA_SIZE   6
 

Functions

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

Variables

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

Macro Definition Documentation

◆ FXLS896x_DATA_SIZE

#define FXLS896x_DATA_SIZE   6

Definition at line 31 of file fxls896xaf_poll.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 FXLS896x sensor driver.

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

Configure the FXLS896x sensor.

Wait for data ready from the FXLS896x.

Read new raw sensor data from the FXLS896x.

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

Definition at line 57 of file fxls896xaf_poll.c.

References fxls896x_acceldata_t::accel, ASK_USER_TO_RESUME, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), BOARD_SystickEnable(), data, FXLS8962_WHOAMI_VALUE, FXLS8964_WHOAMI_VALUE, FXLS8967_WHOAMI_VALUE, FXLS8968_WHOAMI_VALUE, FXLS896x_DATA_SIZE, FXLS896x_I2C_ADDR, FXLS896x_I2C_Configure(), FXLS896x_I2C_Initialize(), FXLS896x_I2C_ReadData(), FXLS896x_I2C_SetIdleTask(), FXLS896x_INT_STATUS_SRC_DRDY_MASK, fxls896xDriver, 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

◆ cFxls896xConfigNormal

const registerwritelist_t cFxls896xConfigNormal[]
Initial value:

Register settings for Normal (non buffered) mode.

Definition at line 37 of file fxls896xaf_poll.c.

◆ cFxls896xDRDYEvent

const registerreadlist_t cFxls896xDRDYEvent[] = {{.readFrom = FXLS896x_INT_STATUS, .numBytes = 1}, __END_READ_DATA__}

Address of DATA Ready Status Register.

Definition at line 45 of file fxls896xaf_poll.c.

◆ cFxls896xOutputNormal

const registerreadlist_t cFxls896xOutputNormal[]
Initial value:
= {{.readFrom = FXLS896x_OUT_X_LSB, .numBytes = FXLS896x_DATA_SIZE},
#define FXLS896x_DATA_SIZE
#define __END_READ_DATA__
Definition: sensor_drv.h:51

Address of Raw Accel Data in Normal Mode.

Definition at line 48 of file fxls896xaf_poll.c.