![]() |
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 "fxls8974_drv.h"
#include "systick_utils.h"
#include "Driver_I2C.h"
Go to the source code of this file.
Macros | |
#define | FXLS8974_DATA_SIZE 6 |
#define | FXLS8974_STANDBY_MODE 0 |
#define | FXLS8974_ACTIVE_MODE 1 |
Functions | |
void | fxls8974_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 | cFxls8974AwsConfig [] |
Register settings for configuring SDCD-OT for tap-detection and Auto-Wake/Sleep in interrupt mode. More... | |
const registerreadlist_t | cFxls8974ReadSysMode [] = {{.readFrom = FXLS8974_SYS_MODE, .numBytes = 1}, __END_READ_DATA__} |
Read register list to read SysMode Register. More... | |
const registerreadlist_t | cFxls8974ReadIntStatus [] = {{.readFrom = FXLS8974_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Read register list to read INT_STATUS Register. More... | |
volatile bool | gFxls8974IntFlag = false |
ARM_DRIVER_I2C * | I2Cdrv = &I2C_S_DRIVER |
fxls8974_i2c_sensorhandle_t | fxls8974Driver |
GENERIC_DRIVER_GPIO * | pGpioDriver = &Driver_GPIO_KSDK |
#define FXLS8974_ACTIVE_MODE 1 |
Definition at line 40 of file fxls8974cf_motion_wakeup.c.
#define FXLS8974_DATA_SIZE 6 |
Definition at line 38 of file fxls8974cf_motion_wakeup.c.
#define FXLS8974_STANDBY_MODE 0 |
Definition at line 39 of file fxls8974cf_motion_wakeup.c.
void fxls8974_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 fxls8974cf_motion_wakeup.c.
References gFxls8974IntFlag.
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 FXLS8974 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 FXLS8974 sensor driver.
Set the task to be executed while waiting for I2C transactions to complete.
Configure the FXLS8974 sensor.
Read new raw sensor data from the FXLS8974.
Wake Mode Detected.
Definition at line 107 of file fxls8974cf_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, FXLS8974_I2C_ADDR, FXLS8974_I2C_Configure(), FXLS8974_I2C_Initialize(), FXLS8974_I2C_ReadData(), FXLS8974_I2C_SetIdleTask(), FXLS8974_INT1, fxls8974_int_callback(), FXLS8974_SYS_MODE_SYS_MODE_WAKE, FXLS8974_WHOAMI_VALUE, gFxls8974IntFlag, 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 cFxls8974AwsConfig[] |
Register settings for configuring SDCD-OT for tap-detection and Auto-Wake/Sleep in interrupt mode.
Definition at line 45 of file fxls8974cf_motion_wakeup.c.
const registerreadlist_t cFxls8974ReadIntStatus[] = {{.readFrom = FXLS8974_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Read register list to read INT_STATUS Register.
Definition at line 76 of file fxls8974cf_motion_wakeup.c.
const registerreadlist_t cFxls8974ReadSysMode[] = {{.readFrom = FXLS8974_SYS_MODE, .numBytes = 1}, __END_READ_DATA__} |
Read register list to read SysMode Register.
Definition at line 73 of file fxls8974cf_motion_wakeup.c.
fxls8974_i2c_sensorhandle_t fxls8974Driver |
Definition at line 84 of file fxls8974cf_motion_wakeup.c.
Referenced by main().
volatile bool gFxls8974IntFlag = false |
Definition at line 81 of file fxls8974cf_motion_wakeup.c.
Referenced by fxls8974_int_callback(), and main().
ARM_DRIVER_I2C* I2Cdrv = &I2C_S_DRIVER |
Definition at line 83 of file fxls8974cf_motion_wakeup.c.
Referenced by main().
GENERIC_DRIVER_GPIO* pGpioDriver = &Driver_GPIO_KSDK |
Definition at line 85 of file fxls8974cf_motion_wakeup.c.