Sensor Fusion Library 0.6.1
Orientation sensing for Espressif (ESP32, ESP8266) processors
Loading...
Searching...
No Matches
driver_fxos8700.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 - 2016, Freescale Semiconductor, Inc.
3 * Copyright 2016-2017 NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
14#ifndef DRIVER_FXOS8700_H_
15#define DRIVER_FXOS8700_H_
16
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include <stdint.h>
23
25
26/*******************************************************************************
27 * Definitions
28 ******************************************************************************/
29
39
41typedef struct
42{
43 uint32_t timestamp;
44 int16_t accel[3];
45 int16_t mag[3];
47
49typedef struct
50{
51 uint32_t timestamp;
52 int16_t accel[3];
54
57#define FXOS8700_SPI_MAX_MSG_SIZE (64)
58
61#define FXOS8700_SPI_CMD_LEN (2)
62
65#define FXOS8700_SS_ACTIVE_VALUE SPI_SS_ACTIVE_LOW
66
67/*******************************************************************************
68 * APIs
69 ******************************************************************************/
70//TODO - can toss the Idle functions
71
84 fxos8700_i2c_sensorhandle_t *pSensorHandle, uint8_t index, uint16_t sAddress, uint8_t whoAmi);
85
97 void *userParam);
98
108int32_t FXOS8700_I2C_Configure(fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList);
109
122 const registerReadlist_t *pReadList,
123 uint8_t *pBuffer);
124
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif // DRIVER_FXOS8700_H_
int32_t FXOS8700_I2C_Deinit(fxos8700_i2c_sensorhandle_t *pSensorHandle)
The interface function to De Initialize sensor..
int32_t FXOS8700_I2C_ReadData(fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerReadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data.
int32_t FXOS8700_I2C_Initialize(fxos8700_i2c_sensorhandle_t *pSensorHandle, uint8_t index, uint16_t sAddress, uint8_t whoAmi)
The interface function to initialize the sensor.
int32_t FXOS8700_I2C_Configure(fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)
The interface function to configure the sensor.
void FXOS8700_I2C_SetIdleTask(fxos8700_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
: The interface function to set the I2C Idle Task.
The driver_sensors_types.h file contains sensor state structs and error definitions.
void(* registeridlefunction_t)(void *userParam)
This is the register idle function type.
This structure defines the fxos8700 raw accel data buffer.
This structure defines the fxos8700 raw data buffer.
This defines the sensor specific information for I2C.
registerDeviceInfo_t deviceInfo
This structure defines the device specific info required by register I/O.
This structure defines the Read command List.
This structure defines the Write command List.