![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
#include "pin_mux.h"
#include "clock_config.h"
#include "board.h"
#include "fsl_debug_console.h"
#include "issdk_hal.h"
#include "gpio_driver.h"
#include "fxls896x_drv.h"
#include "systick_utils.h"
#include "Driver_I2C.h"
Go to the source code of this file.
Macros | |
#define | FXLS8964_DATA_SIZE 6 |
#define | FXLS8964_STANDBY_MODE 0 |
#define | FXLS8964_ACTIVE_MODE 1 |
Functions | |
void | fxls896x_int_callback (void *pUserData) |
This is the Sensor Data Ready ISR implementation. More... | |
int | main (void) |
This is the The main function implementation. More... | |
Variables | |
const registerwritelist_t | cFxls896xAwsConfig [] |
Register settings for configuring SDCD-OT for tap-detection and Auto-Wake/Sleep in interrupt mode. More... | |
const registerreadlist_t | cFxls896xReadSysMode [] = {{.readFrom = FXLS896x_SYS_MODE, .numBytes = 1}, __END_READ_DATA__} |
Read register list to read SysMode Register. More... | |
const registerreadlist_t | cFxls896xReadIntStatus [] = {{.readFrom = FXLS896x_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Read register list to read INT_STATUS Register. More... | |
volatile bool | gFxls896xIntFlag = false |
ARM_DRIVER_I2C * | I2Cdrv = &I2C_S_DRIVER |
fxls896x_i2c_sensorhandle_t | fxls896xDriver |
GENERIC_DRIVER_GPIO * | pGpioDriver = &Driver_GPIO_KSDK |
#define FXLS8964_ACTIVE_MODE 1 |
Definition at line 40 of file fxls896xaf_motion_wakeup.c.
#define FXLS8964_DATA_SIZE 6 |
Definition at line 38 of file fxls896xaf_motion_wakeup.c.
#define FXLS8964_STANDBY_MODE 0 |
Definition at line 39 of file fxls896xaf_motion_wakeup.c.
void fxls896x_int_callback | ( | void * | pUserData | ) |
This is the Sensor Data Ready ISR implementation.
This function sets the flag which indicates if a new sample(s) is available for reading.
[in] | pUserData | This is a void pointer to the instance of the user specific data structure for the ISR. void There is no return value. |
Set flag to indicate Sensor has signalled data ready.
Definition at line 95 of file fxls896xaf_motion_wakeup.c.
References gFxls896xIntFlag.
Referenced by main().
int main | ( | void | ) |
This is the The main function implementation.
This function invokes board initializes routines, then then brings up the sensor and finally enters an endless loop to continuously read available samples.
[in] | void | This is no input parameter. void There is no return value. |
Initialize the MCU hardware.
Initialize FXLS8964 pin used by FRDM board
Initialize RGB LED pin used by FRDM board
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.
Read new raw sensor data from the FXLS8964.
Wake Mode Detected.
Definition at line 107 of file fxls896xaf_motion_wakeup.c.
References BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), BOARD_SystickEnable(), GENERIC_DRIVER_GPIO::clr_pin, FXLS8962_WHOAMI_VALUE, FXLS8964_WHOAMI_VALUE, FXLS8967_WHOAMI_VALUE, FXLS8968_WHOAMI_VALUE, FXLS896x_I2C_ADDR, FXLS896x_I2C_Configure(), FXLS896x_I2C_Initialize(), FXLS896x_I2C_ReadData(), FXLS896x_I2C_SetIdleTask(), FXLS896x_INT1, fxls896x_int_callback(), FXLS896x_SYS_MODE_SYS_MODE_WAKE, FXLS8974_WHOAMI_VALUE, gFxls896xIntFlag, GPIO_DIRECTION_IN, GPIO_DIRECTION_OUT, GREEN_LED, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), GENERIC_DRIVER_GPIO::pin_init, RED_LED, SENSOR_ERROR_NONE, GENERIC_DRIVER_GPIO::set_pin, SMC, SMC_SetPowerModeVlpr(), SMC_SetPowerModeWait(), and status.
const registerwritelist_t cFxls896xAwsConfig[] |
Register settings for configuring SDCD-OT for tap-detection and Auto-Wake/Sleep in interrupt mode.
Definition at line 45 of file fxls896xaf_motion_wakeup.c.
const registerreadlist_t cFxls896xReadIntStatus[] = {{.readFrom = FXLS896x_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Read register list to read INT_STATUS Register.
Definition at line 76 of file fxls896xaf_motion_wakeup.c.
const registerreadlist_t cFxls896xReadSysMode[] = {{.readFrom = FXLS896x_SYS_MODE, .numBytes = 1}, __END_READ_DATA__} |
Read register list to read SysMode Register.
Definition at line 73 of file fxls896xaf_motion_wakeup.c.
fxls896x_i2c_sensorhandle_t fxls896xDriver |
Definition at line 84 of file fxls896xaf_motion_wakeup.c.
Referenced by main().
volatile bool gFxls896xIntFlag = false |
Definition at line 81 of file fxls896xaf_motion_wakeup.c.
Referenced by fxls896x_int_callback(), and main().
ARM_DRIVER_I2C* I2Cdrv = &I2C_S_DRIVER |
Definition at line 83 of file fxls896xaf_motion_wakeup.c.
Referenced by main().
GENERIC_DRIVER_GPIO* pGpioDriver = &Driver_GPIO_KSDK |
Definition at line 85 of file fxls896xaf_motion_wakeup.c.