![]() |
ISSDK
1.7
IoT Sensing Software Development Kit
|
The diff_p_normal.c file implements the ISSDK DIFF_P sensor driver example demonstration with polling mode. More...
#include "board.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "fsl_debug_console.h"
#include "Driver_I2C.h"
#include "issdk_hal.h"
#include "diff_p_drv.h"
#include "systick_utils.h"
Go to the source code of this file.
Macros | |
#define | DIFF_P_DATA_SIZE (3) /* 2 byte Pressure and 1 byte Temperature. */ |
Functions | |
int | main (void) |
Main function. More... | |
Variables | |
const registerwritelist_t | cDiffPConfigNormal [] |
Register settings for Normal Mode. More... | |
const registerwritelist_t | cDiffPClearStatusBits [] |
Register settings for Clearing Pressure and Temperature Data Ready Bits. More... | |
const registerreadlist_t | cDiffPStatus [] = {{.readFrom = DIFF_P_INT_STATUS_0, .numBytes = 1}, __END_READ_DATA__} |
Address of Status Register. More... | |
const registerreadlist_t | cDiffPOutputNormal [] |
Address and size of Raw Pressure+Temperature Data in Normal Mode. More... | |
The diff_p_normal.c file implements the ISSDK DIFF_P sensor driver example demonstration with polling mode.
Definition in file diff_p_normal.c.
Definition at line 61 of file diff_p_normal.c.
Referenced by main().
int main | ( | void | ) |
Main function.
Initialize the I2C driver.
Set the I2C Power mode.
Set the I2C bus speed.
Initialize DIFF_P sensor driver.
Set the task to be executed while waiting for I2C transactions to complete.
Configure the DIFF_P sensor.
Check for both data ready bits from the DIFF_P.
Read new raw sensor data from the DIFF_P.
Explicitly clear the Status Bits.
Process the sample and convert the raw sensor data.
Definition at line 89 of file diff_p_normal.c.
References ASK_USER_TO_RESUME, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), BOARD_SystickEnable(), data, diff_p_i2c_sensorhandle_t::deviceInfo, DIFF_P_DATA_SIZE, DIFF_P_I2C_ADDR, DIFF_P_I2C_Configure(), DIFF_P_I2C_Initialize(), DIFF_P_I2C_ReadData(), DIFF_P_I2C_SetIdleTask(), DIFF_P_INT_STATUS_0_PDR_DRDY, DIFF_P_INT_STATUS_0_PDR_MASK, DIFF_P_INT_STATUS_0_TDR_DRDY, DIFF_P_INT_STATUS_0_TDR_MASK, DIFF_P_NPS3000VV_WHOAMI_VALUE, DIFF_P_NPS3001DV_WHOAMI_VALUE, DIFF_P_NPS3002VV_WHOAMI_VALUE, DIFF_P_NPS3005DV_WHOAMI_VALUE, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, int32_t(), NPS3000VV_PRESSURE_DIV_FACTOR, NPS3001DV_PRESSURE_DIV_FACTOR, NPS3002VV_PRESSURE_DIV_FACTOR, NPS3005DV_PRESSURE_DIV_FACTOR, diff_p_i2c_sensorhandle_t::pCommDrv, diff_p_pressuredata_t::pressure, rawData, SENSOR_ERROR_NONE, Sensor_I2C_Write(), diff_p_i2c_sensorhandle_t::slaveAddress, SMC, SMC_SetPowerModeWait(), status, and diff_p_pressuredata_t::temperature.
const registerwritelist_t cDiffPClearStatusBits[] |
Register settings for Clearing Pressure and Temperature Data Ready Bits.
Definition at line 73 of file diff_p_normal.c.
const registerwritelist_t cDiffPConfigNormal[] |
Register settings for Normal Mode.
Definition at line 67 of file diff_p_normal.c.
const registerreadlist_t cDiffPOutputNormal[] |
Address and size of Raw Pressure+Temperature Data in Normal Mode.
Definition at line 80 of file diff_p_normal.c.
const registerreadlist_t cDiffPStatus[] = {{.readFrom = DIFF_P_INT_STATUS_0, .numBytes = 1}, __END_READ_DATA__} |
Address of Status Register.
Definition at line 77 of file diff_p_normal.c.