![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
The fxls8962_motion_detection.c file implements the ISSDK FXLS8962 sensor driver example demonstration for Motion Detection. 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 "gpio_driver.h"
#include "fxls8962_drv.h"
Go to the source code of this file.
Macros | |
#define | MD_SDCD_WT_DBCNT 0x00 /* Debounce count value. */ |
#define | SDCD_LTHS_LSB 0xC0 /* Lower Threshold LSB value. */ |
#define | SDCD_LTHS_MSB 0x0F /* Lower Threshold MSB value. */ |
#define | SDCD_UTHS_LSB 0x40 /* Upper Threshold LSB value. */ |
#define | SDCD_UTHS_MSB 0x00 /* Upper Threshold MSB value. */ |
Functions | |
void | fxls8962_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 | cFxls8962ConfigMotionDetect [] |
Register Start Motion Detect Mode Register Write List. More... | |
volatile bool | gFxls8962EventReady = false |
The fxls8962_motion_detection.c file implements the ISSDK FXLS8962 sensor driver example demonstration for Motion Detection.
Definition in file fxls8962_motion_detection.c.
#define MD_SDCD_WT_DBCNT 0x00 /* Debounce count value. */ |
Definition at line 38 of file fxls8962_motion_detection.c.
#define SDCD_LTHS_LSB 0xC0 /* Lower Threshold LSB value. */ |
Definition at line 39 of file fxls8962_motion_detection.c.
#define SDCD_LTHS_MSB 0x0F /* Lower Threshold MSB value. */ |
Definition at line 40 of file fxls8962_motion_detection.c.
#define SDCD_UTHS_LSB 0x40 /* Upper Threshold LSB value. */ |
Definition at line 41 of file fxls8962_motion_detection.c.
#define SDCD_UTHS_MSB 0x00 /* Upper Threshold MSB value. */ |
Definition at line 42 of file fxls8962_motion_detection.c.
void fxls8962_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. |
Set flag to indicate Sensor has signalled data ready.
Definition at line 83 of file fxls8962_motion_detection.c.
References gFxls8962EventReady.
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. |
Initialize the MCU hardware.
Initialize FXLS8962 pin used by FRDM board
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.
Definition at line 97 of file fxls8962_motion_detection.c.
References BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), Driver_GPIO_KSDK, FXLS8962_I2C_ADDR, FXLS8962_I2C_Configure(), FXLS8962_I2C_Initialize(), FXLS8962_I2C_SetIdleTask(), FXLS8962_INT1, fxls8962_int_callback(), FXLS8962_WHOAMI_VALUE, fxls8962Driver, gFxls8962EventReady, GPIO_DIRECTION_IN, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), pGpioDriver, GENERIC_DRIVER_GPIO::pin_init, SENSOR_ERROR_NONE, SMC, SMC_SetPowerModeVlpr(), SMC_SetPowerModeWait(), and status.
const registerwritelist_t cFxls8962ConfigMotionDetect[] |
Register Start Motion Detect Mode Register Write List.
Definition at line 48 of file fxls8962_motion_detection.c.
volatile bool gFxls8962EventReady = false |
Definition at line 70 of file fxls8962_motion_detection.c.
Referenced by fxls8962_int_callback(), and main().