![]() |
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 "Driver_I2C.h"
#include "issdk_hal.h"
#include "fxos8700_drv.h"
Go to the source code of this file.
Macros | |
#define | RAW_ACCELMAG_DATA_SIZE (12) |
Functions | |
int | main (void) |
Main function. More... | |
Variables | |
const registerwritelist_t | fxos8700_Config_Hybrid [] |
const registerreadlist_t | FXOS8700_STATUS_READ [] = {{.readFrom = FXOS8700_STATUS, .numBytes = 1}, __END_READ_DATA__} |
const registerreadlist_t | FXOS8700_ACCELMAG_READ [] |
const registerreadlist_t | FXOS8700_ACCEL_MAG_READ [] |
#define RAW_ACCELMAG_DATA_SIZE (12) |
Definition at line 31 of file fxos8700_poll.c.
Referenced by 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 the FXOS8700 sensor driver.
Set the task to be executed while waiting for I2C transactions to complete.
Configure the fxos8700 sensor driver.
Wait for data ready from the FXOS8700.
Read the raw sensor data from the fxos8700.
Convert the raw sensor data to signed 16-bit container for display to the debug port.
Definition at line 65 of file fxos8700_poll.c.
References fxos8700_accelmagdata_t::accel, ASK_USER_TO_RESUME, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), data, FXOS8700_DR_STATUS_ZYXDR_MASK, FXOS8700_I2C_ADDR, FXOS8700_I2C_Configure(), FXOS8700_I2C_Initialize(), FXOS8700_I2C_ReadData(), FXOS8700_WHO_AM_I_PROD_VALUE, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), fxos8700_accelmagdata_t::mag, RAW_ACCELMAG_DATA_SIZE, rawData, SENSOR_ERROR_NONE, and status.
const registerreadlist_t FXOS8700_ACCEL_MAG_READ[] |
Command definition to read the Accel + Mag Data (in 2 TXNs).
Definition at line 55 of file fxos8700_poll.c.
const registerreadlist_t FXOS8700_ACCELMAG_READ[] |
Command definition to read the Accel + Mag Data
Definition at line 51 of file fxos8700_poll.c.
const registerwritelist_t fxos8700_Config_Hybrid[] |
Prepare the register write list to configure FXOS8700 in Hybrid mode.
Definition at line 37 of file fxos8700_poll.c.
const registerreadlist_t FXOS8700_STATUS_READ[] = {{.readFrom = FXOS8700_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Command definition to read the Data Ready Status
Definition at line 48 of file fxos8700_poll.c.